5 Commits cb7d744e2a ... c12f5e9635

Auteur SHA1 Bericht Datum
  sophieChenyx c12f5e9635 :sparkles: 合并master上最新代码 解决冲突 6 jaren geleden
  sophieChenyx b6b77cf484 增加资金明细页面 6 jaren geleden
  Rorschach fc0db30b57 点赞 6 jaren geleden
  Rorschach 8835224faa bug 6 jaren geleden
  Rorschach c223f785b1 合并sophie 6 jaren geleden
49 gewijzigde bestanden met toevoegingen van 2020 en 349 verwijderingen
  1. 582 0
      .idea/workspace.xml
  2. 6 4
      app.json
  3. 1 1
      component/hot/hot.wxml
  4. 26 4
      component/my/my.js
  5. 3 3
      component/my/my.wxml
  6. 3 0
      component/popup/popup.js
  7. 1 1
      component/popup/popup.wxml
  8. 78 51
      component/share/share.js
  9. 1 1
      component/share/share.wxml
  10. 1 1
      component/share/share.wxss
  11. 2 0
      pages/groupPage/collage-details/collage-details.js
  12. 0 1
      pages/groupPage/collage-details/collage-details.wxml
  13. 132 47
      pages/groupPage/group-details/group-details.js
  14. 6 1
      pages/groupPage/group-details/group-details.json
  15. 12 2
      pages/groupPage/group-details/group-details.wxml
  16. 139 0
      pages/groupPage/make-money/make-money.js
  17. 6 0
      pages/groupPage/make-money/make-money.json
  18. 47 0
      pages/groupPage/make-money/make-money.wxml
  19. 97 0
      pages/groupPage/make-money/make-money.wxss
  20. 90 1
      pages/groupPage/my-group/my-group.js
  21. 6 1
      pages/groupPage/my-group/my-group.json
  22. 9 0
      pages/groupPage/my-group/my-group.wxml
  23. 0 1
      pages/index/index.js
  24. 39 17
      pages/main/class/class.js
  25. 3 3
      pages/main/class/class.wxml
  26. 2 1
      pages/main/singleBook/singleBook.js
  27. 54 9
      pages/social/replyDetail/replyDetail.js
  28. 19 15
      pages/social/replyDetail/replyDetail.wxml
  29. 12 0
      pages/social/replyDetail/replyDetail.wxss
  30. 142 30
      pages/social/works/works.js
  31. 7 1
      pages/social/works/works.json
  32. 22 13
      pages/social/works/works.wxml
  33. 27 4
      pages/social/works/works.wxss
  34. 44 47
      pages/user/myEdit/myEdit.js
  35. 23 23
      pages/user/myEdit/myEdit.wxml
  36. 48 31
      pages/user/myEdit/myEdit.wxss
  37. 10 9
      pages/user/myWallet/myWallet.js
  38. 1 2
      pages/user/myWallet/myWallet.wxml
  39. 0 1
      pages/user/myWallet/myWallet.wxss
  40. 17 10
      pages/user/myconcern/myconcern.js
  41. 2 7
      pages/user/myconcern/myconcern.wxml
  42. 112 0
      pages/user/walletDetails/walletDetails.js
  43. 1 0
      pages/user/walletDetails/walletDetails.json
  44. 34 0
      pages/user/walletDetails/walletDetails.wxml
  45. 68 0
      pages/user/walletDetails/walletDetails.wxss
  46. 13 1
      project.config.json
  47. BIN
      static/image/no_collect.png
  48. BIN
      static/image/walletdetails.png
  49. 72 5
      utils/APIClient.js

+ 582 - 0
.idea/workspace.xml

@@ -0,0 +1,582 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ChangeListManager">
+    <list default="true" id="2ecf3c01-ae46-4667-8997-db10a46d1157" name="Default Changelist" comment="">
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/component/my/my.js" beforeDir="false" afterPath="$PROJECT_DIR$/component/my/my.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/pages/index/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/index/index.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/pages/user/myEdit/myEdit.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/user/myEdit/myEdit.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/pages/user/myEdit/myEdit.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/pages/user/myEdit/myEdit.wxml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/utils/APIClient.js" beforeDir="false" afterPath="$PROJECT_DIR$/utils/APIClient.js" afterDir="false" />
+    </list>
+    <ignored path="$PROJECT_DIR$/.tmp/" />
+    <ignored path="$PROJECT_DIR$/temp/" />
+    <ignored path="$PROJECT_DIR$/tmp/" />
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
+    <option name="SHOW_DIALOG" value="false" />
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
+    <option name="LAST_RESOLUTION" value="IGNORE" />
+  </component>
+  <component name="FUSProjectUsageTrigger">
+    <session id="-1384404472">
+      <usages-collector id="statistics.lifecycle.project">
+        <counts>
+          <entry key="project.closed" value="6" />
+          <entry key="project.open.time.15" value="1" />
+          <entry key="project.open.time.26" value="1" />
+          <entry key="project.open.time.30" value="1" />
+          <entry key="project.open.time.32" value="1" />
+          <entry key="project.open.time.4" value="1" />
+          <entry key="project.open.time.5" value="1" />
+          <entry key="project.opened" value="6" />
+        </counts>
+      </usages-collector>
+      <usages-collector id="statistics.file.extensions.open">
+        <counts>
+          <entry key="jpg" value="1" />
+          <entry key="js" value="29" />
+          <entry key="json" value="5" />
+          <entry key="wxml" value="17" />
+          <entry key="wxss" value="9" />
+        </counts>
+      </usages-collector>
+      <usages-collector id="statistics.file.types.open">
+        <counts>
+          <entry key="Image" value="1" />
+          <entry key="JSON" value="5" />
+          <entry key="JavaScript" value="29" />
+          <entry key="PLAIN_TEXT" value="26" />
+        </counts>
+      </usages-collector>
+      <usages-collector id="statistics.file.extensions.edit">
+        <counts>
+          <entry key="js" value="1245" />
+          <entry key="json" value="5" />
+          <entry key="wxml" value="160" />
+          <entry key="wxss" value="87" />
+        </counts>
+      </usages-collector>
+      <usages-collector id="statistics.file.types.edit">
+        <counts>
+          <entry key="JSON" value="5" />
+          <entry key="JavaScript" value="1245" />
+          <entry key="PLAIN_TEXT" value="247" />
+        </counts>
+      </usages-collector>
+      <usages-collector id="statistics.js.language.service.starts" />
+      <usages-collector id="statistics.vcs.git.usages" />
+    </session>
+  </component>
+  <component name="FileEditorManager">
+    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/pages/user/myEdit/myEdit.wxml">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="180">
+              <caret line="6" column="136" lean-forward="true" selection-start-line="6" selection-start-column="136" selection-end-line="6" selection-end-column="136" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/pages/user/myEdit/myEdit.js">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="390">
+              <caret line="49" column="24" lean-forward="true" selection-start-line="49" selection-start-column="24" selection-end-line="49" selection-end-column="24" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/pages/main/class/class.js">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="2460">
+              <caret line="82" column="23" selection-start-line="82" selection-start-column="15" selection-end-line="82" selection-end-column="23" />
+              <folding>
+                <element signature="e#0#54#0" expanded="true" />
+              </folding>
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/utils/APIClient.js">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="360">
+              <caret line="225" column="38" lean-forward="true" selection-start-line="225" selection-start-column="38" selection-end-line="225" selection-end-column="38" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/utils/WXHttpRequest.js">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="30">
+              <caret line="1" column="29" selection-start-line="1" selection-start-column="29" selection-end-line="1" selection-end-column="29" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/pages/index/index.js">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="2070">
+              <caret line="69" column="32" selection-start-line="69" selection-start-column="32" selection-end-line="69" selection-end-column="32" />
+              <folding>
+                <element signature="n#!!doc" expanded="true" />
+                <element signature="e#20#81#0" expanded="true" />
+                <element signature="e#104#156#0" expanded="true" />
+              </folding>
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/component/my/my.js">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="630">
+              <caret line="43" column="40" selection-start-line="43" selection-start-column="40" selection-end-line="43" selection-end-column="40" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/component/hot/hot.js">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="3630">
+              <caret line="121" column="11" selection-start-line="121" selection-start-column="11" selection-end-line="121" selection-end-column="11" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/utils/httpUtil.js">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="870">
+              <caret line="29" column="6" selection-start-line="29" selection-start-column="6" selection-end-line="29" selection-end-column="6" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/component/my/my.wxml">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="480">
+              <caret line="19" column="39" selection-start-line="19" selection-start-column="39" selection-end-line="19" selection-end-column="39" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+    </leaf>
+  </component>
+  <component name="FindInProjectRecents">
+    <findStrings>
+      <find>followInit</find>
+      <find>init</find>
+      <find>onShow</find>
+      <find>getOpenidSessionKey</find>
+      <find>settingUserInfo</find>
+      <find>获取首页人气推荐</find>
+      <find>wx/user</find>
+      <find>opt</find>
+    </findStrings>
+  </component>
+  <component name="Git.Settings">
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
+  </component>
+  <component name="IdeDocumentHistory">
+    <option name="CHANGED_PATHS">
+      <list>
+        <option value="$PROJECT_DIR$/component/my/my.wxss" />
+        <option value="$PROJECT_DIR$/pages/index/index.json" />
+        <option value="$PROJECT_DIR$/pages/user/myconcern/myconcern.wxml" />
+        <option value="$PROJECT_DIR$/pages/user/myconcern/myconcern.js" />
+        <option value="$PROJECT_DIR$/pages/user/myconcern/myconcern.wxss" />
+        <option value="$PROJECT_DIR$/pages/user/myEdit/myEdit.wxss" />
+        <option value="$PROJECT_DIR$/app.json" />
+        <option value="$PROJECT_DIR$/utils/httpUtil.js" />
+        <option value="$PROJECT_DIR$/pages/index/index.js" />
+        <option value="$PROJECT_DIR$/component/my/my.wxml" />
+        <option value="$PROJECT_DIR$/pages/user/myEdit/myEdit.js" />
+        <option value="$PROJECT_DIR$/pages/user/myEdit/myEdit.wxml" />
+        <option value="$PROJECT_DIR$/utils/APIClient.js" />
+        <option value="$PROJECT_DIR$/component/my/my.js" />
+      </list>
+    </option>
+  </component>
+  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
+  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
+  <component name="JsGulpfileManager">
+    <detection-done>true</detection-done>
+    <sorting>DEFINITION_ORDER</sorting>
+  </component>
+  <component name="ProjectFrameBounds" extendedState="6">
+    <option name="x" value="260" />
+    <option name="y" value="20" />
+    <option name="width" value="1400" />
+    <option name="height" value="1000" />
+  </component>
+  <component name="ProjectInspectionProfilesVisibleTreeState">
+    <entry key="Project Default">
+      <profile-state>
+        <expanded-state>
+          <State />
+          <State>
+            <id>CSS</id>
+          </State>
+          <State>
+            <id>Code style issuesCSS</id>
+          </State>
+          <State>
+            <id>Control flow issuesJavaScript</id>
+          </State>
+          <State>
+            <id>DOM issuesJavaScript</id>
+          </State>
+          <State>
+            <id>General</id>
+          </State>
+          <State>
+            <id>GeneralJavaScript</id>
+          </State>
+          <State>
+            <id>Invalid elementsCSS</id>
+          </State>
+          <State>
+            <id>JavaScript</id>
+          </State>
+          <State>
+            <id>Probable bugsCSS</id>
+          </State>
+          <State>
+            <id>Pug/Jade</id>
+          </State>
+          <State>
+            <id>YAML</id>
+          </State>
+        </expanded-state>
+      </profile-state>
+    </entry>
+  </component>
+  <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
+  <component name="ProjectView">
+    <navigator proportions="" version="1">
+      <foldersAlwaysOnTop value="true" />
+    </navigator>
+    <panes>
+      <pane id="Scope" />
+      <pane id="ProjectPane">
+        <subPane>
+          <expand>
+            <path>
+              <item name="reader" type="b2602c69:ProjectViewProjectNode" />
+              <item name="reader" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="reader" type="b2602c69:ProjectViewProjectNode" />
+              <item name="reader" type="462c0819:PsiDirectoryNode" />
+              <item name="component" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="reader" type="b2602c69:ProjectViewProjectNode" />
+              <item name="reader" type="462c0819:PsiDirectoryNode" />
+              <item name="component" type="462c0819:PsiDirectoryNode" />
+              <item name="my" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="reader" type="b2602c69:ProjectViewProjectNode" />
+              <item name="reader" type="462c0819:PsiDirectoryNode" />
+              <item name="pages" type="462c0819:PsiDirectoryNode" />
+            </path>
+          </expand>
+          <select />
+        </subPane>
+      </pane>
+    </panes>
+  </component>
+  <component name="PropertiesComponent">
+    <property name="WebServerToolWindowFactoryState" value="false" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
+    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
+    <property name="settings.editor.selected.configurable" value="preferences.sourceCode" />
+  </component>
+  <component name="RunDashboard">
+    <option name="ruleStates">
+      <list>
+        <RuleState>
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
+        </RuleState>
+        <RuleState>
+          <option name="name" value="StatusDashboardGroupingRule" />
+        </RuleState>
+      </list>
+    </option>
+  </component>
+  <component name="SvnConfiguration">
+    <configuration />
+  </component>
+  <component name="TaskManager">
+    <task active="true" id="Default" summary="Default task">
+      <changelist id="2ecf3c01-ae46-4667-8997-db10a46d1157" name="Default Changelist" comment="" />
+      <created>1541144282324</created>
+      <option name="number" value="Default" />
+      <option name="presentableId" value="Default" />
+      <updated>1541144282324</updated>
+      <workItem from="1541144291161" duration="762000" />
+      <workItem from="1541157092216" duration="2211000" />
+      <workItem from="1541402122086" duration="6360000" />
+      <workItem from="1541554466111" duration="5820000" />
+      <workItem from="1541581837551" duration="14978000" />
+      <workItem from="1541640549483" duration="10184000" />
+    </task>
+    <servers />
+  </component>
+  <component name="TimeTrackingManager">
+    <option name="totallyTimeSpent" value="40315000" />
+  </component>
+  <component name="ToolWindowManager">
+    <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
+    <layout>
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.13119073" />
+      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
+      <window_info id="Favorites" order="2" side_tool="true" />
+      <window_info anchor="bottom" id="Message" order="0" />
+      <window_info anchor="bottom" id="Find" order="1" />
+      <window_info anchor="bottom" id="Run" order="2" />
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
+      <window_info anchor="bottom" id="TODO" order="6" />
+      <window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
+      <window_info anchor="bottom" id="Version Control" order="8" show_stripe_button="false" />
+      <window_info anchor="bottom" id="Terminal" order="9" />
+      <window_info anchor="bottom" id="Event Log" order="10" side_tool="true" />
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
+    </layout>
+  </component>
+  <component name="TypeScriptGeneratedFilesManager">
+    <option name="version" value="1" />
+  </component>
+  <component name="VcsContentAnnotationSettings">
+    <option name="myLimit" value="2678400000" />
+  </component>
+  <component name="editorHistoryManager">
+    <entry file="file://$PROJECT_DIR$/utils/util.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state>
+          <caret column="16" selection-start-column="6" selection-end-column="16" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pages/index/index.json">
+      <provider selected="true" editor-type-id="text-editor">
+        <state>
+          <caret column="1" lean-forward="true" selection-start-column="1" selection-end-column="1" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/utils/const.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="30">
+          <caret line="1" column="18" lean-forward="true" selection-start-line="1" selection-start-column="18" selection-end-line="1" selection-end-column="18" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/component/my/my.wxss">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="-1596">
+          <caret line="40" column="14" lean-forward="true" selection-start-line="40" selection-start-column="14" selection-end-line="40" selection-end-column="14" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pages/main/books/books.wxml">
+      <provider selected="true" editor-type-id="text-editor" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pages/main/reading/reading.wxml">
+      <provider selected="true" editor-type-id="text-editor" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pages/social/works/works.wxml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="780">
+          <caret line="26" column="33" lean-forward="true" selection-start-line="26" selection-start-column="33" selection-end-line="26" selection-end-column="33" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/static/image/timg.jpg">
+      <provider selected="true" editor-type-id="images" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pages/main/class/class.json">
+      <provider selected="true" editor-type-id="text-editor" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/component/hot/hot.wxml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="-290" />
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pages/main/class/class.wxml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="510">
+          <caret line="17" column="15" lean-forward="true" selection-start-line="7" selection-start-column="8" selection-end-line="17" selection-end-column="15" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/component/follow/follow.wxml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="600">
+          <caret line="20" column="51" lean-forward="true" selection-start-line="20" selection-start-column="51" selection-end-line="20" selection-end-column="51" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/component/hot/hot.wxss">
+      <provider selected="true" editor-type-id="text-editor" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pages/main/books/books.wxss">
+      <provider selected="true" editor-type-id="text-editor" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pages/main/reading/reading.wxss">
+      <provider selected="true" editor-type-id="text-editor">
+        <state>
+          <caret column="15" lean-forward="true" selection-start-column="15" selection-end-column="15" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pages/main/class/class.wxss">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="1644">
+          <caret line="91" column="18" selection-start-line="91" selection-start-column="18" selection-end-line="91" selection-end-column="18" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pages/user/myconcern/myconcern.wxml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state>
+          <caret column="21" selection-start-column="21" selection-end-column="21" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pages/user/myconcern/myconcern.wxss">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="90">
+          <caret line="3" column="1" selection-start-line="3" selection-start-column="1" selection-end-line="3" selection-end-column="1" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pages/user/myconcern/myconcern.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="2310">
+          <caret line="77" column="98" selection-start-line="77" selection-start-column="98" selection-end-line="77" selection-end-column="98" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/app.json">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="510">
+          <caret line="17" column="13" lean-forward="true" selection-start-line="17" selection-start-column="13" selection-end-line="17" selection-end-column="13" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pages/user/myEdit/myEdit.wxss">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="210">
+          <caret line="7" column="14" lean-forward="true" selection-start-line="7" selection-start-column="14" selection-end-line="7" selection-end-column="14" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pages/index/index.wxml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="810">
+          <caret line="27" column="20" selection-start-line="27" selection-start-column="16" selection-end-line="27" selection-end-column="20" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/component/follow/follow.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="270">
+          <caret line="46" column="34" lean-forward="true" selection-start-line="46" selection-start-column="34" selection-end-line="46" selection-end-column="34" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pages/index/index.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="2070">
+          <caret line="69" column="32" selection-start-line="69" selection-start-column="32" selection-end-line="69" selection-end-column="32" />
+          <folding>
+            <element signature="n#!!doc" expanded="true" />
+            <element signature="e#20#81#0" expanded="true" />
+            <element signature="e#104#156#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/utils/WXHttpRequest.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="30">
+          <caret line="1" column="29" selection-start-line="1" selection-start-column="29" selection-end-line="1" selection-end-column="29" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/component/my/my.wxml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="480">
+          <caret line="19" column="39" selection-start-line="19" selection-start-column="39" selection-end-line="19" selection-end-column="39" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/component/hot/hot.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="3630">
+          <caret line="121" column="11" selection-start-line="121" selection-start-column="11" selection-end-line="121" selection-end-column="11" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pages/main/class/class.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="2460">
+          <caret line="82" column="23" selection-start-line="82" selection-start-column="15" selection-end-line="82" selection-end-column="23" />
+          <folding>
+            <element signature="e#0#54#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/utils/httpUtil.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="870">
+          <caret line="29" column="6" selection-start-line="29" selection-start-column="6" selection-end-line="29" selection-end-column="6" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pages/user/myEdit/myEdit.wxml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="180">
+          <caret line="6" column="136" lean-forward="true" selection-start-line="6" selection-start-column="136" selection-end-line="6" selection-end-column="136" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pages/user/myEdit/myEdit.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="390">
+          <caret line="49" column="24" lean-forward="true" selection-start-line="49" selection-start-column="24" selection-end-line="49" selection-end-column="24" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/component/my/my.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="630">
+          <caret line="43" column="40" selection-start-line="43" selection-start-column="40" selection-end-line="43" selection-end-column="40" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/utils/APIClient.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="360">
+          <caret line="225" column="38" lean-forward="true" selection-start-line="225" selection-start-column="38" selection-end-line="225" selection-end-column="38" />
+        </state>
+      </provider>
+    </entry>
+  </component>
+</project>

+ 6 - 4
app.json

@@ -7,15 +7,17 @@
     "pages/main/books/books",
     "pages/main/singleBook/singleBook",
     "pages/main/reading/reading",
-    "pages/user/myEdit/myEdit",
+    "pages/main/searchResult/searchResult",
     "pages/groupPage/discount-group/discount-group",
     "pages/groupPage/group-details/group-details",
     "pages/groupPage/grade-details/grade-details",
     "pages/groupPage/collage-details/collage-details",
-    "pages/main/searchResult/searchResult",
-    "pages/user/myconcern/myconcern",
     "pages/groupPage/my-group/my-group",
-    "pages/user/myWallet/myWallet"
+    "pages/groupPage/make-money/make-money",
+    "pages/user/myEdit/myEdit",
+    "pages/user/myconcern/myconcern",
+    "pages/user/myWallet/myWallet",
+    "pages/user/walletDetails/walletDetails"
   ],
   "window": {
     "backgroundTextStyle": "light",

+ 1 - 1
component/hot/hot.wxml

@@ -47,7 +47,7 @@
             </view>
         </view>
         <view class="hotWares"  >
-            <view wx:for="{{hotData.hotWorks}}" wx:key="{{index}}" class="hotWareCard" bindtap="openWorks" data-readId="1541489786444388" data-title="{{item.title}}">
+            <view wx:for="{{hotData.hotWorks}}" wx:key="{{index}}" class="hotWareCard" bindtap="openWorks" data-readId="{{item.classId}}" data-title="{{item.title}}">
                 <image class="wareCardImg" src="{{item.img}}" />
                 <text class="wareCardTitle">{{item.title}}</text>
                 <view class="bottomData">

+ 26 - 4
component/my/my.js

@@ -1,16 +1,18 @@
+import APIClient from '../../utils/httpUtil.js'
 export const myInit =  (that) => {
   that.setData({
     myData: {
         title: '修改资料',
         concern: '我的关注',
-        wallet: "我的钱包",
-        imgUrl: 'https://developers.weixin.qq.com/miniprogram/dev/image/cat/0.jpg?t=18102320',
-        name: 'ABC',
+        wallet: '我的钱包',
         address:['北京海淀','中关村','三小'],
+        schoolCity: '青岛市',
+        schoolName: '黄岛区志贤中学',
         playNum: 31549,
         attentionCount: 10254,
         point: 6317,
-        flowerNum: 56245
+        flowerNum: 56245,
+        user: {}
     }
   })
   that.toMyEdit = (e) => {
@@ -32,4 +34,24 @@ export const myInit =  (that) => {
     });
   }
 
+  that.userInfo = function () {
+      // const userInfo = wx.getStorageSync('user');
+      // console.log(userInfo.data.data.data);
+      // that.data.myData.user = userInfo.data.data.data;//直接赋值 给 myData的user对象。
+      // that.setData({
+      //     myData: that.data.myData,
+      // },()=>{
+      //     console.log('myData的user对象,赋值成功')
+      //     console.log(that.data.myData);
+      // });
+    APIClient.getOpenidSessionKey(res => {
+      console.log(res.data.data.data);
+      that.data.myData.user = res.data.data.data;//挂载user对象。
+      that.setData({
+        myData: that.data.myData
+      },() => {
+        console.log(that.data.myData)
+      });
+    });
+  }()
 }

+ 3 - 3
component/my/my.wxml

@@ -4,7 +4,7 @@
       <view class='mine-info'>
         <view class='mine-bg'>
           <view class='mine-avatar'>
-            <image class='avatar-image' src='{{ myData.imgUrl }}'></image>
+            <image class='avatar-image' src='{{ myData.user.avatar }}'></image>
           </view>
         </view>
         <view class='mine-edit' bindtap='toMyEdit' data-title='{{ myData.title }}'>
@@ -15,8 +15,8 @@
         </view>
       </view>
       <view class='mine-detail'>
-        <text class='mine-title'>萝莉</text>
-        <view class='mine-address'>北京市,海淀区中关村三小</view>
+        <text class='mine-title'>{{ myData.user.wechatName }}</text>
+        <view class='mine-address'>{{ myData.schoolCity }},{{ myData.schoolName }}</view>
         <view class='mine-line'></view>
       </view>
       <view class='mine-category'>

+ 3 - 0
component/popup/popup.js

@@ -41,6 +41,9 @@ Component({
       this.setData({
         closeFlag: !this.data.closeFlag
       })
+    },
+    launchGroup: function () {
+      this.triggerEvent('Group', {})
     }
   }
 })

+ 1 - 1
component/popup/popup.wxml

@@ -19,7 +19,7 @@
                 <text style="color: {{item.color}};">{{item.text}}</text>
             </block>
         </view>
-        <view class="send-btn">
+        <view class="send-btn" bindtap="launchGroup">
             <image src="../../static/groupImg/Invitation.png"></image>
             <text>发起团购</text>
         </view>

+ 78 - 51
component/share/share.js

@@ -15,7 +15,11 @@ Component({
    */
   data: {
     shareFlag: true,
-    imgUrls: ''
+    imgUrls: '',
+    avatar: '',
+    author: '',
+    iconImg: '',
+    title: '',
   },
 
   /**
@@ -33,45 +37,59 @@ Component({
       ctx.setFillStyle('#fff')
       ctx.fill()
       ctx.arc(185, 48, 37, 0, 2 * Math.PI, false)
-      ctx.clip();//画了圆 再剪切  原始画布中剪切任意形状和尺寸。一旦剪切了某个区域,则所有之后的绘图都会被限制在被剪切的区域内  
-      ctx.drawImage('../../../static/groupImg/Bitmap1.png', 148, 8, 100, 100);   //插入图片  
+      ctx.clip(); //画了圆 再剪切  原始画布中剪切任意形状和尺寸。一旦剪切了某个区域,则所有之后的绘图都会被限制在被剪切的区域内  
+      ctx.drawImage(this.data.avatar, 148, 8, 100, 100); //插入图片  
       ctx.restore(); //恢复之前保存的绘图上下文 恢复之前保存的绘图上下午即状态 可以继续绘制
       ctx.setFontSize(20)
-      ctx.setFillStyle('#000')
-      ctx.fillText('喔喔', 166, 115)
+      ctx.setFillStyle('#535353')
+      ctx.fillText(this.data.author, (370 - ctx.measureText(this.data.author).width) / 2, 115)
       ctx.setFillStyle('#FF4400')
-      ctx.fillText('郎朗读书声是世上最美的声音', 50, 138) 
-      ctx.drawImage('../../../static/groupImg/Bitmap1.png', 9, 156, 352, 145);  
-      ctx.setFontSize(18)
-      ctx.setFillStyle('#000')
-      ctx.fillText('一年级语文上学期', 12, 329)
-      ctx.drawImage('../../../static/groupImg/Combined Shape.png', 11, 348, 196, 65);
-      ctx.drawImage('../../../static/groupImg/Rectangle 41.png', 134, 358, 59, 20);
-      ctx.setFontSize(14)  
-      ctx.setFillStyle('#fff')
-      ctx.fillText('五人团', 149, 373) 
-      ctx.setFontSize(16)  
-      ctx.setFillStyle('#A95A00')
-      ctx.fillText('原价', 24, 373)
-      ctx.setStrokeStyle('red')
-      ctx.moveTo(64, 368)
-      ctx.lineTo(114, 368)
-      ctx.stroke()
-      ctx.fillText('¥99元', 64, 373)
-      ctx.setFontSize(18)
-      ctx.fillText('团购价仅需', 20, 403)
-      ctx.fillText('元', 144, 403)
-      ctx.setFontSize(20)  
-      ctx.setFillStyle('red')
-      ctx.fillText('¥1', 109, 403) 
-      ctx.drawImage('../../../static/groupImg/share_bottom.png', 3, 419, 370, 192);  
-      ctx.setFontSize(20)
-      ctx.setFillStyle('red')
-      ctx.fillText('名额有限,售完截止', 9, 467)
-      ctx.setFontSize(18)
-      ctx.setFillStyle('#000')
-      ctx.fillText('长按识别二维码参加团购', 9, 493)
+      if (this.data.shareType === 'works') {
+        ctx.fillText('已使出洪荒之力,声情并茂的为', (370 - ctx.measureText('已使出洪荒之力,声情并茂的为').width) / 2, 138)
+        ctx.fillText(`《${this.data.title}》`, (370 - ctx.measureText(`《${this.data.title}》`).width) / 2, 160)
+        ctx.fillText(`配了一段惊世之作`, (370 - ctx.measureText(`配了一段惊世之作`).width) / 2, 182)
+        // ctx.drawImage(this.data.iconImg, 9, 205, 352, 145);
+        ctx.setFontSize(18)
+        ctx.setFillStyle('#000')
+        ctx.drawImage('../../../static/groupImg/share_bottom.png', 3, 419, 370, 192);
+        ctx.setFontSize(20)
+        ctx.setFillStyle('red')
+        ctx.fillText('为TA疯狂打CALL', 9, 467)
+        ctx.setFontSize(18)
+        ctx.setFillStyle('#000')
+        ctx.fillText('长按识别二维码,快去听听', 9, 493)
+
+      } else {
+        ctx.fillText('郎朗读书声是世上最美的声音', 50, 138)
+        ctx.drawImage('../../../static/groupImg/Combined Shape.png', 11, 348, 196, 65);
+        ctx.drawImage('../../../static/groupImg/Rectangle 41.png', 134, 358, 59, 20);
+        ctx.setFontSize(14)
+        ctx.setFillStyle('#fff')
+        ctx.fillText('五人团', 149, 373)
+        ctx.setFontSize(16)
+        ctx.setFillStyle('#A95A00')
+        ctx.fillText('原价', 24, 373)
+        ctx.setStrokeStyle('red')
+        ctx.moveTo(64, 368)
+        ctx.lineTo(114, 368)
+        ctx.stroke()
+        ctx.fillText('¥99元', 64, 373)
+        ctx.setFontSize(18)
+        ctx.fillText('团购价仅需', 20, 403)
+        ctx.fillText('元', 144, 403)
+        ctx.setFontSize(20)
+        ctx.setFillStyle('red')
+        ctx.fillText('¥1', 109, 403)
+        ctx.drawImage('../../../static/groupImg/share_bottom.png', 3, 419, 370, 192);
+        ctx.setFontSize(20)
+        ctx.setFillStyle('red')
+        ctx.fillText('名额有限,售完截止', 9, 467)
+        ctx.setFontSize(18)
+        ctx.setFillStyle('#000')
+        ctx.fillText('长按识别二维码参加团购', 9, 493)
+      }
       ctx.drawImage('../../../static/groupImg/code.png', 217, 374, 135, 135);
+      console.log(ctx)
       ctx.draw(true, function (res) {
         wx.canvasToTempFilePath({
           x: 0,
@@ -81,30 +99,39 @@ Component({
           destWidth: 370,
           destHeight: 507,
           canvasId: 'myCanvas',
-          success:(res) => {
-              console.log(res.tempFilePath)
-              // wx.saveImageToPhotosAlbum({
-              //   filePath: res.path,
-              //   success(res) {
-              //     console.log(res);
-              //    }
-              // })
-              that.setData({
-                imgUrls: res.tempFilePath
-              })
+          success: (res) => {
+            console.log(res.tempFilePath)
+            // wx.saveImageToPhotosAlbum({
+            //   filePath: res.path,
+            //   success(res) {
+            //     console.log(res);
+            //    }
+            // })
+            that.setData({
+              imgUrls: res.tempFilePath
+            })
+          },
+          fail: (res) => {
+            console.log(res)
           }
         })
       })
     },
-    share: function () {
+    share: function (data) {
+      console.log(this.data)
+      console.log(data)
       this.setData({
-        shareFlag: !this.data.shareFlag
+        shareFlag: !this.data.shareFlag,
+        avatar: data.avatar,
+        author: data.author,
+        iconImg: data.iconImg,
+        title: data.title,
       })
     },
     PreservationImg: function () {
       wx.saveImageToPhotosAlbum({
         filePath: this.data.imgUrls,
-        success(res) { 
+        success(res) {
           console.log('保存成功')
         }
       })
@@ -113,4 +140,4 @@ Component({
       this.triggerEvent('customevent', {})
     }
   }
-})
+})

+ 1 - 1
component/share/share.wxml

@@ -13,7 +13,7 @@
        </view>
    </view>
    <view class="share-img" wx:if="{{imgUrls}}">
-       <image class="img" src="{{imgUrls}}"></image>
+       <cover-image class="img" src="{{imgUrls}}"></cover-image>
        <view class="Preservation">
            <image class="PreservationBg" src="../../static/groupImg/Preservation.png"></image>
            <text bindtap="PreservationImg">点我保存,并分享至朋友圈</text>

+ 1 - 1
component/share/share.wxss

@@ -10,7 +10,7 @@
 }
 
 .btn {
-    position: absolute;
+    position: fixed;
     bottom: 0;
     width: 100%;
     height: 290rpx;

+ 2 - 0
pages/groupPage/collage-details/collage-details.js

@@ -44,6 +44,7 @@ Page({
   },
   //显示分享页 
   share: function () {
+    console.log(this.shareDialog)
     this.shareDialog.share();
   },
   /**
@@ -88,6 +89,7 @@ Page({
    */
   onReady: function () {
     this.shareDialog = this.selectComponent("#share-dialog");
+    
   },
 
   /**

+ 0 - 1
pages/groupPage/collage-details/collage-details.wxml

@@ -63,7 +63,6 @@
 <canvas canvas-id="myCanvas" style="width:370px; height: 507px; position: absolute; left: -99rpx; top: -999rpx;"></canvas>
 <shareDialog id="share-dialog" bindcustomevent="eventListener"/>
 
-<shareDialog id="share-dialog"/>
 <popup
     typeOf="sendSuccess"
     title="报告团长"

+ 132 - 47
pages/groupPage/group-details/group-details.js

@@ -17,7 +17,12 @@ Page({
     timeList: [],
     productId: '',
     groupId: '',
-    orderId: ''
+    orderId: '',
+    typeOf:'',
+    title: '',
+    headTextOne: '',
+    headTextTwo: '',
+    content: [],
   },
   //跳转到年级
   gradeDetails: function () {
@@ -39,9 +44,6 @@ Page({
       groupId
     }).success( (res) =>{
       console.log('发起团购',res);
-      // wx.navigateTo({
-      //   url: `/pages/groupPage/collage-details/collage-details`
-      // })
       if(res.data.message) {
         wx.showModal({
           title: '提示',
@@ -56,8 +58,11 @@ Page({
         })
         return false;
       }
-      //掉起支付
-      this.prePayMap(res.data.data.prePayMap, res.data.data.groupPurchaseOrderDetail.orderId);
+      if(res.data.data.groupPurchaseOrder.groupType === 'BASE') {
+        //掉起支付
+        this.prePayMap(res.data.data.prePayMap, res.data.data.groupPurchaseOrderDetail.orderId);
+      }
+
     }).fail( (error) => {
       
     })
@@ -81,9 +86,9 @@ Page({
           }
         })
         return false;
-      }
+      }  
       //掉起支付
-      this.prePayMap(res.data.data.prePayMap, res.data.data.groupPurchaseOrderDetail.orderId);
+      this.prePayMap(res.data.data.prePayMap, res.data.data.orderId);
     }).fail( (error) => {
       
     })
@@ -108,25 +113,14 @@ Page({
             content: '支付成功',
             success (res) {
               if (res.confirm) {
-                that.popup.close();
-                // setTimeout(() => {
-                //   wx.navigateTo({
-                //     url: `/pages/groupPage/collage-details/collage-details?orderId=${orderId}`
-                //   })
-                //   wx.setNavigationBarTitle({
-                //     title: '拼团详情'
-                //   })
-                // }, 1000)
+                //获取拼团信息
+                this.jionSuccess(this.data.orderId);
+                this.groupSuccess(orderId);
+
               } else if (res.cancel) {
-                that.popup.close();
-                setTimeout(() => {
-                  wx.navigateTo({
-                    url: `/pages/groupPage/collage-details/collage-details?orderId=${orderId}`
-                  })
-                  wx.setNavigationBarTitle({
-                    title: '拼团详情'
-                  })
-                }, 1000)                
+                //获取拼团信息
+                this.jionSuccess(this.data.orderId);                
+                this.groupSuccess(orderId);
               }
             }
           })
@@ -141,6 +135,115 @@ Page({
   collage: function () {
 
   },
+  //拼团详情
+  jionSuccess: function (orderId) {
+    httpRequestApi.getMygroupInfo(orderId).success( res => {
+      console.log('拼团详情', res.data.data);
+      const surplusNum = res.data.data.groupPurchaseOrder.headcount - res.data.data.groupPurchaseOrder.joinCount;
+      for(var i = 0; i < surplusNum; i++) {
+        this.data.surplusList.push(1);
+      }
+      console.log(res.data.data.groupPurchaseOrder.closeTimed - res.data.data.groupPurchaseOrder.gmtCreated)
+      //时间转换
+      const timeList = util.formatTime(res.data.data.groupPurchaseOrder.closeTimed - res.data.data.groupPurchaseOrder.gmtCreated);
+      this.setData({
+        surplusNum,
+        joinUserList: res.data.data.joinUserList,
+        surplusList: this.data.surplusList,
+        timeList,
+      })
+    }).fail( error => {
+      console.log('错误', error)
+    })    
+  },
+
+  //拼团是否成功并弹窗
+  groupSuccess: function (orderId) {
+    httpRequestApi.groupSuccess(orderId).success( res => {
+      console.log('团购是否成功',res.data.data)
+      const status = res.data.data.status;
+      const uid = res.data.data.uid;
+      if(status == 'successed') {
+
+        if(wx.getStorageSync(uid) == uid) {
+          this.setData({
+            typeOf: 'success',
+            title: '恭喜 !',
+            headTextOne: '您发起的团购拼团成功',
+            content: [
+              {
+                  text: "领袖体质魅力无穷!",
+                  color: "#000"
+              },
+              {
+                  text: " 您可以继续发起新的团购,",
+                  color: "#000"
+              },
+              {
+                text: " 不再需要支付本课程费用,拼团成功,",
+                color: "#FF9B00"
+              },                          
+              {
+                  text: " 您将得到xxx元奖励。",
+                  color: "#FF0000"
+              }
+            ],
+          })
+        }else {
+          this.setData({
+            typeOf: 'success',
+            title: '拼团成功 ! ',
+            headTextOne: '您参与的团购拼团成功',
+            headTextTwo: '订单号:12344',
+            content: [
+              {
+                  text: "感谢团长的分享",
+                  color: "#000"
+              },
+              {
+                  text: " 您也可以发起新的团购分享给需要的朋友们,",
+                  color: "#000"
+              },
+              {
+                  text: "作为新的发起人,您无需在支付本课程费用;",
+                  color: "#FF0000"
+              },
+              {
+                text: "团购成功,您将得到xxx元奖励。",
+                color: "#FF0000"
+              }                          
+            ],
+          })
+        }
+      }else {
+        setTimeout(() => {
+          wx.navigateTo({
+            url: `/pages/groupPage/collage-details/collage-details?orderId=${orderId}`
+          })
+          wx.setNavigationBarTitle({
+            title: '拼团详情'
+          })
+        }, 1000)
+      }
+    }).fail( error => {
+      console.log('错误', eroor)
+    })    
+  },
+  //再次发起团
+  group: function () {
+    wx.showModal({
+      title: '提示',
+      content: '再次发起团',
+      success (res) {
+        if (res.confirm) {
+          console.log('用户点击确定')
+        } else if (res.cancel) {
+          console.log('用户点击取消')
+        }
+      }
+    })
+  },
+
   /**
    * 生命周期函数--监听页面加载
    */
@@ -158,7 +261,7 @@ Page({
       orderId
     })
     //课本详情
-    httpRequestApi.getBookDetail(productId).success( (res) =>{
+    httpRequestApi.getBookDetail(wx.getStorageSync('uid'), productId).success( (res) =>{
       console.log('课本详情',res.data.data);
       const bookInfo = res.data.data.product;
       const lessonList = res.data.data.lessonList;
@@ -181,26 +284,8 @@ Page({
     }).fail( (error) => {
 
     })
-    //拼团详情
-    httpRequestApi.getMygroupInfo(orderId).success( res => {
-      console.log('支付详情', res.data.data);
-      const surplusNum = res.data.data.groupPurchaseOrder.headcount - res.data.data.groupPurchaseOrder.joinCount;
-      for(var i = 0; i < surplusNum; i++) {
-        this.data.surplusList.push(1);
-      }
-      console.log(res.data.data.groupPurchaseOrder.closeTimed - res.data.data.groupPurchaseOrder.gmtCreated)
-      //时间转换
-      const timeList = util.formatTime(res.data.data.groupPurchaseOrder.closeTimed - res.data.data.groupPurchaseOrder.gmtCreated);
-      this.setData({
-        surplusNum,
-        joinUserList: res.data.data.joinUserList,
-        surplusList: this.data.surplusList,
-        timeList,
-      })
-    }).fail( error => {
-      console.log('错误', error)
-    })
-    
+    //获取拼团信息
+    this.jionSuccess(orderId);
   },
 
   /**

+ 6 - 1
pages/groupPage/group-details/group-details.json

@@ -1 +1,6 @@
-{}
+{
+    "component": true,
+    "usingComponents": {
+        "popup": "/component/popup/popup"
+    }  
+}

+ 12 - 2
pages/groupPage/group-details/group-details.wxml

@@ -14,7 +14,8 @@
             </block>                      
         </view>
         <view class="shengyu">
-            <view class="shengyu-num">仅剩<text>{{surplusNum}}</text>个名额就拼团成功了</view>
+            <view class="shengyu-num" hidden="{{surplusNum == '0'}}">仅剩<text>{{surplusNum}}</text>个名额就拼团成功了</view>
+            <view class="shengyu-num" hidden="{{surplusNum != '0'}}">拼团成功</view>
             <view class="shengyu-time">
                 剩余时间:
                 <view class="time">
@@ -65,4 +66,13 @@
             <text>参团</text>
         </view>
     </view>
-</view>
+</view>
+
+<popup
+    typeOf="{{typeOf}}"
+    title="{{title}}"
+    headTextOne="{{headTextOne}}"
+    headTextTwo="{{headTextTwo}}"
+    content="{{content}}"
+    bindGroup="group"
+></popup>

+ 139 - 0
pages/groupPage/make-money/make-money.js

@@ -0,0 +1,139 @@
+// pages/groupPage/make-money/make-money.js
+import httpRequestApi from '../../../utils/APIClient';
+import util from '../../../utils/util';
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    joinUserList: [],
+    surplusList: [],
+    timeList: [],
+    productId: '',
+    orderId: '',
+    groupId: ''
+  },
+  //显示分享页 
+  share: function () {
+    this.shareDialog.share();
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    wx.setNavigationBarTitle({
+      title: '邀请赚取奖学金'
+    })
+    console.log(options.id);
+    if(!options.id) {
+      return false;
+    }
+    const orderId = options.id;
+    const productId = options.productId;
+    const groupId = options.groupId;
+    this.setData({
+      orderId,
+      productId,
+      groupId
+    })
+    httpRequestApi.getMygroupInfo(orderId).success( res => {
+      console.log('支付详情', res.data.data);
+      const surplusNum = res.data.data.groupPurchaseOrder.headcount - res.data.data.groupPurchaseOrder.joinCount;
+      for(var i = 0; i < surplusNum; i++) {
+        this.data.surplusList.push(1);
+      }
+      //console.log(res.data.data.groupPurchaseOrder.closeTimed - res.data.data.groupPurchaseOrder.gmtCreated)
+      //时间转换
+      const timeList = util.formatTime(res.data.data.groupPurchaseOrder.closeTimed - res.data.data.groupPurchaseOrder.gmtCreated);
+      this.setData({
+        surplusNum,
+        joinUserList: res.data.data.joinUserList,
+        surplusList: this.data.surplusList,
+        timeList,
+        productId: res.data.data.groupPurchaseOrder.productId,
+        groupId: res.data.data.groupPurchaseOrder.groupId
+      })
+    }).fail( error => {
+      console.log('错误', error)
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+    this.shareDialog = this.selectComponent("#share-dialog");
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {;
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+    if (ops.from === 'button') {
+      console.log(ops.target)
+    }
+    const productId = this.data.productId;
+    const groupId = this.data.groupId;
+    const id = this.data.orderId;
+    return {
+      title: '小学课文朗读',
+      path: `pages/groupPage/group-details/group-details?productId=${productId}&id=${id}&groupId=${groupId}`,
+      imageUrl: '../../../static/groupImg/shareBg.png',
+      success: function (res) {
+        // 转发成功
+        console.log("转发成功:" + JSON.stringify(res));
+        var shareTickets = res.shareTickets;
+        // if (shareTickets.length == 0) {
+        //   return false;
+        // }
+        // //可以获取群组信息
+        // wx.getShareInfo({
+        //   shareTicket: shareTickets[0],
+        //   success: function (res) {
+        //     console.log(res)
+        //   }
+        // })
+      },
+      fail: function (res) {
+        // 转发失败
+        console.log("转发失败:" + JSON.stringify(res));
+      }
+    }
+  }
+})

+ 6 - 0
pages/groupPage/make-money/make-money.json

@@ -0,0 +1,6 @@
+{
+    "component": true,
+    "usingComponents": {
+        "shareDialog": "/component/share/share"
+    }
+  }

+ 47 - 0
pages/groupPage/make-money/make-money.wxml

@@ -0,0 +1,47 @@
+<!--pages/groupPage/make-money/make-money.wxml-->
+<view class="details-head">
+    <view class="headImg">
+        <block wx:for="{{joinUserList}}" wx:key="{{index}}">
+            <view class="headImg-item">
+                <image src="{{item.avatar}}"></image>
+            </view>
+        </block>
+        <block wx:for="{{surplusList}}" wx:key="{{index}}">
+            <view class="headImg-item">
+                <image src="../../../static/groupImg/no_head.png"></image>
+            </view>  
+        </block>                   
+    </view>
+    <view class="shengyu">
+        <view class="shengyu-num">仅剩<text>{{surplusNum}}</text>个名额就拼团成功了</view>
+        <view class="shengyu-time">
+            剩余时间:
+            <view class="time">
+                <image src="../../../static/groupImg/Rectangle_31.png"></image>
+                <text>{{timeList[0]}}</text>
+            </view>
+            天
+            <block wx:for="{{timeList[1]}}" wx:key="{{index}}">
+                <view class="time">
+                    <image src="../../../static/groupImg/Rectangle_31.png"></image>
+                    <text>{{item}}</text>
+                </view>
+            </block>
+            时             
+            <block wx:for="{{timeList[2]}}" wx:key="{{index}}">
+                <view class="time">
+                    <image src="../../../static/groupImg/Rectangle_31.png"></image>
+                    <text>{{item}}</text>
+                </view>
+            </block>               
+            分             
+        </view>
+    </view>
+    <view class="invitation-btn" bindtap="share">
+        <image src="../../../static/groupImg/Invitation.png"></image>
+        <text>邀请朋友参加</text>
+    </view>
+</view>  
+
+<canvas canvas-id="myCanvas" style="width:370px; height: 507px; position: absolute; left: -99rpx; top: -999rpx;"></canvas>
+<shareDialog id="share-dialog" bindcustomevent="eventListener"/>

+ 97 - 0
pages/groupPage/make-money/make-money.wxss

@@ -0,0 +1,97 @@
+/* pages/groupPage/make-money/make-money.wxss */
+.details-head {
+    width: 100%;
+    height: 78%;
+    margin-top: 12rpx;
+    background: #fff;
+}
+
+.headImg {
+    display: flex;
+    flex-wrap: wrap;
+    padding: 40rpx 0;
+    box-sizing: border-box;
+}
+
+.headImg-item {
+    width: 106rpx;
+    height: 106rpx;
+    border-radius: 50%;
+    margin: 20rpx 22rpx;
+}
+
+.headImg-item image {
+    width: 100%;
+    height: 100%;
+    border-radius: 50%;
+}
+
+.shengyu {
+ display: flex;
+ flex-direction: column;   
+ color: #696969;
+}
+
+.shengyu-num {
+    text-align:center;    
+}
+
+.shengyu-num text {
+    color: #FF4330;
+}
+
+.shengyu-time {
+    display: flex;
+    justify-content: center;
+    align-items: center; 
+    margin-top: 8rpx;  
+}
+
+.shengyu-time .time {
+    position: relative;
+    width: 20rpx;
+    height: 40rpx;
+    margin:  0 8rpx;
+}
+
+.shengyu-time .time image {
+    width: 24rpx;
+    height: 40rpx;
+}
+
+.shengyu-time .time  text{
+    position: absolute;
+    left: 2rpx;
+    top: 0;
+    z-index: 2;
+    color: #fff;
+    font-size: 28rpx;
+}
+
+.invitation-btn {
+    position: absolute;
+    left: 50%;
+    top: 65%;
+    transform: translate(-50%);
+    width: 434rpx;
+    height: 80rpx;
+}
+
+.invitation-btn image{
+    position: absolute;
+    left: 0;
+    top: 0;
+    width: 100%;
+    height: 100%;
+}
+
+.invitation-btn text{
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    display: inline-block;
+    text-align: center;
+    line-height: 80rpx;
+    z-index: 2;
+    color: #fff;
+}

+ 90 - 1
pages/groupPage/my-group/my-group.js

@@ -6,7 +6,15 @@ Page({
    * 页面的初始数据
    */
   data: {
-    myGroupList: []
+    myGroupList: [],
+    typeOf:'',
+    title: '',
+    headTextOne: '',
+    headTextTwo: '',
+    content: [],    
+    productId: '',
+    orderId: '',
+    groupId: ''
   },
     //跳转到团购详情页
   collageDetails: function ({currentTarget}) {
@@ -29,11 +37,92 @@ Page({
       this.setData({
         myGroupList: res.data.data.list
       })
+      res.data.data.list.forEach(element => {
+        console.log(element.status)
+        if(element.status == 'successed') {
+          this.setData({
+            productId: element.productId,
+            orderId: element.id,
+            groupId: element.groupId
+          })
+          if(wx.getStorageSync(uid) == element.organizer) {
+            this.setData({
+              typeOf: 'success',
+              title: '恭喜 !',
+              headTextOne: '您发起的团购拼团成功',
+              content: [
+                {
+                    text: "领袖体质魅力无穷!",
+                    color: "#000"
+                },
+                {
+                    text: " 您可以继续发起新的团购,",
+                    color: "#000"
+                },
+                {
+                  text: " 不再需要支付本课程费用,拼团成功,",
+                  color: "#FF9B00"
+                },                          
+                {
+                    text: " 您将得到xxx元奖励。",
+                    color: "#FF0000"
+                }
+              ],
+            })
+          }else {
+            this.setData({
+              typeOf: 'success',
+              title: '拼团成功 ! ',
+              headTextOne: '您参与的团购拼团成功',
+              headTextTwo: '订单号:12344',
+              content: [
+                {
+                    text: "感谢团长的分享",
+                    color: "#000"
+                },
+                {
+                    text: " 您也可以发起新的团购分享给需要的朋友们,",
+                    color: "#000"
+                },
+                {
+                    text: "作为新的发起人,您无需在支付本课程费用;",
+                    color: "#FF0000"
+                },
+                {
+                  text: "团购成功,您将得到xxx元奖励。",
+                  color: "#FF0000"
+                }                          
+              ],
+            })
+          }
+        }
+      });
     }).fail( error => {
       console.log('错误', error)
     })
   },
 
+  //再次发起团
+  group: function () {
+    // wx.showModal({
+    //   title: '提示',
+    //   content: '再次发起团',
+    //   success (res) {
+    //     if (res.confirm) {
+    //       console.log('用户点击确定')
+    //     } else if (res.cancel) {
+    //       console.log('用户点击取消')
+    //     }
+    //   }
+    // })
+    const productId = this.data.productId;
+    const groupId = this.data.groupId;
+    const id = this.data.orderId;
+    wx.navigateTo({
+      url: `/pages/groupPage/make-money/make-money?productId=${productId}&id=${id}&groupId=${groupId}`
+    })  
+  },
+
   /**
    * 生命周期函数--监听页面初次渲染完成
    */

+ 6 - 1
pages/groupPage/my-group/my-group.json

@@ -1 +1,6 @@
-{}
+{
+    "component": true,
+    "usingComponents": {
+        "popup": "/component/popup/popup"
+    }  
+}

+ 9 - 0
pages/groupPage/my-group/my-group.wxml

@@ -12,3 +12,12 @@
         </view>
     </scroll-view>
 </view>
+
+<popup
+    typeOf="{{typeOf}}"
+    title="{{title}}"
+    headTextOne="{{headTextOne}}"
+    headTextTwo="{{headTextTwo}}"
+    content="{{content}}"
+    bindGroup="group"
+></popup>

+ 0 - 1
pages/index/index.js

@@ -81,7 +81,6 @@ Page({
       hotInit(this);
     }
     if (myIndex == 2) {
-      console.log('follow')
       followInit(this);
     }
     if (myIndex == 3) {

+ 39 - 17
pages/main/class/class.js

@@ -1,5 +1,7 @@
 import httpRequestApi from '../../../utils/APIClient';
-import {formatDate} from '../../../utils/util';
+import {
+  formatDate
+} from '../../../utils/util';
 Page({
   data: {
     fullScreenBtn: false,
@@ -9,7 +11,11 @@ Page({
     title: '',
     poster: '',
     works: [],
-    total: ''
+    total: '',
+    title: '',
+    id: '',
+    iconImg: '',
+    collectFlag: false,
   },
   onLoad: function (option) {
     console.log(option);
@@ -20,23 +26,35 @@ Page({
       title: option.title,
       id: option.id
     })
-    let uid = wx.getStorageSync('uid');;
 
-    httpRequestApi.getClassDetail(uid, option.id).success(res => {
+    this.uid = wx.getStorageSync('uid');;
+
+    httpRequestApi.getClassDetail(this.uid, option.id).success(res => {
       console.log(res);
       this.setData({
         title: res.data.data.title,
-        videoUrl: res.data.data.playUrl
+        videoUrl: res.data.data.playUrl,
+        iconImg: res.data.data.iconImg
+      })
+      this.getReadInfo(1, 10);
+      this.checkLike();
+    })
+  },
+  // 检查是否收藏
+  checkLike: function () {
+    httpRequestApi.classIsLike(this.uid, {
+      targetCode: this.data.id
+    }).success(res => {
+      this.setData({
+        collectFlag: res.data.data
       })
-      this.getReadInfo(1,10);
     })
   },
-
   goToReading: function () {
     let id = this.data.id;
     let title = this.data.title;
     wx.navigateTo({
-      url: `../../main/reading/reading?id=${id}&title=${this.data.title}&img=${this.data.img}&video=${this.data.videoUrl}`
+      url: `../../main/reading/reading?id=${id}&title=${this.data.title}&img=${this.data.iconImg}&video=${this.data.videoUrl}`
     })
   },
   goToWorks: function (e) {
@@ -50,22 +68,26 @@ Page({
     })
   },
   collect: function (e) {
-    let uid =  wx.getStorageSync('uid');
+    // let uid =  wx.getStorageSync('uid');
     let data = {
-      
+      targetCode: this.data.id,
+      title: this.data.title,
+      iconImg: this.data.iconImg
     }
-    httpRequestApi.collectBook(uid, data).success(res => {
-      console.log(res);
+    httpRequestApi.collectClass(this.uid, data).success(res => {
+      this.setData({
+        collectFlag: !this.data.collectFlag
+      })
     })
   },
-  getReadInfo: function(pageNo,pageSize){
-    const uid =  wx.getStorageSync('uid');
+  getReadInfo: function (pageNo, pageSize) {
+    // const uid =  wx.getStorageSync('uid');
     const data = {
-      lessonId: 1 ,
+      lessonId: 1,
       pageNo: pageNo,
       pageSize: pageSize
     };
-    httpRequestApi.getClassRead(uid,data).success(res=>{
+    httpRequestApi.getClassRead(this.uid, data).success(res => {
       const readInfo = res.data.data.list;
       const readTemp = [];
       readInfo.forEach(item => {
@@ -85,7 +107,7 @@ Page({
     });
   },
   // 下拉加载
-  scrollUpdate:function(e){
+  scrollUpdate: function (e) {
     console.log(e)
   }
 })

+ 3 - 3
pages/main/class/class.wxml

@@ -19,9 +19,9 @@
     </scroll-view>
     <view class="footSection">
         <image class="blackbord" src="../../../static/image/blackbord.png" />
-        <view class="collectBtn footerBtn">
-            <image src="../../../static/image/collected.png" />
-            <text>收藏</text>
+        <view class="collectBtn footerBtn" bindtap="collect">
+            <image src=" {{collectFlag ? '../../../static/image/collected.png' : '../../../static/image/no_collect.png'}}" />
+            <text>{{collectFlag ? '取消收藏' : '收藏'}}</text>
         </view>
         <view class="readingBtn footerBtn" bindtap="goToReading">
             <image class="microphone" src="../../../static/image/microphone.png" />

+ 2 - 1
pages/main/singleBook/singleBook.js

@@ -11,12 +11,13 @@ Page({
             title: options.title
         })
         const uid= wx.getStorageSync('uid');
+        console.log(options.id)
         httpRequestApi.getBookDetail(uid, options.id).success((res) => {
             console.log(res.data.data)
             const bookInfo = res.data.data.product;
             const lessonList = res.data.data.lessonList;
             this.setData({
-                titleIcon: bookInfo.iconImg,
+                titleIcon: bookInfo.bgImg,
                 title: bookInfo.title,
                 bookInfo: bookInfo.description
             })

+ 54 - 9
pages/social/replyDetail/replyDetail.js

@@ -1,12 +1,14 @@
 import httpRequestApi from '../../../utils/APIClient';
-import {formatDate} from '../../../utils/util';
+import {
+    formatDate
+} from '../../../utils/util';
 Page({
     data: {
         class1: 'commentItem commentItemFirst',
         classNormal: 'commentItem',
         postId: '',
-        comment:[]
-        
+        comment: []
+
     },
     onLoad: function (option) {
         console.log(option)
@@ -14,14 +16,16 @@ Page({
             postId: option.id
         })
         wx.setNavigationBarTitle({
-            title: option.count + '条回复'//页面标题为路由参数
+            title: option.count + '条回复' //页面标题为路由参数
         })
+        this.uid = wx.getStorageSync('uid');
         this.getReplyDetail();
     },
     // 查询回复详情
     getReplyDetail: function () {
-        let uid = wx.getStorageSync('uid');
-        httpRequestApi.getReplyComment(uid, this.data.postId).success((res) => {
+        // let uid = wx.getStorageSync('uid');
+        httpRequestApi.getReplyComment(this.uid, this.data.postId).success((res) => {
+            debugger;
             console.log(res);
             const replyList = res.data.data.replyVOList;
             const replied = res.data.data;
@@ -29,7 +33,7 @@ Page({
             const authorDetail = {};
             authorDetail.name = replied.user.wechatName;
             authorDetail.text = replied.detailDesc;
-            authorDetail.time = formatDate(replied.gmtCreated,3);
+            authorDetail.time = formatDate(replied.gmtCreated, 3);
             authorDetail.likes = replied.postsAttributeInfo.favors;
             authorDetail.avatar = replied.user.avatar;
             replyTemp.push(authorDetail);
@@ -37,8 +41,9 @@ Page({
                 const temp = {};
                 temp.name = item.user.wechatName;
                 temp.text = item.content;
-                temp.time = formatDate(item.gmtCreated,3);
+                temp.time = formatDate(item.gmtCreated, 3);
                 temp.likes = 0;
+                temp.id = item.postId;
                 temp.avatar = item.user.avatar;
                 replyTemp.push(temp);
                 console.log(replyTemp);
@@ -47,5 +52,45 @@ Page({
                 comment: replyTemp
             })
         });
-    }
+    },
+    // 点赞评论
+    likeCommend: function (e) {
+        console.log(e);
+        // let uid = wx.getStorageSync('uid');
+        let followUid = e.currentTarget.dataset.id;
+        let index = e.currentTarget.dataset.index;
+        httpRequestApi.likeCommend(this.uid, followUid).success(res => {
+            console.log(res);
+            const str = `comment[${index}].likes`;
+            this.setData({
+                [str]: res.data.data.favors
+            })
+        });
+    },
+    // 设置点击时的id
+    setSBId: function (e) {
+        console.log(e)
+        this.setData({
+            // replySBId: e.currentTarget.dataset.id,
+            replyModal: true
+        })
+    },
+    // 回复某个评论
+    replySB: function () {
+        const data = {
+            postsId: this.data.postId,
+            content: this.data.inputSBValue
+        }
+        httpRequestApi.postReplyComment(this.uid, data).success(res => {
+            this.setData({
+                replyModal: false
+            })
+        });
+    },
+    // 获取回复楼中楼的内容
+    inputSBValue: function (e) {
+        this.setData({
+            inputSBValue: e.detail.value
+        });
+    },
 })

+ 19 - 15
pages/social/replyDetail/replyDetail.wxml

@@ -1,16 +1,20 @@
- <view class="commentArea">
-        <view class="{{index === 0? class1 : classNormal}}" wx:for="{{comment}}" wx:key="{{index}}" >
-            <image class="avatar" src="{{item.avatar}}" />
-            <view class="commentCore">
-                <text class="nickName">{{item.name}}</text>
-                <text class="time">{{item.time}}</text>
-                <text class="gut">{{item.text}}</text>
-            </view>
-            <view class="btnWrapper">
-                <image class="commentBtn" src="../../../static/image/comment.png" wx:if="{{index===0}}" />
-                <text class="commentText" wx:if="{{index===0}}">评论</text>
-                <image class="likeBtn" src="../../../static/image/like.png" />
-                <text class="likeText">{{item.likes}}</text>
-            </view>
+<view class="commentArea">
+    <view class="{{index === 0? class1 : classNormal}}" wx:for="{{comment}}" wx:key="{{index}}">
+        <image class="avatar" src="{{item.avatar}}" />
+        <view class="commentCore">
+            <text class="nickName">{{item.name}}</text>
+            <text class="time">{{item.time}}</text>
+            <text class="gut">{{item.text}}</text>
         </view>
-    </view>
+        <view class="btnWrapper">
+            <image class="commentBtn" src="../../../static/image/comment.png" wx:if="{{index===0}}" bindtap="setSBId" />
+            <text class="commentText" wx:if="{{index===0}}">评论</text>
+            <!-- <image class="likeBtn" data-index="{{index}}" data-likes="{{item.likes}}" data-id="{{item.id}}" src="../../../static/image/like.png" bindtap="likeCommend" /> -->
+            <!-- <text class="likeText" >{{item.likes}}</text> -->
+        </view>
+    </view>
+    <!-- 评论框 -->
+    <view class="replySection" wx:if="{{replyModal}}">
+        <input bindblur="bindTextAreaBlur" bindconfirm="replySB" confirm-type="send" placeholder="回复" bindinput="inputSBValue" auto-focus auto-height />
+    </view>
+</view>

+ 12 - 0
pages/social/replyDetail/replyDetail.wxss

@@ -87,4 +87,16 @@
     width: 32rpx;
     height: 28rpx;
     margin-left: 8rpx;
+}
+.replySection{
+    width: 100%;
+    height: 300rpx;
+    position: fixed;
+    bottom: 0;
+    background: #eee;
+}
+.replySection input{
+    width: 100%;
+    height: 300rpx;
+    text-indent: 4rpx;
 }

+ 142 - 30
pages/social/works/works.js

@@ -12,27 +12,38 @@ Page({
         total: '',
         authorAvatar: '',
         user: [],
-        inputValue: 'smdx',
+        inputValue: '',
+        inputSBValue:'',
         replyList: [],
-        howMuch: '2000',
+        howMuch: '200',
         moneySelect: 'moneySelect',
-        moneyNormal: 'moneyNormal'
+        moneyNormal: 'moneyNormal',
+        ifReward: false,
+        id: '',
+        replyModal: false
+        // shareFlag: false
     },
     onLoad: function (option) {
-        if (option.title) {
-            wx.setNavigationBarTitle({
-                title: option.title //页面标题为路由参数
-            })
-            this.setData({
-                title: option.title,
-                id: option.id
-            })
-        }
-        let uid = wx.getStorageSync('uid');
-        this.getWorks(uid, option.id);
+        console.log(option)
+
+        wx.setNavigationBarTitle({
+            title: option.title //页面标题为路由参数
+        })
+
+        this.setData({
+            title: option.title,
+            id: option.id
+        })
+        this.uid = wx.getStorageSync('uid');
+        this.getWorks(this.uid, option.id);
     },
+    // onReady: function () {
+
+    // },
     getWorks: function (uid, id) {
         httpRequestApi.getWorksDetail(uid, id).success((res) => {
+            console.log(res);
+            console.log(id)
             const others = res.data.data.otherRead;
             const author = res.data.data.user;
             const works = res.data.data.userRead;
@@ -49,7 +60,10 @@ Page({
                 authorAvatar: author.avatar,
                 authorUid: author.uid,
                 videoSrc: works.originVideo,
-                audioSrc: works.audioPath
+                audioSrc: works.audioPath,
+                iconImg: works.iconImg,
+                isLike: res.data.data.isLike,
+                isFans: res.data.data.isFans,
             })
             // 设置音频路径
             this.innerAudioContext = wx.createInnerAudioContext();
@@ -60,8 +74,44 @@ Page({
             this.getReply();
         });
     },
+    likeWorks: function (e) {
+        if(this.data.isLike){
+            wx.showToast({
+                title: '不要重复点赞哦',
+                icon: 'fail',
+                duration: 1000
+              })
+            return;
+        }
+        httpRequestApi.likeWorks(this.uid, this.data.id).success(res => {
+            console.log(this.uid)
+            wx.showToast({
+                title: '点赞数+1',
+                icon: 'success',
+                duration: 1000
+              })
+        });
+    },
+    // 弹出分享框
+    openShare: function (e) {
+        // this.setData({
+        //     shareFlag: !this.data.shareFlag
+        // })
+        this.shareDialog = this.selectComponent("#share-dialog");
+        const data = {
+            avatar: this.data.authorAvatar,
+            author: this.data.author,
+            iconImg: this.data.iconImg,
+            title: this.data.title,
+            // tip: this.data.tip,
+        }
+        this.shareDialog.share(data);
+    },
     videoPlay: function () {
         this.innerAudioContext.play();
+        httpRequestApi.playWorks(this.uid, this.data.id).success(res => {
+
+        })
     },
     videoEnd: function () {
         this.innerAudioContext.stop();
@@ -73,7 +123,7 @@ Page({
         let id = this.data.id;
         let title = this.data.title;
         wx.navigateTo({
-            url: `../../main/reading/reading?id=${id}&title=${title}`
+            url: `../../main/reading/reading?id=${id}&title=${title}&img=${this.data.iconImg}&video=${this.data.videoSrc}`
         })
     },
     onShareAppMessage: function (res) {
@@ -87,10 +137,28 @@ Page({
         }
     },
     follow: function () {
-        let uid = wx.getStorageSync('uid');
-        let followUid = 2;
-        httpRequestApi.followUser(uid, followUid).success((res) => {
-            console.log(res)
+        // let uid = wx.getStorageSync('uid');
+        let followUid = this.data.authorUid;
+        httpRequestApi.followUser(this.uid, followUid).success((res) => {
+            wx.showToast({
+                title: !this.data.isFans? '取消关注' : '关注啦',
+                icon: 'success',
+                duration: 1000
+              })
+        });
+    },
+    // 点赞评论
+    likeCommend: function (e) {
+        console.log(e);
+        // let uid = wx.getStorageSync('uid');
+        let followUid = e.currentTarget.dataset.id;
+        let index = e.currentTarget.dataset.index;
+        httpRequestApi.likeCommend(this.uid, followUid).success(res => {
+            console.log(res);
+            const str = `replyList[${index}].likes`;
+            this.setData({
+                [str]: res.data.data.favors
+            })
         });
     },
     // 去其他用户的作品页
@@ -101,11 +169,11 @@ Page({
     },
     // 查询回复
     getReply: function () {
-        let uid = wx.getStorageSync('uid');
+        // let uid = wx.getStorageSync('uid');
         let columnId = this.data.id;
         let pageNo = 1;
         let pageSize = 10;
-        httpRequestApi.getReply(uid, columnId, pageNo, pageSize).success((res) => {
+        httpRequestApi.getReply(this.uid, columnId, pageNo, pageSize).success((res) => {
             console.log(res.data.data.list);
             const replyList = res.data.data.list;
             const replyTemp = [];
@@ -117,6 +185,7 @@ Page({
                 temp.id = item.id;
                 temp.replyCount = item.replyCount;
                 temp.time = formatDate(item.gmtCreated, 3);
+                temp.likes = item.postsAttributeInfo.favors || 0;
                 console.log(temp.time)
                 replyTemp.push(temp);
             });
@@ -145,32 +214,68 @@ Page({
     sendHandler: function () {
         console.log(this.data.inputValue);
         if (this.data.inputValue !== '') {
-            let uid = wx.getStorageSync('uid');
+            // let uid = wx.getStorageSync('uid');
             let data = {
                 "columnId": this.data.id,
                 colunmNames: 'what',
                 "detailDesc": this.data.inputValue
             }
-            httpRequestApi.postReply(uid, data).success(res => {
+            httpRequestApi.postReply(this.uid, data).success(res => {
                 console.log(res);
             });
         }
     },
+    // 设置点击时的id
+    setSBId: function(e){
+        console.log(e)
+        this.setData({
+            replySBId: e.currentTarget.dataset.id,
+            replyModal: true
+        })
+    },
+    // 回复某个评论
+    replySB: function () {
+        const data = {
+            postsId: this.data.replySBId,
+            content: this.data.inputSBValue
+        }
+        httpRequestApi.postReplyComment(this.uid, data).success(res => {
+            this.setData({
+                replyModal: false
+            })
+        });
+    },
+    // 获取回复楼中楼的内容
+    inputSBValue: function(e){
+        this.setData({
+            inputSBValue: e.detail.value
+        });
+    },
     // 选择金额
-    setMoney: function(e){
+    setMoney: function (e) {
         this.setData({
             howMuch: e.currentTarget.dataset.money
         })
     },
+    reward: function () {
+        this.setData({
+            ifReward: true
+        })
+    },
+    quitReward:function () {
+        this.setData({
+            ifReward: false
+        })
+    },
     // 奖励
     rewardMoney: function () {
         console.log(this.data.authorUid);
         const data = {
             targetUid: this.data.authorUid,
-            amount: "50"
+            amount: this.data.howMuch
         }
-        let uid = wx.getStorageSync('uid');
-        httpRequestApi.rewardMoney(uid, data).success(res => {
+        // let uid = wx.getStorageSync('uid');
+        httpRequestApi.rewardMoney(this.uid, data).success(res => {
             console.log(res);
             this.payMoneyt(res.data.data);
         })
@@ -192,15 +297,22 @@ Page({
                     content: '支付成功',
                     success(res) {
                         if (res.confirm) {
-                            console.log('点击确定')
+                            this.setData({
+                                ifReward: false
+                            })
                         } else if (res.cancel) {
-                            console.log('取消')
+                            this.setData({
+                                ifReward: false
+                            })
                         }
                     }
                 })
 
             },
             'fail': function (res) {
+                this.setData({
+                    ifReward: false
+                })
                 console.log('支付失败', res)
             }
         })

+ 7 - 1
pages/social/works/works.json

@@ -1 +1,7 @@
-{}
+{
+    "component": true,
+    "usingComponents": {
+        "shareDialog": "/component/share/share",
+        "popup": "/component/popup/popup"
+    }
+}

+ 22 - 13
pages/social/works/works.wxml

@@ -3,12 +3,12 @@
     <view class="readAuthorSection">
         <image class="avatar" src="{{authorAvatar}}" />
         <text class="nickName">{{author}}</text>
-        <view class="like">
+        <view class="like" bindtap="likeWorks">
             <image src="../../../static/image/liked.png" />
-            <text class="likeBtn">点赞</text>
+            <text class="likeBtn">{{isLike ? '已' : ''}}点赞</text>
         </view>
         <view class="follow">
-            <text class="followBtn" bindtap="follow">关注</text>
+            <text class="followBtn" bindtap="follow">{{isFans ? '已' : ''}}关注</text>
         </view>
     </view>
     <view class="userSection">
@@ -40,10 +40,10 @@
                 </view>
             </view>
             <view class="btnWrapper">
-                <image class="commentBtn" src="../../../static/image/comment.png" />
+                <image class="commentBtn" src="../../../static/image/comment.png" bindtap="setSBId" data-id="{{item.id}}" />
                 <text class="commentText">评论</text>
-                <image class="likeBtn" src="../../../static/image/like.png" />
-                <text class="likeText">165</text>
+                <image class="likeBtn" src="../../../static/image/like.png" data-index="{{index}}" data-likes="{{item.likes}}" data-id="{{item.id}}" bindtap="likeCommend" />
+                <text class="likeText">{{item.likes}}</text>
             </view>
         </view>
     </view>
@@ -57,31 +57,40 @@
             <image class="microphone" src="../../../static/image/microphone.png" />
             <text>我要朗读</text>
         </view>
-        <view class="shareBtn footerBtn">
-            <button open-type="share" plain="true" hover-class="none">
+        <view class="shareBtn footerBtn" bindtap="openShare">
+            <!-- <button open-type="share" plain="true" hover-class="none">
                 <image src="../../../static/image/share.png" />
                 <text>分享</text>
-            </button>
+            </button> -->
+            <image src="../../../static/image/share.png" />
+            <text>分享</text>
         </view>
     </view>
+    <!-- 评论框 -->
+    <view class="replySection" wx:if="{{replyModal}}">
+        <input bindblur="bindTextAreaBlur"  bindconfirm="replySB" confirm-type="send" placeholder="回复" bindinput="inputSBValue" auto-focus auto-height />
+    </view>
     <!-- 奖励弹窗 -->
-    <cover-view class="modalWrapper">
+    <cover-view class="modalWrapper" wx:if="{{ifReward}}">
         <cover-view class="rewardContent">
             <cover-image class="rewardWrapper" src="../../../static/image/reward_wrapper.png" />
             <cover-image class="rewardAvatar" src="{{authorAvatar}}" />
             <cover-view class="rewardNickName">奖励给朗读者:{{author}}</cover-view>
             <cover-view class="moneyArea">
-                <cover-view class="{{howMuch ==='1000' ? 'money moneySelect' : 'money moneyNormal'}}" bindtap="setMoney" data-money="1000">
+                <cover-view class="{{howMuch ==='100' ? 'money moneySelect' : 'money moneyNormal'}}" bindtap="setMoney" data-money="100">
                     1.0元
                 </cover-view>
-                <cover-view class="{{howMuch ==='2000' ? 'money moneySelect' : 'money moneyNormal'}}" bindtap="setMoney" data-money="2000">
+                <cover-view class="{{howMuch ==='200' ? 'money moneySelect' : 'money moneyNormal'}}" bindtap="setMoney" data-money="200">
                     2.0元
                 </cover-view>
-                <cover-view class="{{howMuch ==='3000' ? 'money moneySelect' : 'money moneyNormal'}}" bindtap="setMoney" data-money="3000">
+                <cover-view class="{{howMuch ==='300' ? 'money moneySelect' : 'money moneyNormal'}}" bindtap="setMoney" data-money="300">
                     3.0元
                 </cover-view>
             </cover-view>
             <cover-view class="rewardBtn" bindtap="rewardMoney">立即奖励</cover-view>
         </cover-view>
+        <cover-image class="quitBtn" bindtap="quitReward" src="../../../static/groupImg/cha.png" />
     </cover-view>
+    <canvas canvas-id="myCanvas" style="width:370px;z-index=99999; height: 507px; position: absolute; left: -99rpx; top: -999rpx;"></canvas>
+    <shareDialog id="share-dialog" shareType='works' />
 </view>

+ 27 - 4
pages/social/works/works.wxss

@@ -277,7 +277,7 @@
     margin-left: 80rpx
 }
 
-.shareBtn button {
+/* .shareBtn button {
     display: flex;
     flex-direction: column;
     outline: none;
@@ -293,12 +293,12 @@ button::after {
     height: 0;
     top: 0;
     left: 0
-}
+} */
 
 .shareBtn {
     margin-right: 80rpx;
     padding: 0;
-    background: #fff;
+    /* background: #fff; */
 }
 
 .footerBtn image {
@@ -409,6 +409,7 @@ button::after {
     color: #fff;
     border: 0;
 }
+
 .rewardBtn {
     width: 464rpx;
     height: 80rpx;
@@ -419,7 +420,7 @@ button::after {
     background: -o-linear-gradient(180deg, #FEC953, #FCA40F);
     background: -moz-linear-gradient(180deg, #FEC953, #FCA40F);
     box-shadow: 0 6rpx 18rpx 0 rgba(0, 0, 0, 0.5);
-    background:  #FCA40F;
+    background: #FCA40F;
     font-size: 40rpx;
     color: #fff;
     line-height: 80rpx;
@@ -428,5 +429,27 @@ button::after {
     z-index: 9999;
     top: 718rpx;
     left: 115rpx;
+}
+
+.quitBtn {
+    width: 68rpx;
+    height: 68rpx;
+    position: absolute;
+    left: 345rpx;
+    bottom: 110rpx;
+
+}
 
+.replySection {
+    width: 100%;
+    height: 300rpx;
+    position: fixed;
+    bottom: 0;
+    background: #eee;
+}
+
+.replySection input {
+    width: 100%;
+    height: 300rpx;
+    text-indent: 4rpx;
 }

+ 44 - 47
pages/user/myEdit/myEdit.js

@@ -1,65 +1,62 @@
+import httpRequestApi from '../../../utils/APIClient';
 Page({
-
   /**
    * 页面的初始数据
    */
   data: {
-    zradio: [
-      { name: 'radio', sex: '女', bool: false, checked: true },
-      { name: 'radio', sex: '男', bool: false, checked: false }
-    ],
-    flag: true,
+    sexs: [
+      { value: '女',checked: true },
+      { value: '男', checked: false }
+      ], 
     occupations: [
-      { name: 'radio', occupation: '家长', checked: false, status: 0 },
-      { name: 'radio', occupation: '老师', checked: false, status: 1 },
-      { name: 'radio', occupation: '学生', checked: true, status: 2  }
+      { value: '家长', checked: false },
+      { value: '老师', checked: false },
+      { value: '学生', checked: true }
     ],
-    region: ['北京市', '海淀区','万泉胜景远小学']
+    date: '2001年12月12日',
+    msg: '',
+    nickname: ''
   },
-
-  radioChange: function (e) {
-    var zradio = this.data.zradio;
-    var index = e.currentTarget.dataset.index;
-    for (let i = 0; i < zradio.length;i++){
-      if (zradio[i].checked){
-        zradio[i].checked = false;
-      }
-      else{
-        zradio[i].checked = true;
-      }
-    }
+  saveNickName: function(e){
+    let nickname = e.detail.value;
     this.setData({
-      zradio: zradio
+      nicename: nickname
+    }, () => {
+      console.log(nickname);
     });
   },
-
-  radioSetting:function(e){
-    let occupations = this.data.occupations;
-    let index = e.currentTarget.dataset.index;
-    for (let i = 0; i < occupations.length;i++){
-      let state = index;//缓存 用户当前点击的索引。
-      if (occupations[state].checked){
-        occupations[state].checked = false;
-      }
-      else{
-        occupations[state].checked = true;
-      }
-    }
+  saveAddress: function(e){
+    let msg = e.detail.value;
     this.setData({
-      occupations: occupations
+      msg: msg
+    },() => {
+      console.log(msg);
     });
-    console.log(occupations);
   },
-
-  formSubmit: function (e) {
-    console.log('form发生了submit事件,携带数据为:', e.detail.value)
-  },
-  
-  bindRegionChange: function (e) {
-    console.log('picker发送选择改变,携带值为', e.detail.value)
+  bindDateChange: function(e) {
+    console.log(e.detail.value)
     this.setData({
-      region: e.detail.value
-    })
+        date: e.detail.value
+    });
+  },
+  optionAction:function(e){
+    console.log(e.detail.value);
+  },
+  optionSetting: function (e) {
+    console.log(e.detail.value);
+  },
+  formSubmit: function(e){
+    let { nickname, picker, radioGroup1, radioGroup2, address } = e.detail.value;
+    let wechatName = nickname, mobile = '13994969642', gender = 3, schoolProvince = 11, schoolCity = '运城市', schoolName = '康杰中学', profession = radioGroup2, birthday = picker;
+    httpRequestApi.settingUserInfo(wechatName, mobile, gender, schoolProvince, schoolCity, schoolName, profession, birthday).success(res => {
+      console.log(res.data.data);
+        wx.redirectTo({
+            url: '/pages/index/index?index=3'
+        });
+      // wx.navigateBack({
+      //
+      //  });
+    });
   },
   /**
    * 生命周期函数--监听页面加载

+ 23 - 23
pages/user/myEdit/myEdit.wxml

@@ -1,10 +1,10 @@
-<view class='container'>
+<view>
   <view class='setting-info'>
-    <form bindsubmit="formSubmit">
+    <form bindsubmit="formSubmit" class='form'>
       <view class='nickname-box'>
         <text class='setting-title'>昵称</text>
         <view class='user-action'>
-          <input class='nickname' type='text' placeholder='喔喔' placeholder-class='placeholderStyle'>
+          <input name='nickname' class='nickname' type='text' placeholder='喔喔' placeholder-class='placeholderStyle' focus='{{ true }}' value='{{ nickname }}' bindblur='saveNickName'>
           </input>
         </view>
         <view class='edit-img'>
@@ -12,34 +12,34 @@
         </view>
       </view>
       <view class='sex-box'>
-        <text class='setting-title'>性别</text>
-        <view class='radio-box' wx:for='{{ zradio }}' wx:key='{{ index }}' data-index='{{ index }}' bindtap='radioChange'>
-          <view>{{ item.sex }}</view>
-          <view class='radio'>
-            <view class='circle' wx:if='{{ item.bool === !item.checked }}'></view>
-          </view>
-        </view>
+        <view class='setting-title'>性别</view>
+        <radio-group name='radioGroup1' class="radio-group" bindchange="optionAction">
+          <label class="radio" wx:for="{{ sexs }}" wx:key="{{ index }}">
+            <text class='sex-title'>{{ item.value }}</text>
+            <radio value="{{ item.value }}" checked="{{ item.checked }}" color='#fff' />
+          </label>
+        </radio-group>
       </view>
       <view class='birthday-box'>
-        <text class='setting-title'>生日</text>
-        <view class='date'>2001年12月12日</view>
+        <picker name='picker' mode="date" value="{{ date }}" start="1900-01-01" end="2018-09-01" bindchange="bindDateChange">
+            <view class="picker">
+              <text class='setting-title'>生日</text>
+              <text>{{ date }}</text>
+            </view>
+        </picker>
       </view>
       <view class='occupation-box'>
         <text class='setting-title'>职业</text>
-        <view class='radio-box' wx:for='{{ occupations }}' wx:key='{{ index }}' data-index='{{ index }}' bindtap='radioSetting'>
-          <view>{{ item.occupation }}</view>
-          <view class='radio'>
-            <view class='circle' wx:if='{{ item.status === index && item.checked }}'></view>
-          </view>
-        </view>
+        <radio-group name='radioGroup2' class="radio-group" bindchange="optionSetting">
+          <label class="radio" wx:for="{{ occupations }}" wx:key="{{ index }}">
+            <text class='sex-title'>{{ item.value }}</text>
+            <radio value="{{ item.value }}" checked="{{ item.checked }}" color='#fff' />
+          </label>
+        </radio-group>
       </view>
       <view class='school-box'>
         <text class='setting-title'>学校</text>
-        <picker mode="region" bindchange="bindRegionChange" value="{{region}}" custom-item="{{customItem}}">
-          <view class="picker">
-            {{region[0]}}{{region[1]}}{{region[2]}}
-          </view>
-        </picker>
+        <input name='address' class='address' type='text' placeholder='北京市海淀区万泉胜景远小学' value='{{ msg }}' bindblur='saveAddress'></input>
         <view class='edit-image'>
           <image src='../../../static/image/edit.png' class='icon'></image>
         </view>

+ 48 - 31
pages/user/myEdit/myEdit.wxss

@@ -1,4 +1,4 @@
-.container{
+page{
   width: 750rpx;
   height: 1206rpx;
   padding-top: 0;
@@ -16,6 +16,7 @@
   margin-top: 34rpx;
   width: 716rpx;
   height: 88rpx;
+  position: relative;
   box-sizing: border-box;
   padding: 22rpx 0 22rpx 26rpx;
   display: flex;
@@ -29,10 +30,6 @@
   width: 94rpx; 
 }
 
-.user-action{
-  position: relative;
-}
-
 .placeholderStyle{
   font-size: 32rpx;
   color: #737373;
@@ -41,6 +38,7 @@
 .edit-img{
   position: absolute;
   left: 220rpx;
+  top: 24rpx;
   width: 22rpx;
   height: 32rpx;
 }
@@ -56,88 +54,107 @@
   height: 88rpx;
   box-sizing: border-box;
   display: flex;
+  align-items: center;
   background: #FFFFFF;
   padding: 22rpx 0 22rpx 26rpx;
   border-radius: 12rpx;
 }
 
-.radio-box{
+.school-title,.radio-each,.birthday-title,.occupation-title{
+  margin-right: 30rpx;
+}
+
+.radio-group{
   display: flex;
-  margin-right: 50rpx;
 }
 
 .sex-title{
-  display: inline-block;
-  margin-right: 30rpx;
+  position: relative;
+  top: 10rpx;
 }
 
 .radio{
+  margin-right: 50rpx;
+}
+
+radio .wx-radio-input.wx-radio-input-checked::before{
+   border-radius: 50%;
+   width: 12rpx; 
+   height: 12rpx; 
+   text-align: center;
+   font-size:0rpx; /* 对勾大小 去掉 */
+   background-color: #FF5E00; 
+   transform:translate(-50%, -50%) scale(1);
+   -webkit-transform:translate(-50%, -50%) scale(1);
+}
+
+radio{
   margin-left: 20rpx;
-  width: 32rpx;
-  height: 32rpx;
   border-radius: 50%;
-  border: 4rpx solid  #FF8100;
-  display: flex;
-  justify-content: center;
-  align-items: center;
+  width: 40rpx;/* 最好是4的倍数,不然会不在中间 */
+  height: 40rpx;
+  border: 4rpx solid #FF8100;/* 设置边框(外圆) */
+  font-size: 0;/* 让边框重合 */
+}
+radio .wx-radio-input{
+   border-radius: 50%;
+   width: 40rpx;
+   height: 40rpx; 
+   border: none;/* 替换边框(隐藏原有边框) */
 }
 
-.circle{
-  width: 12rpx;
-  height: 12rpx;
-  border-radius: 50%;
-  background:  #FF5E00;
+radio .wx-radio-input.wx-radio-input-checked{
+   border: none;
+   background: #f00; 
 }
 
+
 .birthday-box{
   margin-top: 20rpx;
   width: 716rpx;
   height: 88rpx;
   box-sizing: border-box;
   display: flex;
+  align-items: center;
   background: #FFFFFF;
   padding: 22rpx 0 22rpx 26rpx;
   border-radius: 12rpx;
 }
 
-.birthday-title{
-  margin-right: 30rpx;
-}
-
 .occupation-box{
   margin-top: 20rpx;
   width: 716rpx;
   height: 88rpx;
   box-sizing: border-box;
   display: flex;
+  align-items: center;
   background: #FFFFFF;
   padding: 22rpx 0 22rpx 26rpx;
   border-radius: 12rpx;
 }
 
-.occupation-title{
-  margin-right: 30rpx;
-}
-
 .school-box{
   margin-top: 20rpx;
   width: 716rpx;
   height: 88rpx;
   box-sizing: border-box;
   display: flex;
+  align-items: center;
   background: #FFFFFF;
   padding: 22rpx 0 22rpx 26rpx;
   border-radius: 12rpx;
   position: relative;
 }
 
-.school-title{
-  margin-right: 30rpx;
+.address{
+  width: 420rpx;
+  height: 88rpx;
 }
 
 .edit-image{
   position: absolute;
-  right: 136rpx;
+  right: 130rpx;
+  top: 24rpx;
   width: 22rpx;
   height: 32rpx;
 }

+ 10 - 9
pages/user/myWallet/myWallet.js

@@ -4,28 +4,29 @@ Page({
    * 页面的初始数据
    */
   data: {
+    title: '',
     totalMoney: 3000,
     textDoc: '收到的赏金',
     textPrompt: '收到的奖励自动转入微信钱包',
     walletDetail: '资金明细',
   },
+
   toWalletDetail: function(e) {
-    console.log('GO TO 资金明细');
-    // let title = e.currentTarget.dataset.title;
-    // wx.navigateTo({
-    //   url: `../user/myEdit/myEdit?title=${title}`
-    // });
+    let title = e.currentTarget.dataset.title;
+    wx.navigateTo({
+      url: `../walletDetails/walletDetails?title=${title}`
+    });
   },
   /**
    * 生命周期函数--监听页面加载
    */
-  onLoad: function (option) {
-    if (option.title) {
+  onLoad: function (options) {
+    if (options.title) {
       wx.setNavigationBarTitle({
-        title: option.title//页面标题为路由参数
+        title: options.title//页面标题为路由参数
       });
       this.setData({
-        title: option.title
+        title: options.title
       });
     }
   },

+ 1 - 2
pages/user/myWallet/myWallet.wxml

@@ -10,7 +10,6 @@
         </view>
         <view class="text-prompt">{{ textPrompt }}</view>
     </view>
-
     <view class="wallet-container">
         <view class="wallet-detail" bindtap='toWalletDetail' data-title='{{ walletDetail }}'>
             <view class="wallet-center">
@@ -25,6 +24,6 @@
                 </view>
             </view>
         </view>
-
     </view>
+
 </view>

+ 0 - 1
pages/user/myWallet/myWallet.wxss

@@ -63,7 +63,6 @@ image{
     width:16rpx;
     height:28rpx;
 }
-
 .wallet-detail {
     margin-top:20rpx;
     width:716rpx;

+ 17 - 10
pages/user/myconcern/myconcern.js

@@ -1,5 +1,5 @@
+import httpRequestApi from '../../../utils/APIClient';
 Page({
-
   /**
    * 页面的初始数据
    */
@@ -14,7 +14,7 @@ Page({
               avatar: 'https://developers.weixin.qq.com/miniprogram/dev/image/cat/0.jpg?t=18102320',
               concerned: '已关注',
               followBack: '相互关注',
-              flag: false
+              isEachOther: false
           },
           {
               nickName: '木小雅',
@@ -22,7 +22,7 @@ Page({
               avatar: 'https://developers.weixin.qq.com/miniprogram/dev/image/cat/0.jpg?t=18102320',
               concerned: '已关注',
               followBack: '相互关注',
-              flag: true
+              isEachOther: true
           },
           {
               nickName: '清然未',
@@ -30,7 +30,7 @@ Page({
               avatar: 'https://developers.weixin.qq.com/miniprogram/dev/image/cat/0.jpg?t=18102320',
               concerned: '已关注',
               followBack: '相互关注',
-              flag: false
+              isEachOther: false
           },
           {
               nickName: '木小雅',
@@ -38,7 +38,7 @@ Page({
               avatar: 'https://developers.weixin.qq.com/miniprogram/dev/image/cat/0.jpg?t=18102320',
               concerned: '已关注',
               followBack: '相互关注',
-              flag: true
+              isEachOther: true
           },
           {
               nickName: '清然未',
@@ -46,7 +46,7 @@ Page({
               avatar: 'https://developers.weixin.qq.com/miniprogram/dev/image/cat/0.jpg?t=18102320',
               concerned: '已关注',
               followBack: '相互关注',
-              flag: false
+              isEachOther: false
           },
           {
               nickName: '清然未',
@@ -54,7 +54,7 @@ Page({
               avatar: 'https://developers.weixin.qq.com/miniprogram/dev/image/cat/0.jpg?t=18102320',
               concerned: '已关注',
               followBack: '相互关注',
-              flag: false
+              isEachOther: false
           },
           {
               nickName: '清然未',
@@ -62,7 +62,7 @@ Page({
               avatar: 'https://developers.weixin.qq.com/miniprogram/dev/image/cat/0.jpg?t=18102320',
               concerned: '已关注',
               followBack: '相互关注',
-              flag: false
+              isEachOther: false
           },
           {
               nickName: '木小雅',
@@ -70,7 +70,7 @@ Page({
               avatar: 'https://developers.weixin.qq.com/miniprogram/dev/image/cat/0.jpg?t=18102320',
               concerned: '已关注',
               followBack: '相互关注',
-              flag: true
+              isEachOther: true
           },
           {
               nickName: '木小雅',
@@ -78,7 +78,7 @@ Page({
               avatar: 'https://developers.weixin.qq.com/miniprogram/dev/image/cat/0.jpg?t=18102320',
               concerned: '已关注',
               followBack: '相互关注',
-              flag: true
+              isEachOther: true
           },
       ]
   },
@@ -96,6 +96,13 @@ Page({
         title: option.title
       });
     }
+    let uid = 1, pageNo = 8, pageSize = 18;
+    httpRequestApi.getFollowUsers(uid, pageNo, pageSize).success(res => {
+      let { data } = res.data;
+      this.setData({
+        isEachOther: data.hasPrevious
+      });
+    });
   },
 
   /**

+ 2 - 7
pages/user/myconcern/myconcern.wxml

@@ -1,6 +1,5 @@
 <view class='my-concern'>
   <view class="concern-center">
-
     <view class='concern-info' wx:for="{{ concerns }}" wx:key="{{ index }}">
       <view class='avatar-box'>
         <image class='avatar-image' src="{{ item.avatar }}" />
@@ -9,22 +8,18 @@
         <text class="nickName">{{ item.nickName }}</text>
         <text class="time">{{ item.time }}</text>
       </view>
-
-      <view class="avatar-follow" wx:if='{{ item.flag }}'>
+      <view class="avatar-follow" wx:if='{{ item.isEachOther }}'>
         <view class='avatar-img'>
           <image class='avatar-images' src="../../../static/image/concerned.png" />
         </view>
         <view class="follow-status">{{ item.concerned }}</view>
       </view>
-
-      <view class="avatar-follow" wx:elif='{{ item.followBack === item.followBack || item.flag }}'>
+      <view class="avatar-follow" wx:elif='{{ item.followBack === item.followBack || item.isEachOther }}'>
         <view class='avatar-img'>
           <image class='avatar-images' src="../../../static/image/concernback.png" />
         </view>
         <view class="follow-status">{{ item.followBack }}</view>
       </view>
-
     </view>
-    
   </view>
 </view>

+ 112 - 0
pages/user/walletDetails/walletDetails.js

@@ -0,0 +1,112 @@
+// pages/user/walletDetails/walletDetails.js
+Page({
+
+  /**
+   * 页面的初始数据
+   * @param value value = Math.abs(value)
+   */
+  data: {
+    title: '',
+    walletDatails:[
+      {
+        value: '-20.00',
+        time: '2018年9月30日 12:00',
+        nickName: '喔喔',
+      },
+      {
+        value: '-20.00',
+        time: '2018年9月30日 12:00',
+        nickName: '喔喔',
+      },
+      {
+        value: '20.00',
+        time: '2018年9月30日 12:00',
+        nickName: '追忆似水年华',
+      },
+      {
+        value: '-20.00',
+        time: '2018年9月30日 12:00',
+        nickName: '喔喔',
+      },
+      {
+        value: '1822.00',
+        time: '2018年9月30日 12:00',
+        nickName: 'kongzhishuxing',
+      },
+      {
+        value: '20.00',
+        time: '2018年9月30日 12:00',
+        nickName: '喔喔',
+      },
+      {
+        value: '-20.00',
+        time: '2018年9月30日 12:00',
+        nickName: 'hahahahahahahaha',
+      },
+      
+    ],
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    if (options.title) {
+      wx.setNavigationBarTitle({
+        title: options.title//页面标题为路由参数
+      });
+      this.setData({
+        title: options.title
+      });
+    }
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+  
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+  
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+  
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+  
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+  
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+  
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+  
+  }
+})

+ 1 - 0
pages/user/walletDetails/walletDetails.json

@@ -0,0 +1 @@
+{}

+ 34 - 0
pages/user/walletDetails/walletDetails.wxml

@@ -0,0 +1,34 @@
+<view class='walletDetails'>
+
+  <view class="walletDetails-center">
+
+    <view class='walletDetails-info' wx:for="{{ walletDatails }}" wx:key="{{ index }}">
+        
+        <view class="walletDetails-left">
+            <view class='avatar-box'>
+                <image src="../../../static/image/walletdetails.png" />
+            </view>
+            <view class="avatar-info">
+                <text class="avatar-doc" wx:if='{{ item.value > 0 }}'>收到的奖金-来自{{ item.nickName }}</text>
+                <text class="avatar-doc" wx:else>发出的奖金-奖励{{ item.nickName }}</text>
+                <text class="avatar-time">{{ item.time }}</text>
+            </view>
+        </view>
+
+        <view class="walletDetails-right">
+            <view class="avatar-value-pos" wx:if='{{ item.value > 0 }}'>
+                <text class="avatar-symbol">+</text>
+                <text>{{ item.value }}</text>
+            </view>
+            <view class="avatar-value-neg" wx:else>
+                <text class="avatar-symbol">-</text>
+                <text>{{ item.value }}</text>
+            </view>
+        </view>
+
+    </view>
+
+
+  </view>
+
+</view>

+ 68 - 0
pages/user/walletDetails/walletDetails.wxss

@@ -0,0 +1,68 @@
+page{
+    width: 750rpx;
+    background: #F0F1F5;
+}
+.walletDetails-center{
+    width: 716rpx;
+    margin: 20rpx auto;
+}
+  
+.walletDetails-info{
+    margin-bottom: 20rpx;
+    width: 100%;
+    height: 122rpx;
+    display: flex;
+    align-items: center;
+    justify-content:space-between;
+    border-radius: 12rpx;
+    background: #FFFFFF;
+}
+
+.walletDetails-left, .walletDetails-right{
+    display: flex;
+    align-items: center;
+}
+
+image {
+    width: 100%;
+    height: 100%;
+}
+.avatar-box {
+    margin-left: 16rpx;
+    width: 64rpx;
+    height: 64rpx;
+}
+.avatar-info{
+    display: flex;
+    flex-direction: column;
+    margin-left: 16rpx;
+}
+.avatar-doc{
+    height: 38rpx;
+    color: #3C3C3C;
+    font-size: 28rpx;
+} 
+.avatar-time{
+    height: 32rpx;
+    color: #909090;
+    font-size: 24rpx;
+}
+
+.walletDetails-right{
+    margin-right: 20rpx;
+    font-size: 24rpx;
+}
+
+.avatar-value-pos, .avatar-value-neg{
+    width: 100rpx;
+}
+.avatar-value-pos {
+    color: #FF5200;
+}
+.avatar-value-neg{
+    color: #61CA54;
+}
+.avatar-symbol {
+    font-weight: bold;
+}
+

+ 13 - 1
project.config.json

@@ -36,7 +36,7 @@
 			"list": []
 		},
 		"miniprogram": {
-			"current": 5,
+			"current": 7,
 			"list": [
 				{
 					"id": 0,
@@ -73,6 +73,18 @@
 					"name": "aaa",
 					"pathName": "pages/groupPage/collage-details/collage-details",
 					"query": "productId=1"
+				},
+				{
+					"id": 5,
+					"name": "concern",
+					"pathName": "pages/user/myconcern/myconcern",
+					"query": ""
+				},
+				{
+					"id": -1,
+					"name": "作品页面",
+					"pathName": "pages/social/works/works",
+					"query": "id=1541489786444388&title=铺满色巴掌的水泥道"
 				}
 			]
 		}

BIN
static/image/no_collect.png


BIN
static/image/walletdetails.png


+ 72 - 5
utils/APIClient.js

@@ -22,7 +22,6 @@ module.exports = {
 	// 获取首页人气推荐
 	getHotRecommend(uid, pageNo, pageSize) {
 		let url = getBaseUrl('wx/userRead/recommend');
-		console.log(url);
 		return request.getInstance().header({
 			uid
 		}).data({
@@ -48,10 +47,10 @@ module.exports = {
 		}).send();
 	},
 	// 获取课本详情
-	getBookDetail(id) {
+	getBookDetail(uid,id) {
 		let url = getProductUrl(`wx/product/${id}`);
 		return request.getInstance().header({
-			uid: wx.getStorageSync('uid')
+			uid
 		}).url(url).send();
 	},
 	// 获取单课详情
@@ -61,6 +60,19 @@ module.exports = {
 			uid
 		}).url(url).send();
 	},
+	// 检查是否收藏过课程
+	classIsLike(uid,data){
+		let url = getProductUrl(`wx/favorites/isLike`);
+		return request.getInstance().header({
+			uid
+		}).url(url).data(data).send();
+	},
+	getClassDetail(uid,id) {
+		let url = getProductUrl(`wx/lesson/${id}`);
+		return request.getInstance().header({
+			uid
+		}).url(url).send();
+	},
 	// 获取单课朗读信息
 	getClassRead(uid,data){
 		let url = getBaseUrl(`wx/userRead`);
@@ -68,6 +80,13 @@ module.exports = {
 			uid
 		}).data(data).url(url).send();
 	},
+	// 作品播放了+1
+	playWorks(uid,readId){
+		let url = getBaseUrl(`wx/userRead/play/${readId}`);
+		return request.getInstance().header({
+			uid
+		}).url(url).send();
+	},
 	// 发布作品
 	postWork(uid, data) {
 		console.log(data);
@@ -76,6 +95,13 @@ module.exports = {
 			uid
 		}).url(url).data(data).method('POST').send();
 	},
+	// 点赞作品
+	likeWorks(uid,readId){
+		let url = getBaseUrl(`wx/userRead/like/${readId}`);
+		return request.getInstance().header({
+			uid
+		}).url(url).send();
+	},
 	// 关注用户 
 	followUser(uid, followUid) {
 		let url = getBaseUrl(`wx/fans`);
@@ -142,6 +168,13 @@ module.exports = {
 			uid
 		}).url(url).data(data).method('POST').send();
 	},
+	// 点赞评论
+	likeCommend(uid,likeUid){
+		let url = getBaseUrl(`wx/posts/attribute/${likeUid}`);
+		return request.getInstance().header({
+			uid
+		}).url(url).method('GET').send();
+	},
 	// 发布讨论
 	postReply(uid, data){
 		let url = getBaseUrl(`wx/posts`);
@@ -180,8 +213,8 @@ module.exports = {
 		}).method('POST').send();
 	},
 	// 收藏课程
-	collectBook(uid, data){
-		let url = getBaseUrl(`wx/favorites`);
+	collectClass(uid, data){
+		let url = getProductUrl(`wx/favorites`);
 		return request.getInstance().header({
 			uid
 		}).url(url).data(data).method('POST').send();
@@ -203,6 +236,15 @@ module.exports = {
 			uid: wx.getStorageSync('uid')
 		}).url(url).send();
 	},
+	//团购是否成功
+	groupSuccess (orderId) {
+		let url = getBaseUrl(`wx/groupPurchase/joinStatus`);
+		return request.getInstance().header({
+			uid: wx.getStorageSync('uid')
+		}).url(url).data({
+			orderId
+		}).send();
+	},	
 	// 发起奖励
 	rewardMoney(uid, data){
 		let url = getBaseUrl(`wx/wallet/award`);
@@ -210,4 +252,29 @@ module.exports = {
 			uid
 		}).url(url).data(data).method('POST').send();
 	},
+  // 修改资料
+  settingUserInfo(wechatName, mobile, gender, schoolProvince, schoolCity, schoolName, profession, birthday){
+    let url = getBaseUrl(`wx/user`);
+    return request.getInstance().header({
+      uid: wx.getStorageSync('uid')
+    }).data({
+      wechatName: wechatName,
+      mobile: mobile,
+      gender: gender,
+      schoolProvince: schoolProvince,
+      schoolCity: schoolCity,
+      schoolName: schoolName,
+      profession: profession,
+      birthday: birthday
+      }).url(url).method('PUT').send();
+  },
+  //获取个人信息
+	getUserInfo () {
+    let url = getBaseUrl(`wx/user`);
+    return request.getInstance().header({
+        uid: wx.getStorageSync('uid')
+    }).data({
+        uid: wx.getStorageSync('uid')
+    }).url(url).send();
+	}
 }