소스 검색

解决冲突

Limengbo 6 년 전
부모
커밋
626fb7cc83
44개의 변경된 파일1176개의 추가작업 그리고 684개의 파일을 삭제
  1. 2 0
      .gitignore
  2. 0 6
      .idea/misc.xml
  3. 0 8
      .idea/modules.xml
  4. 0 12
      .idea/reader.iml
  5. 0 6
      .idea/vcs.xml
  6. 191 186
      .idea/workspace.xml
  7. 4 2
      app.json
  8. 109 69
      component/hot/hot.js
  9. 5 5
      component/hot/hot.wxml
  10. 12 6
      component/hot/hot.wxss
  11. 23 3
      component/my/my.js
  12. 4 4
      component/my/my.wxml
  13. 39 4
      pages/index/index.js
  14. 4 1
      pages/index/index.json
  15. 1 1
      pages/index/index.wxml
  16. 1 1
      pages/main/books/books.wxss
  17. 52 74
      pages/main/class/class.js
  18. 4 4
      pages/main/class/class.wxml
  19. 1 0
      pages/main/class/class.wxss
  20. 26 12
      pages/main/reading/reading.js
  21. 2 2
      pages/main/reading/reading.wxml
  22. 2 1
      pages/main/singleBook/singleBook.js
  23. 2 0
      pages/main/singleBook/singleBook.wxml
  24. 18 0
      pages/main/singleBook/singleBook.wxss
  25. 35 73
      pages/social/replyDetail/replyDetail.js
  26. 127 72
      pages/social/works/works.js
  27. 35 13
      pages/social/works/works.wxml
  28. 106 2
      pages/social/works/works.wxss
  29. 25 49
      pages/user/myEdit/myEdit.js
  30. 18 22
      pages/user/myEdit/myEdit.wxml
  31. 48 31
      pages/user/myEdit/myEdit.wxss
  32. 80 0
      pages/user/myWallet/myWallet.js
  33. 1 0
      pages/user/myWallet/myWallet.json
  34. 30 0
      pages/user/myWallet/myWallet.wxml
  35. 75 0
      pages/user/myWallet/myWallet.wxss
  36. 17 10
      pages/user/myconcern/myconcern.js
  37. 2 2
      pages/user/myconcern/myconcern.wxml
  38. 6 0
      project.config.json
  39. BIN
      static/image/menu_wrapper.png
  40. BIN
      static/image/mywalletdetail.png
  41. BIN
      static/image/mywalletmoney.png
  42. BIN
      static/image/reward_wrapper.png
  43. 49 1
      utils/APIClient.js
  44. 20 2
      utils/util.js

+ 2 - 0
.gitignore

@@ -0,0 +1,2 @@
+/.idea/
+

+ 0 - 6
.idea/misc.xml

@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="JavaScriptSettings">
-    <option name="languageLevel" value="ES6" />
-  </component>
-</project>

+ 0 - 8
.idea/modules.xml

@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="ProjectModuleManager">
-    <modules>
-      <module fileurl="file://$PROJECT_DIR$/.idea/reader.iml" filepath="$PROJECT_DIR$/.idea/reader.iml" />
-    </modules>
-  </component>
-</project>

+ 0 - 12
.idea/reader.iml

@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="WEB_MODULE" version="4">
-  <component name="NewModuleRootManager">
-    <content url="file://$MODULE_DIR$">
-      <excludeFolder url="file://$MODULE_DIR$/.tmp" />
-      <excludeFolder url="file://$MODULE_DIR$/temp" />
-      <excludeFolder url="file://$MODULE_DIR$/tmp" />
-    </content>
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-  </component>
-</module>

+ 0 - 6
.idea/vcs.xml

@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="VcsDirectoryMappings">
-    <mapping directory="$PROJECT_DIR$" vcs="Git" />
-  </component>
-</project>

+ 191 - 186
.idea/workspace.xml

@@ -3,13 +3,12 @@
   <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$/app.json" beforeDir="false" afterPath="$PROJECT_DIR$/app.json" 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$/component/my/my.wxml" beforeDir="false" afterPath="$PROJECT_DIR$/component/my/my.wxml" 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$/pages/user/myEdit/myEdit.wxss" beforeDir="false" afterPath="$PROJECT_DIR$/pages/user/myEdit/myEdit.wxss" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/project.config.json" beforeDir="false" afterPath="$PROJECT_DIR$/project.config.json" 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/" />
@@ -24,43 +23,45 @@
     <session id="-1384404472">
       <usages-collector id="statistics.lifecycle.project">
         <counts>
-          <entry key="project.closed" value="3" />
+          <entry key="project.closed" value="4" />
           <entry key="project.open.time.15" 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="3" />
+          <entry key="project.opened" value="5" />
         </counts>
       </usages-collector>
       <usages-collector id="statistics.file.extensions.open">
         <counts>
           <entry key="jpg" value="1" />
-          <entry key="js" value="16" />
-          <entry key="json" value="4" />
-          <entry key="wxml" value="14" />
-          <entry key="wxss" value="8" />
+          <entry key="js" value="27" />
+          <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="4" />
-          <entry key="JavaScript" value="16" />
-          <entry key="PLAIN_TEXT" value="22" />
+          <entry key="JSON" value="5" />
+          <entry key="JavaScript" value="27" />
+          <entry key="PLAIN_TEXT" value="26" />
         </counts>
       </usages-collector>
       <usages-collector id="statistics.file.extensions.edit">
         <counts>
-          <entry key="js" value="2" />
-          <entry key="json" value="1" />
-          <entry key="wxml" value="3" />
-          <entry key="wxss" value="86" />
+          <entry key="js" value="572" />
+          <entry key="json" value="5" />
+          <entry key="wxml" value="90" />
+          <entry key="wxss" value="87" />
         </counts>
       </usages-collector>
       <usages-collector id="statistics.file.types.edit">
         <counts>
-          <entry key="JSON" value="1" />
-          <entry key="JavaScript" value="2" />
-          <entry key="PLAIN_TEXT" value="89" />
+          <entry key="JSON" value="5" />
+          <entry key="JavaScript" value="572" />
+          <entry key="PLAIN_TEXT" value="177" />
         </counts>
       </usages-collector>
       <usages-collector id="statistics.js.language.service.starts" />
@@ -70,55 +71,86 @@
   <component name="FileEditorManager">
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/pages/user/myconcern/myconcern.wxml">
+        <entry file="file://$PROJECT_DIR$/pages/user/myEdit/myEdit.wxml">
           <provider selected="true" editor-type-id="text-editor">
-            <state>
-              <caret column="21" selection-start-column="21" selection-end-column="21" />
+            <state relative-caret-position="234">
+              <caret line="31" column="88" lean-forward="true" selection-start-line="31" selection-start-column="88" selection-end-line="31" selection-end-column="88" />
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/pages/user/myconcern/myconcern.js">
+        <entry file="file://$PROJECT_DIR$/pages/user/myEdit/myEdit.js">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="2070">
-              <caret line="69" column="98" selection-start-line="69" selection-start-column="98" selection-end-line="69" selection-end-column="98" />
+            <state relative-caret-position="270">
+              <caret line="27" column="23" lean-forward="true" selection-start-line="27" selection-start-column="23" selection-end-line="27" selection-end-column="23" />
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/pages/user/myconcern/myconcern.wxss">
+        <entry file="file://$PROJECT_DIR$/pages/main/class/class.js">
           <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 relative-caret-position="2970">
+              <caret line="99" column="4" lean-forward="true" selection-start-line="99" selection-start-column="4" selection-end-line="99" selection-end-column="4" />
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/pages/main/class/class.js">
+        <entry file="file://$PROJECT_DIR$/utils/APIClient.js">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="422">
+              <caret line="172" column="20" lean-forward="true" selection-start-line="172" selection-start-column="20" selection-end-line="172" selection-end-column="20" />
+            </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="960">
+              <caret line="32" column="32" lean-forward="true" selection-start-line="32" selection-start-column="32" selection-end-line="32" selection-end-column="32" />
+            </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="272">
+              <caret line="89" column="35" lean-forward="true" selection-start-line="89" selection-start-column="35" selection-end-line="89" selection-end-column="35" />
+              <folding>
+                <element signature="n#!!doc" expanded="true" />
+                <element signature="e#20#81#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="-150">
-              <caret line="61" column="5" lean-forward="true" selection-start-line="2" selection-start-column="4" selection-end-line="61" selection-end-column="5" />
+            <state relative-caret-position="1170">
+              <caret line="39" column="11" lean-forward="true" selection-start-line="39" selection-start-column="11" selection-end-line="39" selection-end-column="11" />
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/pages/main/class/class.wxss">
+        <entry file="file://$PROJECT_DIR$/utils/httpUtil.js">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="2730">
-              <caret line="91" column="18" selection-start-line="91" selection-start-column="18" selection-end-line="91" selection-end-column="18" />
+            <state relative-caret-position="810">
+              <caret line="29" column="6" lean-forward="true" 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/follow/follow.js">
+        <entry file="file://$PROJECT_DIR$/component/my/my.wxml">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="240">
-              <caret line="8" column="32" selection-start-line="8" selection-start-column="32" selection-end-line="8" selection-end-column="32" />
+            <state relative-caret-position="-270">
+              <caret line="18" column="68" lean-forward="true" selection-start-line="18" selection-start-column="68" selection-end-line="18" selection-end-column="68" />
             </state>
           </provider>
         </entry>
@@ -128,6 +160,13 @@
   <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">
@@ -141,6 +180,15 @@
         <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$/pages/user/myEdit/myEdit.wxml" />
+        <option value="$PROJECT_DIR$/app.json" />
+        <option value="$PROJECT_DIR$/utils/APIClient.js" />
+        <option value="$PROJECT_DIR$/component/my/my.wxml" />
+        <option value="$PROJECT_DIR$/pages/index/index.js" />
+        <option value="$PROJECT_DIR$/utils/httpUtil.js" />
+        <option value="$PROJECT_DIR$/component/my/my.js" />
+        <option value="$PROJECT_DIR$/pages/user/myEdit/myEdit.js" />
       </list>
     </option>
   </component>
@@ -150,7 +198,7 @@
     <detection-done>true</detection-done>
     <sorting>DEFINITION_ORDER</sorting>
   </component>
-  <component name="ProjectFrameBounds" extendedState="6">
+  <component name="ProjectFrameBounds" extendedState="7">
     <option name="x" value="260" />
     <option name="y" value="20" />
     <option name="width" value="1400" />
@@ -178,18 +226,6 @@
               <item name="reader" type="b2602c69:ProjectViewProjectNode" />
               <item name="reader" type="462c0819:PsiDirectoryNode" />
               <item name="component" type="462c0819:PsiDirectoryNode" />
-              <item name="follow" 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="hot" 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>
@@ -197,51 +233,6 @@
               <item name="reader" type="462c0819:PsiDirectoryNode" />
               <item name="pages" type="462c0819:PsiDirectoryNode" />
             </path>
-            <path>
-              <item name="reader" type="b2602c69:ProjectViewProjectNode" />
-              <item name="reader" type="462c0819:PsiDirectoryNode" />
-              <item name="pages" type="462c0819:PsiDirectoryNode" />
-              <item name="main" type="462c0819:PsiDirectoryNode" />
-            </path>
-            <path>
-              <item name="reader" type="b2602c69:ProjectViewProjectNode" />
-              <item name="reader" type="462c0819:PsiDirectoryNode" />
-              <item name="pages" type="462c0819:PsiDirectoryNode" />
-              <item name="main" type="462c0819:PsiDirectoryNode" />
-              <item name="class" type="462c0819:PsiDirectoryNode" />
-            </path>
-            <path>
-              <item name="reader" type="b2602c69:ProjectViewProjectNode" />
-              <item name="reader" type="462c0819:PsiDirectoryNode" />
-              <item name="pages" type="462c0819:PsiDirectoryNode" />
-              <item name="main" type="462c0819:PsiDirectoryNode" />
-              <item name="reading" type="462c0819:PsiDirectoryNode" />
-            </path>
-            <path>
-              <item name="reader" type="b2602c69:ProjectViewProjectNode" />
-              <item name="reader" type="462c0819:PsiDirectoryNode" />
-              <item name="pages" type="462c0819:PsiDirectoryNode" />
-              <item name="user" type="462c0819:PsiDirectoryNode" />
-            </path>
-            <path>
-              <item name="reader" type="b2602c69:ProjectViewProjectNode" />
-              <item name="reader" type="462c0819:PsiDirectoryNode" />
-              <item name="pages" type="462c0819:PsiDirectoryNode" />
-              <item name="user" type="462c0819:PsiDirectoryNode" />
-              <item name="myconcern" type="462c0819:PsiDirectoryNode" />
-            </path>
-            <path>
-              <item name="reader" type="b2602c69:ProjectViewProjectNode" />
-              <item name="reader" type="462c0819:PsiDirectoryNode" />
-              <item name="pages" type="462c0819:PsiDirectoryNode" />
-              <item name="user" type="462c0819:PsiDirectoryNode" />
-              <item name="myEdit" type="462c0819:PsiDirectoryNode" />
-            </path>
-            <path>
-              <item name="reader" type="b2602c69:ProjectViewProjectNode" />
-              <item name="reader" type="462c0819:PsiDirectoryNode" />
-              <item name="static" type="462c0819:PsiDirectoryNode" />
-            </path>
           </expand>
           <select />
         </subPane>
@@ -281,14 +272,17 @@
       <workItem from="1541144291161" duration="762000" />
       <workItem from="1541157092216" duration="2211000" />
       <workItem from="1541402122086" duration="6360000" />
+      <workItem from="1541554466111" duration="5820000" />
+      <workItem from="1541581837551" duration="8734000" />
     </task>
     <servers />
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="9333000" />
+    <option name="totallyTimeSpent" value="23887000" />
   </component>
   <component name="ToolWindowManager">
     <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
+    <editor active="true" />
     <layout>
       <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.14278187" />
       <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
@@ -316,20 +310,6 @@
     <option name="myLimit" value="2678400000" />
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/component/my/my.wxml">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="324">
-          <caret line="59" column="32" selection-start-line="59" selection-start-column="19" selection-end-line="59" selection-end-column="32" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/utils/APIClient.js">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="480">
-          <caret line="16" column="41" lean-forward="true" selection-start-line="16" selection-start-column="33" selection-end-line="16" selection-end-column="41" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/utils/util.js">
       <provider selected="true" editor-type-id="text-editor">
         <state>
@@ -337,13 +317,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pages/index/index.wxml">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="240">
-          <caret line="8" column="101" selection-start-line="8" selection-start-column="91" selection-end-line="8" selection-end-column="101" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/pages/index/index.json">
       <provider selected="true" editor-type-id="text-editor">
         <state>
@@ -351,17 +324,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pages/index/index.js">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="90">
-          <caret line="3" column="7" lean-forward="true" selection-start-line="3" selection-start-column="7" selection-end-line="3" selection-end-column="7" />
-          <folding>
-            <element signature="n#!!doc" expanded="true" />
-            <element signature="e#41#97#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/utils/const.js">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="30">
@@ -369,20 +331,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/utils/WXHttpRequest.js">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="1320">
-          <caret line="44" column="38" lean-forward="true" selection-start-line="44" selection-start-column="38" selection-end-line="44" selection-end-column="38" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/app.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$/component/my/my.wxss">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="-1596">
@@ -390,9 +338,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pages/user/myEdit/myEdit.wxss">
-      <provider selected="true" editor-type-id="text-editor" />
-    </entry>
     <entry file="file://$PROJECT_DIR$/pages/main/books/books.wxml">
       <provider selected="true" editor-type-id="text-editor" />
     </entry>
@@ -412,98 +357,158 @@
     <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/follow/follow.js">
+    <entry file="file://$PROJECT_DIR$/component/hot/hot.wxml">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="240">
-          <caret line="8" column="32" selection-start-line="8" selection-start-column="32" selection-end-line="8" selection-end-column="32" />
+        <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/hot/hot.wxml">
+    <entry file="file://$PROJECT_DIR$/component/follow/follow.wxml">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-290" />
+        <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$/pages/main/class/class.js">
+    <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 relative-caret-position="-150">
-          <caret line="61" column="5" lean-forward="true" selection-start-line="2" selection-start-column="4" selection-end-line="61" selection-end-column="5" />
+        <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.wxml">
+    <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="15" lean-forward="true" selection-start-line="7" selection-start-column="8" selection-end-line="17" selection-end-column="15" />
+          <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$/component/follow/follow.wxml">
+    <entry file="file://$PROJECT_DIR$/pages/user/myEdit/myEdit.wxss">
       <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 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/user/myEdit/myEdit.wxml">
+    <entry file="file://$PROJECT_DIR$/pages/index/index.wxml">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="420">
-          <caret line="14" column="23" selection-start-line="14" selection-start-column="23" selection-end-line="14" selection-end-column="23" />
+        <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$/pages/user/myEdit/myEdit.js">
+    <entry file="file://$PROJECT_DIR$/component/follow/follow.js">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="1530">
-          <caret line="51" column="8" selection-start-line="51" selection-start-column="8" selection-end-line="51" selection-end-column="8" />
+        <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$/component/my/my.js">
+    <entry file="file://$PROJECT_DIR$/component/my/my.wxml">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="60">
-          <caret line="2" column="13" lean-forward="true" selection-start-line="2" selection-start-column="13" selection-end-line="2" selection-end-column="13" />
+        <state relative-caret-position="-270">
+          <caret line="18" column="68" lean-forward="true" selection-start-line="18" selection-start-column="68" selection-end-line="18" selection-end-column="68" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pages/user/myconcern/myconcern.wxml">
+    <entry file="file://$PROJECT_DIR$/utils/APIClient.js">
       <provider selected="true" editor-type-id="text-editor">
-        <state>
-          <caret column="21" selection-start-column="21" selection-end-column="21" />
+        <state relative-caret-position="422">
+          <caret line="172" column="20" lean-forward="true" selection-start-line="172" selection-start-column="20" selection-end-line="172" selection-end-column="20" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/component/hot/hot.wxss">
-      <provider selected="true" editor-type-id="text-editor" />
+    <entry file="file://$PROJECT_DIR$/utils/WXHttpRequest.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="960">
+          <caret line="32" column="32" lean-forward="true" selection-start-line="32" selection-start-column="32" selection-end-line="32" selection-end-column="32" />
+        </state>
+      </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pages/main/books/books.wxss">
-      <provider selected="true" editor-type-id="text-editor" />
+    <entry file="file://$PROJECT_DIR$/utils/httpUtil.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="810">
+          <caret line="29" column="6" lean-forward="true" 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/main/reading/reading.wxss">
+    <entry file="file://$PROJECT_DIR$/pages/user/myEdit/myEdit.wxml">
       <provider selected="true" editor-type-id="text-editor">
-        <state>
-          <caret column="15" lean-forward="true" selection-start-column="15" selection-end-column="15" />
+        <state relative-caret-position="234">
+          <caret line="31" column="88" lean-forward="true" selection-start-line="31" selection-start-column="88" selection-end-line="31" selection-end-column="88" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pages/main/class/class.wxss">
+    <entry file="file://$PROJECT_DIR$/pages/main/class/class.js">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="2730">
-          <caret line="91" column="18" selection-start-line="91" selection-start-column="18" selection-end-line="91" selection-end-column="18" />
+        <state relative-caret-position="2970">
+          <caret line="99" column="4" lean-forward="true" selection-start-line="99" selection-start-column="4" selection-end-line="99" selection-end-column="4" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pages/user/myconcern/myconcern.wxss">
+    <entry file="file://$PROJECT_DIR$/pages/index/index.js">
       <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 relative-caret-position="272">
+          <caret line="89" column="35" lean-forward="true" selection-start-line="89" selection-start-column="35" selection-end-line="89" selection-end-column="35" />
+          <folding>
+            <element signature="n#!!doc" expanded="true" />
+            <element signature="e#20#81#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pages/user/myconcern/myconcern.js">
+    <entry file="file://$PROJECT_DIR$/component/my/my.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="1170">
+          <caret line="39" column="11" lean-forward="true" selection-start-line="39" selection-start-column="11" selection-end-line="39" selection-end-column="11" />
+        </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="2070">
-          <caret line="69" column="98" selection-start-line="69" selection-start-column="98" selection-end-line="69" selection-end-column="98" />
+        <state relative-caret-position="270">
+          <caret line="27" column="23" lean-forward="true" selection-start-line="27" selection-start-column="23" selection-end-line="27" selection-end-column="23" />
         </state>
       </provider>
     </entry>

+ 4 - 2
app.json

@@ -14,14 +14,16 @@
     "pages/groupPage/collage-details/collage-details",
     "pages/main/searchResult/searchResult",
     "pages/user/myconcern/myconcern",
-    "pages/groupPage/my-group/my-group"
+    "pages/groupPage/my-group/my-group",
+    "pages/user/myWallet/myWallet"
   ],
   "window": {
     "backgroundTextStyle": "light",
     "navigationBarBackgroundColor": "#61CA54",
     "navigationBarTitleText": "小学语文课文朗读",
     "navigationBarTextStyle": "white",
-    "backgroundColor": "#61CA54"
+    "backgroundColor": "#61CA54",
+    "onReachBottomDistance": 50
   },
   "debug": false
 }

+ 109 - 69
component/hot/hot.js

@@ -14,99 +14,139 @@ export const hotInit = (that) => {
         duration: 700,
         circular: true,
         hotWareCardFirst: 'hotWareCardFirst',
-        hotWareCard : 'hotWareCard',
+        hotWareCard: 'hotWareCard',
         hotSearch: '鹅鹅鹅',
-        wareCards:[
-          {
-            title:"铺满色巴掌的水泥道1",
-            grade:"一年级 上学期",
-            img: "../../static/image/timg.jpg",
-            plays: "1",
-            likes: "2",
-            classId: "1001"
-          },
-          {
-            title:"铺满金色巴掌的水泥道2",
-            grade:"一年级 上学期",
-            img: "../../static/image/timg.jpg",
-            plays: "12345",
-            likes: "54321",
-            classId: "1002"
-          },
-          {
-            title:"铺满金色巴掌的水泥道3",
-            grade:"一年级 上学期",
-            img: "../../static/image/timg.jpg",
-            plays: "12345",
-            likes: "54321",
-            classId: "1003"
-          },
-        ]
+        banner: [],
+        recommend: [],
+        hotWorks: [],
+        winH: that.data.winH
       }
     }),
     // 搜索方法
     that.searchHandler = () => {
-      console.log('搜索按钮')
-      console.log(that.data.hotInput);
-      if(that.data.hotInput.lenght !== 0){
+      if (that.data.hotInput.lenght !== 0) {
         wx.navigateTo({
           url: `../main/searchResult/searchResult?keyWords=${that.data.hotInput}`
         })
       }
-      
+
     },
     // 输入框输入
     that.inputHandler = (e) => {
       that.setData({
         hotInput: e.detail.value
       });
-      console.log(that.data.hotInput)
     }
-    // 打开课程页面
-    that.openBooks = (e) =>{
+  // 打开课程页面
+  that.openBooks = (e) => {
+    wx.navigateTo({
+      url: `../main/books/books`
+    })
+  }
+
+  // 打开课程页面
+  that.openClass = (e, lessonId) => {
+    if (lessonId) {
       wx.navigateTo({
-        url: `../main/books/books`
+        url: `../main/class/class?id=${lessonId}`
       })
-    }
-    
-    // 打开课程页面
-    that.openClass = (e) =>{
+    } else {
       let id = e.currentTarget.dataset.classid;
       let title = e.currentTarget.dataset.title;
       wx.navigateTo({
         url: `../main/class/class?id=${id}&title=${title}`
       })
     }
-    // 打开用户作品页面
-    that.openWorks = (e) =>{
-      let uid = e.currentTarget.dataset.uid;
-      let title = e.currentTarget.dataset.title;
-      wx.navigateTo({
-        url: `../social/works/works?id=${uid}&title=${title}`
-      })
-    }
-    that.getIndex = (uid)=>{
-      httpRequestApi.getIndex({
-        uid
-      }).success((res)=>{
-        console.log(res);
-      })
-    }
-    that.getHotRecommend = (uid,pageNo,pageSize)=>{
-      httpRequestApi.getHotRecommend(
-        uid,
-        pageNo,
-        pageSize
-      ).success((res)=>{
-        console.log(res);
-      })
-    }
-    // 去全部课本
-    that.goToBooks = () =>{
-      wx.navigateTo({
-        url: `../main/books/books`
+  }
+  // 打开用户作品页面
+  that.openWorks = (e) => {
+    let readId = e.currentTarget.dataset.readid;
+    let title = e.currentTarget.dataset.title;
+    wx.navigateTo({
+      url: `../social/works/works?id=${readId}&title=${title}`
+    })
+  }
+  that.getIndex = () => {
+    const uid = wx.getStorageSync('uid');
+    httpRequestApi.getIndex(
+      uid
+    ).success((res) => {
+
+      const banner = res.data.data.banner;
+      const recommend = res.data.data.recommendLesson;
+      const bannerTemp = [];
+      banner.forEach(item => {
+        const temp = {};
+        temp.url = item.boothContent;
+        temp.type = item.operationType;
+        temp.id = item.operationContent;
+
+        bannerTemp.push(temp);
+      });
+      const recommendTemp = [];
+      recommend.forEach(item => {
+        const oTemp = {};
+        oTemp.img = item.boothContent;
+        oTemp.classId = item.operationContent;
+        oTemp.title = item.title;
+        oTemp.grade = item.summary;
+        recommendTemp.push(oTemp);
+      });
+      let bannerIndex = 'hotData.banner';
+      let recommendIndex = 'hotData.recommend';
+      that.setData({
+        [bannerIndex]: bannerTemp,
+        [recommendIndex]: recommendTemp
       })
+    })
+  }
+  that.getHotRecommend = (uid, pageNo, pageSize) => {
+    httpRequestApi.getHotRecommend(
+      uid,
+      pageNo,
+      pageSize
+    ).success((res) => {
+      console.log(res)
+        const recommendRes = res.data.data.list;
+        // const recommendWorks = [];
+        recommendRes.forEach(item => {
+          const temp = {};
+          temp.title = item.userRead.title;
+          temp.grade = item.userRead.title;
+          temp.img = item.userRead.iconImg;
+          temp.plays = item.userRead.playAmount ? item.userRead.playAmount : 0;
+          temp.likes = item.userRead.likeAmount ? item.userRead.likeAmount : 0;
+          temp.classId = item.userRead.id;
+          // recommendWorks.push(temp);
+          that.data.hotData.hotWorks.push(temp);
+        });
+        const hotStr = 'hotData.hotWorks'
+        that.setData({
+          [hotStr]: that.data.hotData.hotWorks,
+          recommendTotalNo: res.data.data.totalNo
+        })
+    })
+  }
+
+  // 去全部课本
+  that.goToBooks = () => {
+    wx.navigateTo({
+      url: `../main/books/books`
+    })
+  }
+  that.bannerTap = (e) => {
+    const type = e.currentTarget.dataset.type;
+    const id = e.currentTarget.dataset.id;
+    switch (type) {
+      case 'LESSON':
+        that.openClass('tap', id);
+        break;
     }
-    that.getIndex(1);
-    that.getHotRecommend(1,1,3) 
+  }
+  // 下拉加载
+  that.scrollUpdate = (e) => {
+    console.log(e)
+  }
+  that.getIndex();
+  that.getHotRecommend(1, 1, 3)
 }

+ 5 - 5
component/hot/hot.wxml

@@ -1,8 +1,8 @@
 <template name="hot">
     <swiper indicator-dots="{{hotData.indicatorDots}}" autoplay="{{hotData.autoplay}}" interval="{{hotData.interval}}" duration="{{hotData.duration}}" circular="{{hotData.circular}}">
-        <block wx:for="{{hotData.imgUrls}}" wx:key="{{index}}">
+        <block wx:for="{{hotData.banner}}" wx:key="{{index}}">
             <swiper-item>
-                <image src="{{item}}" class="slide-image" width="750" height="318" />
+                <image src="{{item.url}}" data-type="{{item.type}}" data-id="{{item.id}}" bindtap="bannerTap" class="slide-image" width="750" height="318" />
             </swiper-item>
         </block>
     </swiper>
@@ -22,7 +22,7 @@
             <view class="moreBtn" bindtap="openBooks">更多></view>
         </view>
         <view class="hotWares" style="flex-direction:row;">
-            <view wx:for="{{hotData.wareCards}}" wx:key="{{index}}" class="hotWareCard" bindtap="openClass" data-classId="{{item.classId}}" data-title="{{item.title}}">
+            <view wx:for="{{hotData.recommend}}" wx:key="{{index}}" class="hotWareCard" bindtap="openClass" data-classId="{{item.classId}}" data-title="{{item.title}}">
                 <image class="wareCardImg" src="{{item.img}}" />
                 <text class="wareCardTitle">{{item.title}}</text>
                 <view class="bottomData">
@@ -46,8 +46,8 @@
                 <text>人气推荐</text>
             </view>
         </view>
-        <view class="hotWares" style="flex-direction:row;">
-            <view wx:for="{{hotData.wareCards}}" wx:key="{{index}}" class="hotWareCard" bindtap="openWorks" data-uid="{{item.classId}}" data-title="{{item.title}}">
+        <view class="hotWares"  >
+            <view wx:for="{{hotData.hotWorks}}" wx:key="{{index}}" class="hotWareCard" bindtap="openWorks" data-readId="1541489786444388" data-title="{{item.title}}">
                 <image class="wareCardImg" src="{{item.img}}" />
                 <text class="wareCardTitle">{{item.title}}</text>
                 <view class="bottomData">

+ 12 - 6
component/hot/hot.wxss

@@ -51,10 +51,10 @@ swiper {
 }
 
 .searchSection .allBooks {
-    font-size: 28rpx;
+    font-size: 32rpx;
     color: #61ca54;
     font-family: PingFangSC-regular;
-    width: 112rpx;
+    width: 128rpx;
     margin-left: 56rpx;
 }
 
@@ -69,18 +69,22 @@ swiper {
     display: flex;
     align-items: center;
     justify-content: space-between;
-    margin: 8rpx 20rpx 20rpx 8rpx;
+    padding: 30rpx 22rpx 20rpx;
+
 }
-.hotSection .leftWrapper{
-    display:flex;
-align-items:center;
+
+.hotSection .leftWrapper {
+    display: flex;
+    align-items: center;
 
 }
+
 .hotSection .title image {
     width: 54rpx;
     height: 60rpx;
     margin-left: 14rpx;
 }
+
 .hotSection .title .recommendTag {
     width: 38rpx;
     height: 34rpx;
@@ -105,6 +109,7 @@ align-items:center;
     font-size: 28rpx;
     color: #6e6e6e;
 }
+
 .hotWares {
     display: flex;
     flex-wrap: wrap;
@@ -141,6 +146,7 @@ align-items:center;
     letter-spacing: 4rpx;
     font-family: MicrosoftYaHei;
 }
+
 .hotWareCard .bottomData {
     height: 34rpx;
     margin-top: 10rpx;

+ 23 - 3
component/my/my.js

@@ -1,15 +1,15 @@
+import APIClient from '../../utils/APIClient'
 export const myInit =  (that) => {
   that.setData({
     myData: {
         title: '修改资料',
         concern: '我的关注',
-        imgUrl: 'https://developers.weixin.qq.com/miniprogram/dev/image/cat/0.jpg?t=18102320',
-        name: 'ABC',
         address:['北京海淀','中关村','三小'],
         playNum: 31549,
         attentionCount: 10254,
         point: 6317,
-        flowerNum: 56245
+        flowerNum: 56245,
+        user: {}
     }
   })
   that.toMyEdit = (e) => {
@@ -24,5 +24,25 @@ export const myInit =  (that) => {
       url: `../user/myconcern/myconcern?title=${title}`
     });
   }
+  that.toMyWallet = e => {
+    let title = e.currentTarget.dataset.title;
+    wx.navigateTo({
+      url: `../user/myWallet/myWallet?title=${title}`
+    });
+  }
 
+  that.userInfo = function () {
+      // APIClient.getUserInfo()
+      const userInfo = wx.getStorageSync('user');
+      console.log(userInfo);
+      // getOpenidSessionKey((res) => {
+      //     console.log('个人',res);
+      //     that.data.myData.user = res.data.data.data;
+      //     that.setData({
+      //         myData: that.data.myData
+      //     })
+      // },(error) => {
+      //
+      // })
+  }()
 }

+ 4 - 4
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'>
@@ -57,7 +57,7 @@
           </view>
         </view>
       </view>
-      <view class='wallet-module'>
+      <view class='wallet-module' bindtap='toMyWallet' data-title='{{ myData.wallet }}'>
         <view class='wallet-center'>
           <view class='wallet-left'>
             <view class='icon-box'>

+ 39 - 4
pages/index/index.js

@@ -39,7 +39,12 @@ Page({
         templates: 'my',
       }
     ],
+    winH: 568,
     myIndex: 1,
+    recommendPageNo:1,
+    recommendTotalNo:0,
+    followPageNo:1,
+    followPageSize:0,
     templates: 'hot',
     title: 'index中的title',
     jurisdictionFlag: true,
@@ -48,7 +53,6 @@ Page({
     hide: true
   },
   jurisdiction: function () {
-    console.log(1)
     //隐藏弹框
     this.setData({
       hide: !this.data.hide
@@ -82,9 +86,25 @@ Page({
     }
     if (myIndex == 3) {
       myInit(this);
+      getOpenidSessionKey((res) => {
+          console.log('个人',res);
+      }, (error) => {
+          // console.log(error)
+          this.setData({
+              hide: !this.data.hide
+          })
+      });
     }
   },
   onLoad: function (options) {
+    this.uid = wx.getStorageSync('uid');
+    wx.getSystemInfo({
+      success: (res) => {
+        this.setData({
+          winH: res.windowHeight
+        });
+      }
+    });
     if (options.index) {
       this.updateData(options.index)
     }
@@ -94,9 +114,7 @@ Page({
   },
   onShow: function () {
     // this.init();
-    getOpenidSessionKey((res) => {
-      console.log(res);
-    }, (error) => {
+    getOpenidSessionKey((res) => {}, (error) => {
       // console.log(error)
       this.setData({
         hide: !this.data.hide
@@ -118,5 +136,22 @@ Page({
       //   jurisdictionFlag: false
       // })
     });
+  },
+  // 触底加载
+  onReachBottom: function () {
+    console.log(this.data.recommendPageNo)
+    console.log('bottom')
+    // 当前在推荐页面 加载推荐
+    if (this.data.myIndex === 1) {
+      this.setData({
+        recommendPageNo: this.data.recommendPageNo+1
+      })
+      if(this.data.recommendPageNo <= this.data.recommendTotalNo ){
+        this.getHotRecommend(this.uid, this.data.recommendPageNo, 3);
+        
+      } else {
+        console.log('没有更多')
+      }
+    }
   }
 })

+ 4 - 1
pages/index/index.json

@@ -1,5 +1,8 @@
 {
     "usingComponents": {
         "Dialog": "../../component/dialog/dialog"
-    }
+    },
+    "window": {
+        "onReachBottomDistance": 50
+      }
   }

+ 1 - 1
pages/index/index.wxml

@@ -26,5 +26,5 @@
   </view> -->
 </view>
 <view hidden="{{hide}}">
-    <Dialog bindmyevent="jurisdiction" />
+  <Dialog bindmyevent="jurisdiction" />
 </view>

+ 1 - 1
pages/main/books/books.wxss

@@ -13,7 +13,7 @@
 .book image{
     display: block;
     width: 214rpx;
-    height: 190rpx;
+    height: 290rpx;
 }
 .book text{
     margin-top: 20rpx;

+ 52 - 74
pages/main/class/class.js

@@ -1,4 +1,5 @@
 import httpRequestApi from '../../../utils/APIClient';
+import {formatDate} from '../../../utils/util';
 Page({
   data: {
     fullScreenBtn: false,
@@ -7,73 +8,8 @@ Page({
     videoUrl: '',
     title: '',
     poster: '',
-    works: [{
-        nickName: '萝莉小猫咪',
-        time: '10-18 09:56',
-        avatar: '../../../static/image/timg.jpg',
-        likes: '1123',
-        uid: '1'
-      },
-      {
-        nickName: '萝莉小猫咪',
-        time: '10-18 09:56',
-        avatar: '../../../static/image/timg.jpg',
-        likes: '1123',
-        uid: '1'
-      },
-      {
-        nickName: '萝莉小猫咪',
-        time: '10-18 09:56',
-        avatar: '../../../static/image/timg.jpg',
-        likes: '1123',
-        uid: '1'
-      },
-      {
-        nickName: '萝莉小猫咪',
-        time: '10-18 09:56',
-        avatar: '../../../static/image/timg.jpg',
-        likes: '1123',
-        uid: '1'
-      },
-      {
-        nickName: '萝莉小猫咪',
-        time: '10-18 09:56',
-        avatar: '../../../static/image/timg.jpg',
-        likes: '1123',
-        uid: '1'
-      },
-      {
-        nickName: '萝莉小猫咪',
-        time: '10-18 09:56',
-        avatar: '../../../static/image/timg.jpg',
-        likes: '1123',
-        uid: '1'
-      },
-      {
-        nickName: '萝莉小猫咪',
-        time: '10-18 09:56',
-        avatar: '../../../static/image/timg.jpg',
-        likes: '1123',
-        uid: '1'
-      },
-      {
-        nickName: '萝莉小猫咪',
-        time: '10-18 09:56',
-        avatar: '../../../static/image/timg.jpg',
-        likes: '1123',
-        uid: '1'
-      },
-      {
-        nickName: '萝莉小猫咪',
-        time: '10-18 09:56',
-        avatar: '../../../static/image/timg.jpg',
-        likes: '1123',
-        uid: '1'
-      },
-
-
-
-    ]
+    works: [],
+    total: ''
   },
   onLoad: function (option) {
     console.log(option);
@@ -84,14 +20,15 @@ Page({
       title: option.title,
       id: option.id
     })
-    let uid = 1;
+    let uid = wx.getStorageSync('uid');;
 
     httpRequestApi.getClassDetail(uid, option.id).success(res => {
-        console.log(res);
-        this.setData({
-          title: res.data.data.title,
-          videoUrl:res.data.data.playUrl
-        })
+      console.log(res);
+      this.setData({
+        title: res.data.data.title,
+        videoUrl: res.data.data.playUrl
+      })
+      this.getReadInfo(1,10);
     })
   },
 
@@ -99,15 +36,56 @@ Page({
     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}`
+      url: `../../main/reading/reading?id=${id}&title=${this.data.title}&img=${this.data.img}&video=${this.data.videoUrl}`
     })
   },
   goToWorks: function (e) {
+    this.videoCtx = wx.createVideoContext('myVideo', this);
+    this.videoCtx.stop();
     console.log(e);
     let readId = e.target.dataset.uid;
     let title = this.data.title;
     wx.navigateTo({
       url: `../../social/works/works?id=${readId}&tilte=${title}`
     })
+  },
+  collect: function (e) {
+    let uid =  wx.getStorageSync('uid');
+    let data = {
+      
+    }
+    httpRequestApi.collectBook(uid, data).success(res => {
+      console.log(res);
+    })
+  },
+  getReadInfo: function(pageNo,pageSize){
+    const uid =  wx.getStorageSync('uid');
+    const data = {
+      lessonId: 1 ,
+      pageNo: pageNo,
+      pageSize: pageSize
+    };
+    httpRequestApi.getClassRead(uid,data).success(res=>{
+      const readInfo = res.data.data.list;
+      const readTemp = [];
+      readInfo.forEach(item => {
+        const temp = {};
+        temp.nickName = item.user.wechatName;
+        temp.time = formatDate(item.userRead.gmtCreated, 3);
+        temp.avatar = item.user.avatar;
+        temp.likes = item.userRead.likeAmount ? item.userRead.likeAmount : 0;
+        temp.uid = item.userRead.uid;
+        temp.id = item.userRead.id;
+        readTemp.push(temp);
+      });
+      this.setData({
+        total: res.data.data.totalSize,
+        works: readTemp
+      })
+    });
+  },
+  // 下拉加载
+  scrollUpdate:function(e){
+    console.log(e)
   }
 })

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

@@ -1,9 +1,9 @@
 <view class="classPage">
-    <video class="videoSection" src="{{videoUrl}}" controls show-fullscreen-btn="{{fullScreenBtn}}" show-play-btn="{{playBtn}}"></video>
-    <view class="readWorksSection">
+    <video id="classVideo" class="videoSection" src="{{videoUrl}}" controls show-fullscreen-btn="{{fullScreenBtn}}" show-play-btn="{{playBtn}}"></video>
+    <scroll-view class="readWorksSection" lower-threshold="160" bindscrolltolower="scrollUpdate">
         <view class="peopleNum">
             <image class="peoplesIcon" src="../../../static/image/peoples.png" />
-            <view class="title">共有12345人完成了录音</view>
+            <view class="title">共有{{total}}人完成了录音</view>
         </view>
         <view class="workCard" wx:for="{{works}}" wx:key="{{index}}" bindtap="goToWorks" data-uid="{{item.uid}}">
             <image class="avatar" src="{{item.avatar}}" />
@@ -16,7 +16,7 @@
                 <text class="likeNum">{{item.likes}}</text>
             </view>
         </view>
-    </view>
+    </scroll-view>
     <view class="footSection">
         <image class="blackbord" src="../../../static/image/blackbord.png" />
         <view class="collectBtn footerBtn">

+ 1 - 0
pages/main/class/class.wxss

@@ -70,6 +70,7 @@
 }
 .readWorksSection {
     width: 100%;
+    height: 100%;
     background: #e8e8e8;
     margin-bottom: 150rpx;
 }

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 26 - 12
pages/main/reading/reading.js


+ 2 - 2
pages/main/reading/reading.wxml

@@ -9,7 +9,7 @@
   muted="{{muted}}"
   enable-progress-gesture="{{gesture}}"
   bindwaiting="{{videoWaiting}}"
-  bindended="{{videoCtr}}"
+  bindended="recordingVideoEnd"
   ></video>
 
   <!-- <audio name="123" author="123" src="{{recordSource}}" id="myAudio" controls loop></audio> -->
@@ -25,7 +25,7 @@
             <text>试听</text>
         </view>
         <view class="readingBtn footerBtn" bindtap="audioRecord">
-            <image class="microphone" src="{{recordFlag === 1 ? recordingGif :microphonePng}}" />
+            <image class="microphone" src="{{btnImgFlag ? recordingGif :microphonePng}}" />
             <text>我要朗读</text>
         </view>
         <view class="shareBtn footerBtn" wx:if="{{btnFlag}}" bindtap="upload">

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

@@ -10,7 +10,8 @@ Page({
         wx.setNavigationBarTitle({
             title: options.title
         })
-        httpRequestApi.getBookDetail(options.id).success((res) => {
+        const uid= wx.getStorageSync('uid');
+        httpRequestApi.getBookDetail(uid, options.id).success((res) => {
             console.log(res.data.data)
             const bookInfo = res.data.data.product;
             const lessonList = res.data.data.lessonList;

+ 2 - 0
pages/main/singleBook/singleBook.wxml

@@ -6,6 +6,8 @@
     </view>
     <view class="dirTag">
         <!-- <image src="" /> -->
+        <image src="../../../static/image/menu_wrapper.png" />
+        <text >课文目录</text>
     </view>
     <view class="listSection">
         <view class="classItem" wx:for="{{lessonList}}" wx:key="{{index}}" data-id="{{item.id}}" data-title="{{item.title}}" bindtap="goToClass">

+ 18 - 0
pages/main/singleBook/singleBook.wxss

@@ -30,6 +30,24 @@
     height: 100rpx;
     margin-top: 12rpx;
     background: #fff;
+    position: relative;
+
+}
+.dirTag image{
+    position: absolute;
+    left: 42rpx;
+    top: 22rpx;
+    width: 206rpx;
+    height: 42rpx;
+}
+.dirTag text{
+    position: absolute;
+    left: 56rpx;
+    top: 22rpx;
+    width: 150rpx;
+    height: 42rpx;
+    font-size: 32rpx;
+    color: #fff;
 }
 .listSection{
     width: 100%;

+ 35 - 73
pages/social/replyDetail/replyDetail.js

@@ -1,89 +1,51 @@
 import httpRequestApi from '../../../utils/APIClient';
+import {formatDate} from '../../../utils/util';
 Page({
     data: {
         class1: 'commentItem commentItemFirst',
         classNormal: 'commentItem',
-        comment:[
-            {
-                name: '阿尔萨斯',
-                text: '总有一天我将死去而你我儿子啊将加冕为王加冕为王加冕为王加冕为王加冕为王加冕为王加冕为王',
-                time: '10-18 09:56',
-                likes: '165',
-                avatar: '../../../static/image/timg.jpg'
-            },
-            {
-                name: '古尔丹',
-                text: '你读的是个求',
-                time: '10-18 09:56',
-                likes: '165',
-                avatar: '../../../static/image/timg.jpg'
-            },
-            {
-                name: '阿尔萨斯',
-                text: '圣光将照耀我',
-                time: '10-18 09:56',
-                likes: '165',
-                avatar: '../../../static/image/timg.jpg'
-            },
-        ]
+        postId: '',
+        comment:[]
         
     },
     onLoad: function (option) {
         console.log(option)
-
-        wx.setNavigationBarTitle({
-            title: option.num + '条回复'//页面标题为路由参数
-        })
-
-
-    },
-    goToReading: function () {
-        let id = this.data.id;
-        let title = this.data.title;
-        wx.navigateTo({
-            url: `../../main/reading/reading?id=${id}&title=${title}`
+        this.setData({
+            postId: option.id
         })
-    },
-    onShareAppMessage: function (res) {
-        if (res.from === 'button') {
-            // 来自页面内转发按钮
-            console.log(res.target)
-        }
-        return {
-            title: '测试',
-            path: '/pages/social/works/works'
-        }
-    },
-    follow: function () {
-        let uid = 1;
-        let followUid = 2;
-        httpRequestApi.followUser(uid, followUid).success((res) => {
-            console.log(res)
-        });
-    },
-    // 去其他用户的作品页
-    goToOthers: function (e) {
-        wx.navigateTo({
-            url: `../../main/reading/reading?id=${id}&title=${title}`
+        wx.setNavigationBarTitle({
+            title: option.count + '条回复'//页面标题为路由参数
         })
+        this.getReplyDetail();
     },
-    // 查询回复
-    getReply: function () {
-        let uid = 1;
-        let columnId = 1001;
-        let pageNo = 1;
-        let pageSize = 10;
-        httpRequestApi.getReply(uid, columnId, pageNo, pageSize).success((res) => {
+    // 查询回复详情
+    getReplyDetail: function () {
+        let uid = wx.getStorageSync('uid');
+        httpRequestApi.getReplyComment(uid, this.data.postId).success((res) => {
             console.log(res);
+            const replyList = res.data.data.replyVOList;
+            const replied = res.data.data;
+            const replyTemp = [];
+            const authorDetail = {};
+            authorDetail.name = replied.user.wechatName;
+            authorDetail.text = replied.detailDesc;
+            authorDetail.time = formatDate(replied.gmtCreated,3);
+            authorDetail.likes = replied.postsAttributeInfo.favors;
+            authorDetail.avatar = replied.user.avatar;
+            replyTemp.push(authorDetail);
+            replyList.forEach(item => {
+                const temp = {};
+                temp.name = item.user.wechatName;
+                temp.text = item.content;
+                temp.time = formatDate(item.gmtCreated,3);
+                temp.likes = 0;
+                temp.avatar = item.user.avatar;
+                replyTemp.push(temp);
+                console.log(replyTemp);
+            });
+            this.setData({
+                comment: replyTemp
+            })
         });
-    },
-    // 打开回复详情页
-    goToDetail: function (e) {
-        let id = e.currentTarget.dataset.id;
-        let num = e.currentTarget.dataset.num;
-        console.log(e);
-        wx.navigateTo({
-            url: `../../social/replyDetail/replyDetail?id=${id}&num=${num}`
-        })
     }
 })

+ 127 - 72
pages/social/works/works.js

@@ -1,63 +1,24 @@
 import httpRequestApi from '../../../utils/APIClient';
+import {
+    formatDate
+} from '../../../utils/util';
 Page({
     data: {
         fullScreenBtn: false,
         playBtn: false,
         gesture: true,
-        user: [{
-                nickName: '萝莉小猫咪',
-                image: '../../../static/image/timg.jpg',
-            },
-            {
-                nickName: '萝莉小猫咪',
-                image: '../../../static/image/timg.jpg',
-            },
-            {
-                nickName: '萝莉小猫咪',
-                image: '../../../static/image/timg.jpg',
-            },
-            {
-                nickName: '萝莉小猫咪',
-                image: '../../../static/image/timg.jpg',
-            },
-            {
-                nickName: '萝莉小猫咪',
-                image: '../../../static/image/timg.jpg',
-            },
-            {
-                nickName: '萝莉小猫咪',
-                image: '../../../static/image/timg.jpg',
-            },
-            {
-                nickName: '萝莉小猫咪',
-                image: '../../../static/image/timg.jpg',
-            },
-            {
-                nickName: '萝莉小猫咪',
-                image: '../../../static/image/timg.jpg',
-            },
-            {
-                nickName: '萝莉小猫咪',
-                image: '../../../static/image/timg.jpg',
-            },
-            {
-                nickName: '萝莉小猫咪',
-                image: '../../../static/image/timg.jpg',
-            },
-            {
-                nickName: '萝莉小猫咪',
-                image: '../../../static/image/timg.jpg',
-            },
-            {
-                nickName: '萝莉小猫咪',
-                image: '../../../static/image/timg.jpg',
-            }
-        ],
+        author: '',
+        videoSrc: '',
+        total: '',
+        authorAvatar: '',
+        user: [],
         inputValue: 'smdx',
-        text: '总有一天我将实质性操作死去而你我的\xa0\xa0\xa0\xa0\xa0\xa0\xa0儿子自行车在啊实打实大苏打撒旦将加冕为王'
+        replyList: [],
+        howMuch: '2000',
+        moneySelect: 'moneySelect',
+        moneyNormal: 'moneyNormal'
     },
     onLoad: function (option) {
-        console.log(option)
         if (option.title) {
             wx.setNavigationBarTitle({
                 title: option.title //页面标题为路由参数
@@ -67,12 +28,47 @@ Page({
                 id: option.id
             })
         }
-        let uid = 1;
-        httpRequestApi.getWorksDetail(uid, option.id).success((res) => {
-            console.log(res);
+        let uid = wx.getStorageSync('uid');
+        this.getWorks(uid, option.id);
+    },
+    getWorks: function (uid, id) {
+        httpRequestApi.getWorksDetail(uid, id).success((res) => {
+            const others = res.data.data.otherRead;
+            const author = res.data.data.user;
+            const works = res.data.data.userRead;
+            const othersTemp = [];
+            others.forEach((item) => {
+                const temp = {};
+                temp.image = item.user.avatar;
+                temp.nickName = item.user.wechatName;
+                othersTemp.push(temp);
+            });
+            this.setData({
+                user: othersTemp,
+                author: author.wechatName,
+                authorAvatar: author.avatar,
+                authorUid: author.uid,
+                videoSrc: works.originVideo,
+                audioSrc: works.audioPath
+            })
+            // 设置音频路径
+            this.innerAudioContext = wx.createInnerAudioContext();
+            this.innerAudioContext.onError((res) => {
+                // 播放音频失败的回调
+            })
+            this.innerAudioContext.src = this.data.audioSrc; // 这里可以是录音的临时路径
             this.getReply();
         });
     },
+    videoPlay: function () {
+        this.innerAudioContext.play();
+    },
+    videoEnd: function () {
+        this.innerAudioContext.stop();
+    },
+    videoPause: function () {
+        this.innerAudioContext.pause();
+    },
     goToReading: function () {
         let id = this.data.id;
         let title = this.data.title;
@@ -91,7 +87,7 @@ Page({
         }
     },
     follow: function () {
-        let uid = 1;
+        let uid = wx.getStorageSync('uid');
         let followUid = 2;
         httpRequestApi.followUser(uid, followUid).success((res) => {
             console.log(res)
@@ -105,21 +101,38 @@ Page({
     },
     // 查询回复
     getReply: function () {
-        let uid = 1;
-        let columnId = 1001;
+        let uid = wx.getStorageSync('uid');
+        let columnId = this.data.id;
         let pageNo = 1;
         let pageSize = 10;
         httpRequestApi.getReply(uid, columnId, pageNo, pageSize).success((res) => {
-            console.log(res);
+            console.log(res.data.data.list);
+            const replyList = res.data.data.list;
+            const replyTemp = [];
+            replyList.forEach((item) => {
+                const temp = {};
+                temp.nickName = item.user.wechatName;
+                temp.avatar = item.user.avatar;
+                temp.text = item.detailDesc;
+                temp.id = item.id;
+                temp.replyCount = item.replyCount;
+                temp.time = formatDate(item.gmtCreated, 3);
+                console.log(temp.time)
+                replyTemp.push(temp);
+            });
+            this.setData({
+                replyList: replyTemp,
+                total: res.data.data.totalSize
+            })
         });
     },
     // 打开回复详情页
     goToDetail: function (e) {
         let id = e.currentTarget.dataset.id;
-        let num = e.currentTarget.dataset.num;
+        let count = e.currentTarget.dataset.count;
         console.log(e);
         wx.navigateTo({
-            url: `../../social/replyDetail/replyDetail?id=${id}&num=${num}`
+            url: `../../social/replyDetail/replyDetail?id=${id}&count=${count}`
         })
     },
     //  绑定输入框内容
@@ -132,23 +145,65 @@ Page({
     sendHandler: function () {
         console.log(this.data.inputValue);
         if (this.data.inputValue !== '') {
-            // let uid = 1;
-            // let data = {
-            //     "postId": 1,
-            //     "content": this.data.inputValue
-            // }
-            // httpRequestApi.postReplyComment(uid, data).success(res => {
-            //     console.log(res);
-            // });
-            let uid = 1;
+            let uid = wx.getStorageSync('uid');
             let data = {
-                "columnId": '1541403885738293',
-                colunmNames: '金色巴掌',
+                "columnId": this.data.id,
+                colunmNames: 'what',
                 "detailDesc": this.data.inputValue
             }
             httpRequestApi.postReply(uid, data).success(res => {
                 console.log(res);
             });
         }
-    }
+    },
+    // 选择金额
+    setMoney: function(e){
+        this.setData({
+            howMuch: e.currentTarget.dataset.money
+        })
+    },
+    // 奖励
+    rewardMoney: function () {
+        console.log(this.data.authorUid);
+        const data = {
+            targetUid: this.data.authorUid,
+            amount: "50"
+        }
+        let uid = wx.getStorageSync('uid');
+        httpRequestApi.rewardMoney(uid, data).success(res => {
+            console.log(res);
+            this.payMoneyt(res.data.data);
+        })
+
+    },
+    //支付
+    payMoneyt: function (orderInfo) {
+        wx.requestPayment({
+            'appId': orderInfo.appId,
+            'timeStamp': orderInfo.timeStamp,
+            'nonceStr': orderInfo.nonceStr,
+            'package': orderInfo.package,
+            'signType': orderInfo.signType,
+            'paySign': orderInfo.sign,
+            'success': function (res) {
+                console.log(res)
+                wx.showModal({
+                    title: '提示',
+                    content: '支付成功',
+                    success(res) {
+                        if (res.confirm) {
+                            console.log('点击确定')
+                        } else if (res.cancel) {
+                            console.log('取消')
+                        }
+                    }
+                })
+
+            },
+            'fail': function (res) {
+                console.log('支付失败', res)
+            }
+        })
+    },
+
 })

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

@@ -1,8 +1,8 @@
 <view>
-    <video class="videoSection" src="http://efunvideo.ai160.com/vs2m/001/00103075/00103075012/00103075012.m3u8" controls show-fullscreen-btn="{{fullScreenBtn}}" show-play-btn="{{playBtn}}"></video>
+    <video class="videoSection" src="{{videoSrc}}" bindplay="videoPlay" bindended="videoEnd" bindpause="videoPause" muted="true" controls="false" show-fullscreen-btn="{{fullScreenBtn}}" show-play-btn="{{playBtn}}"></video>
     <view class="readAuthorSection">
-        <image class="avatar" src="../../../static/image/timg.jpg" />
-        <text class="nickName">萝莉小猫咪</text>
+        <image class="avatar" src="{{authorAvatar}}" />
+        <text class="nickName">{{author}}</text>
         <view class="like">
             <image src="../../../static/image/liked.png" />
             <text class="likeBtn">点赞</text>
@@ -19,23 +19,25 @@
         <scroll-view scroll-x class="scrollWrapper" scroll-with-animation="true">
             <view class="avatarRow">
                 <view class="userItem" wx:for="{{user}}" wx:key="{{index}}">
-                    <image src="{{item.image}}" bindtap="goToOthers" data-uid = "{{item.uid}}" />
+                    <image src="{{item.image}}" bindtap="goToOthers" data-uid="{{item.uid}}" />
                 </view>
             </view>
         </scroll-view>
     </view>
     <view class="commentSection">
-        <view class="title">评论(38)</view>
+        <view class="title">评论({{total}})</view>
         <input class="commentInput" bindconfirm="sendHandler" confirm-type="send" placeholder="听了这么多,说点什么吧" bindinput="inputValue"></input>
     </view>
     <view class="commentArea">
-        <view class="commentItem" >
-            <image class="avatar" src="../../../static/image/timg.jpg" />
+        <view class="commentItem" wx:for="{{replyList}}" wx:key="{{index}}">
+            <image class="avatar" src="{{item.avatar}}" />
             <view class="commentCore">
-                <text class="nickName">阿尔萨斯</text>
-                <text class="time">10-18 09:56</text>
-                <text class="gut">{{text}}</text>
-                <view class="commentAll" bindtap="goToDetail" data-id="1" data-num="8">共有123条评论</view>
+                <text class="nickName">{{item.nickName}}</text>
+                <text class="time">{{item.time}}</text>
+                <text class="gut">{{item.text}}</text>
+                <view class="commentAll" bindtap="goToDetail" data-id="{{item.id}}" data-count="{{item.replyCount}}">
+                    共有{{item.replyCount}}条评论
+                </view>
             </view>
             <view class="btnWrapper">
                 <image class="commentBtn" src="../../../static/image/comment.png" />
@@ -47,7 +49,7 @@
     </view>
     <view class="footSection">
         <image class="blackbord" src="../../../static/image/blackbord.png" />
-        <view class="collectBtn footerBtn">
+        <view class="collectBtn footerBtn" bindtap="reward">
             <image src="../../../static/image/bonus.png" />
             <text>奖励</text>
         </view>
@@ -56,10 +58,30 @@
             <text>我要朗读</text>
         </view>
         <view class="shareBtn footerBtn">
-            <button open-type="share" plain="true" hover-class="none" >
+            <button open-type="share" plain="true" hover-class="none">
                 <image src="../../../static/image/share.png" />
                 <text>分享</text>
             </button>
         </view>
     </view>
+    <!-- 奖励弹窗 -->
+    <cover-view class="modalWrapper">
+        <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">
+                    1.0元
+                </cover-view>
+                <cover-view class="{{howMuch ==='2000' ? 'money moneySelect' : 'money moneyNormal'}}" bindtap="setMoney" data-money="2000">
+                    2.0元
+                </cover-view>
+                <cover-view class="{{howMuch ==='3000' ? 'money moneySelect' : 'money moneyNormal'}}" bindtap="setMoney" data-money="3000">
+                    3.0元
+                </cover-view>
+            </cover-view>
+            <cover-view class="rewardBtn" bindtap="rewardMoney">立即奖励</cover-view>
+        </cover-view>
+    </cover-view>
 </view>

+ 106 - 2
pages/social/works/works.wxss

@@ -59,7 +59,7 @@
     border-radius: 30rpx;
     text-align: center;
     line-height: 60rpx;
-    color: #259b24;
+    color: #539bee;
 }
 
 .userSection {
@@ -143,13 +143,14 @@
 
 .commentArea {
     width: 100%;
+    margin-bottom: 160rpx;
 }
 
 .commentArea .commentItem {
     width: 704rpx;
     height: 240rpx;
     border-bottom: solid 2rpx #f0f1f5;
-    margin: 0 auto 200rpx;
+    margin: 0 auto 20rpx;
     display: flex;
     position: relative;
 }
@@ -325,4 +326,107 @@ button::after {
 
 .footSection .readingBtn text {
     margin-top: -10rpx;
+}
+
+/* 弹框 */
+.modalWrapper {
+    width: 100%;
+    height: 100%;
+    position: fixed;
+    top: 0;
+    left: 0;
+    background: rgba(0, 0, 0, .2);
+    z-index: 2;
+}
+
+.modalWrapper .rewardContent {
+    width: 670rpx;
+    height: 926rpx;
+    position: relative;
+    margin: 50rpx auto 0;
+}
+
+.rewardContent .rewardWrapper {
+    width: 100%;
+    height: 100%;
+    position: absolute;
+    top: 0;
+    left: 0;
+}
+
+.rewardAvatar {
+    width: 172rpx;
+    height: 172rpx;
+    position: absolute;
+    z-index: 999;
+    border-radius: 50%;
+    top: 104rpx;
+    left: 260rpx;
+}
+
+.rewardNickName {
+    width: 100%;
+    margin: 0 auto;
+    font-size: 36rpx;
+    color: #fff;
+    text-align: center;
+    position: absolute;
+    top: 328rpx;
+
+}
+
+.moneyArea {
+    width: 84%;
+    height: 100rpx;
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    align-items: center;
+    font-size: 36rpx;
+    color: #fa8133;
+    margin: 0 65rpx;
+    position: absolute;
+    top: 550rpx;
+
+}
+
+.money {
+    width: 150rpx;
+    height: 90rpx;
+    border: 2rpx solid #ff9600;
+    border-radius: 12rpx;
+    text-align: center;
+    line-height: 90rpx;
+}
+
+.moneyNormal {
+    border: 2rpx solid #ff9600;
+    background: ff9600;
+}
+
+.moneySelect {
+    background: #fa8133;
+    color: #fff;
+    border: 0;
+}
+.rewardBtn {
+    width: 464rpx;
+    height: 80rpx;
+    display: block;
+    border-radius: 80rpx;
+    background: linear-gradient(180deg, #FEC953, #FCA40F);
+    background: -webkit-linear-gradient(180deg, #FEC953, #FCA40F);
+    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;
+    font-size: 40rpx;
+    color: #fff;
+    line-height: 80rpx;
+    text-align: center;
+    position: absolute;
+    z-index: 9999;
+    top: 718rpx;
+    left: 115rpx;
+
 }

+ 25 - 49
pages/user/myEdit/myEdit.js

@@ -1,61 +1,37 @@
+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  }
-    ],
-    region: ['北京市', '海淀区','万泉胜景远小学']
+      { value: '家长', checked: false },
+      { value: '老师', checked: false },
+      { value: '学生', checked: true }
+    ]
   },
-  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;
-      }
-    }
-    this.setData({
-      zradio: zradio
-    });
+  optionAction:function(e){
+    console.log(e.detail.value);
   },
-  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;
-      }
-    }
-    this.setData({
-      occupations: occupations
-    });
-    console.log(occupations);
-  },
-  formSubmit: function (e) {
-    console.log('form发生了submit事件,携带数据为:', e.detail.value)
+  optionSetting: function (e) {
+    console.log(e.detail.value);
   },
-  bindRegionChange: function (e) {
-    console.log('picker发送选择改变,携带值为', e.detail.value)
-    this.setData({
-      region: e.detail.value
-    })
+  formSubmit: function(e){
+    console.log(3);
+    let  wechatName = '宋珂', birthday = '1996-07-13', gender = 3, eyeshield = 7;
+    httpRequestApi.settingUserInfo( wechatName, birthday, gender, eyeshield).success(res => {
+      console.log(res.data.data);
+        wx.redirectTo({
+            url: '/pages/index/index?index=3'
+        })
+      // wx.navigateBack({
+      //
+      //  });
+    });
   },
   /**
    * 生命周期函数--监听页面加载

+ 18 - 22
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 class='nickname' type='text' placeholder='喔喔' placeholder-class='placeholderStyle' focus='{{ true }}'>
           </input>
         </view>
         <view class='edit-img'>
@@ -12,34 +12,30 @@
         </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 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>
+        <input type='text' placeholder='2001年12月12日'></input>        
       </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 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 class='address' type='text' placeholder='北京市海淀区万泉胜景远小学'></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;
 }

+ 80 - 0
pages/user/myWallet/myWallet.js

@@ -0,0 +1,80 @@
+// pages/user/myWallet/myWallet.js
+Page({
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    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}`
+    // });
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (option) {
+    if (option.title) {
+      wx.setNavigationBarTitle({
+        title: option.title//页面标题为路由参数
+      });
+      this.setData({
+        title: option.title
+      });
+    }
+  },
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+  
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+  
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+  
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+  
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+  
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+  
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+  
+  }
+})

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

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

+ 30 - 0
pages/user/myWallet/myWallet.wxml

@@ -0,0 +1,30 @@
+<!--pages/user/myWallet/myWallet.wxml-->
+<view class="my-wallet">
+    <view class="wallet-header">
+        <view class="total-money">¥ {{ totalMoney }}</view>
+        <view class="text-doc">
+            <view class="text-doc-box">
+                <image src='../../../static/image/mywalletmoney.png'></image>
+            </view>
+            <text>{{ textDoc }}</text>
+        </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">
+                <view class='wallet-left'>
+                    <view class='icon-box'>
+                        <image src='../../../static/image/mywalletdetail.png'></image>
+                    </view>
+                    <text>资金明细</text>
+                </view>
+                <view class='wallet-right'>
+                    <image src='../../../static/image/to.png'></image>
+                </view>
+            </view>
+        </view>
+
+    </view>
+</view>

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

@@ -0,0 +1,75 @@
+/* pages/user/myWallet/myWallet.wxss */
+page{
+    width: 750rpx;
+    background: #F0F1F5;
+}
+.wallet-header {
+    width: 750rpx;
+    height: 218rpx;
+    background-color: #61CA54;
+    color: #FFF;
+}
+.total-money {
+    text-align: center;
+    font-size: 52rpx;
+    line-height: 70rpx;
+}
+.text-doc {
+    display: flex;
+    justify-content:center;
+    align-items:center;
+    font-size: 32rpx;
+    line-height: 42rpx;
+}
+.text-doc-box {
+    width: 30rpx;
+    height: 32rpx;
+    margin-right: 8rpx;
+}
+.text-prompt {
+    margin-top: 20rpx;
+    text-align: center;
+    font-size: 28rpx;
+    line-height: 38rpx;
+}
+
+image{
+    width: 100%;
+    height: 100%;
+}
+
+.wallet-container {
+    width: 716rpx;
+    margin: 0rpx auto;
+}
+.wallet-center{
+    width:680rpx;
+    height:88rpx;
+    margin:0 auto;
+    display:flex;
+    justify-content:space-between;
+    align-items:center;
+}
+.wallet-left {
+    display:flex;
+    align-items:center;
+}
+.icon-box {
+    width: 60rpx;
+    height:60rpx;
+    margin-right:16rpx;
+}
+.wallet-right {
+    width:16rpx;
+    height:28rpx;
+}
+
+.wallet-detail {
+    margin-top:20rpx;
+    width:716rpx;
+    height:88rpx;
+    font-size:34rpx;
+    color:#5E5E5E;
+    background:#FFFFFF;
+    border-radius:14rpx;
+}

+ 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 - 2
pages/user/myconcern/myconcern.wxml

@@ -8,13 +8,13 @@
         <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>

+ 6 - 0
project.config.json

@@ -73,6 +73,12 @@
 					"name": "aaa",
 					"pathName": "pages/groupPage/collage-details/collage-details",
 					"query": "productId=1"
+				},
+				{
+					"id": 5,
+					"name": "concern",
+					"pathName": "pages/user/myconcern/myconcern",
+					"query": ""
 				}
 			]
 		}

BIN
static/image/menu_wrapper.png


BIN
static/image/mywalletdetail.png


BIN
static/image/mywalletmoney.png


BIN
static/image/reward_wrapper.png


+ 49 - 1
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({
@@ -61,6 +60,13 @@ module.exports = {
 			uid
 		}).url(url).send();
 	},
+	// 获取单课朗读信息
+	getClassRead(uid,data){
+		let url = getBaseUrl(`wx/userRead`);
+		return request.getInstance().header({
+			uid
+		}).data(data).url(url).send();
+	},
 	// 发布作品
 	postWork(uid, data) {
 		console.log(data);
@@ -121,6 +127,13 @@ module.exports = {
 			pageSize: pageSize
 		}).send();
 	},
+	// 获取回复(楼中楼)
+	getReplyComment(uid, postId){
+		let url = getBaseUrl(`wx/posts/one/${postId}`);
+		return request.getInstance().header({
+			uid
+		}).url(url).send();
+	},
 	// 发布回复(楼中楼)
 	postReplyComment(uid, data){
 		let url = getBaseUrl(`wx/reply`);
@@ -165,6 +178,13 @@ module.exports = {
 			orderId
 		}).method('POST').send();
 	},
+	// 收藏课程
+	collectBook(uid, data){
+		let url = getBaseUrl(`wx/favorites`);
+		return request.getInstance().header({
+			uid
+		}).url(url).data(data).method('POST').send();
+	},
 	//我的团
 	getMygroup () {
 		let url = getBaseUrl(`wx/groupPurchase/my`);
@@ -190,5 +210,33 @@ module.exports = {
 		}).url(url).data({
 			orderId
 		}).send();
+	},	
+	// 发起奖励
+	rewardMoney(uid, data){
+		let url = getBaseUrl(`wx/wallet/award`);
+		return request.getInstance().header({
+			uid
+		}).url(url).data(data).method('POST').send();
+	},
+  // 修改资料
+  settingUserInfo( wechatName, birthday, gender, eyeshield){
+    let url = getBaseUrl(`wx/user`);
+    return request.getInstance().header({
+      uid: wx.getStorageSync('uid')
+    }).data({
+      wechatName: wechatName,
+      birthday: birthday,
+      gender: gender,
+      eyeshield: eyeshield
+      }).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();
 	}
 }

+ 20 - 2
utils/util.js

@@ -12,7 +12,25 @@ const formatNumber = n => {
   n = n.toString()
   return n[1] ? n : '0' + n
 }
-
+//时间戳转时间
+function formatDate(time, flag) {
+	const t = new Date(time); 
+	const tf = function(i){return (i < 10 ? '0' : '') + i};
+	const year = t.getFullYear();
+	const month = tf(t.getMonth() + 1);
+	const day = tf(t.getDate());
+	const hour = tf(t.getHours());
+	const minute = tf(t.getMinutes());
+	//console.log( month + '月' + day + '日' + hour + ':' + minute);
+	if(flag == 1) {
+		return  month + '月' + day + '日' + ' ' + hour + ':' + minute;
+	}else if(flag == 2) {
+		return year + '-' + month + '-' + day
+	}else if(flag == 3){
+		return month + '-' + day + ' ' + hour + ':' + minute;
+	}
+}
 module.exports = {
-  formatTime: formatTime
+  formatTime: formatTime,
+  formatDate
 }