Browse Source

:sparkles: 合并master上最新代码 解决冲突

sophieChenyx 6 years ago
parent
commit
c12f5e9635
37 changed files with 1148 additions and 302 deletions
  1. 136 70
      .idea/workspace.xml
  2. 1 0
      app.json
  3. 1 1
      component/hot/hot.wxml
  4. 21 13
      component/my/my.js
  5. 3 0
      component/popup/popup.js
  6. 1 1
      component/popup/popup.wxml
  7. 78 51
      component/share/share.js
  8. 1 1
      component/share/share.wxml
  9. 1 1
      component/share/share.wxss
  10. 2 0
      pages/groupPage/collage-details/collage-details.js
  11. 0 1
      pages/groupPage/collage-details/collage-details.wxml
  12. 132 47
      pages/groupPage/group-details/group-details.js
  13. 6 1
      pages/groupPage/group-details/group-details.json
  14. 12 2
      pages/groupPage/group-details/group-details.wxml
  15. 139 0
      pages/groupPage/make-money/make-money.js
  16. 6 0
      pages/groupPage/make-money/make-money.json
  17. 47 0
      pages/groupPage/make-money/make-money.wxml
  18. 97 0
      pages/groupPage/make-money/make-money.wxss
  19. 90 1
      pages/groupPage/my-group/my-group.js
  20. 6 1
      pages/groupPage/my-group/my-group.json
  21. 9 0
      pages/groupPage/my-group/my-group.wxml
  22. 0 9
      pages/index/index.js
  23. 29 14
      pages/main/class/class.js
  24. 2 2
      pages/main/class/class.wxml
  25. 2 1
      pages/main/singleBook/singleBook.js
  26. 42 12
      pages/social/replyDetail/replyDetail.js
  27. 19 15
      pages/social/replyDetail/replyDetail.wxml
  28. 12 0
      pages/social/replyDetail/replyDetail.wxss
  29. 102 20
      pages/social/works/works.js
  30. 7 1
      pages/social/works/works.json
  31. 19 10
      pages/social/works/works.wxml
  32. 27 4
      pages/social/works/works.wxss
  33. 30 5
      pages/user/myEdit/myEdit.js
  34. 10 6
      pages/user/myEdit/myEdit.wxml
  35. 7 1
      project.config.json
  36. BIN
      static/image/no_collect.png
  37. 51 11
      utils/APIClient.js

+ 136 - 70
.idea/workspace.xml

@@ -4,7 +4,6 @@
     <list default="true" id="2ecf3c01-ae46-4667-8997-db10a46d1157" name="Default Changelist" comment="">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/component/my/my.js" beforeDir="false" afterPath="$PROJECT_DIR$/component/my/my.js" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/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" />
@@ -23,19 +22,20 @@
     <session id="-1384404472">
       <usages-collector id="statistics.lifecycle.project">
         <counts>
-          <entry key="project.closed" value="4" />
+          <entry key="project.closed" value="6" />
           <entry key="project.open.time.15" value="1" />
+          <entry key="project.open.time.26" value="1" />
           <entry key="project.open.time.30" value="1" />
           <entry key="project.open.time.32" value="1" />
           <entry key="project.open.time.4" value="1" />
           <entry key="project.open.time.5" value="1" />
-          <entry key="project.opened" value="5" />
+          <entry key="project.opened" value="6" />
         </counts>
       </usages-collector>
       <usages-collector id="statistics.file.extensions.open">
         <counts>
           <entry key="jpg" value="1" />
-          <entry key="js" value="27" />
+          <entry key="js" value="29" />
           <entry key="json" value="5" />
           <entry key="wxml" value="17" />
           <entry key="wxss" value="9" />
@@ -45,23 +45,23 @@
         <counts>
           <entry key="Image" value="1" />
           <entry key="JSON" value="5" />
-          <entry key="JavaScript" value="27" />
+          <entry key="JavaScript" value="29" />
           <entry key="PLAIN_TEXT" value="26" />
         </counts>
       </usages-collector>
       <usages-collector id="statistics.file.extensions.edit">
         <counts>
-          <entry key="js" value="572" />
+          <entry key="js" value="1245" />
           <entry key="json" value="5" />
-          <entry key="wxml" value="90" />
+          <entry key="wxml" value="160" />
           <entry key="wxss" value="87" />
         </counts>
       </usages-collector>
       <usages-collector id="statistics.file.types.edit">
         <counts>
           <entry key="JSON" value="5" />
-          <entry key="JavaScript" value="572" />
-          <entry key="PLAIN_TEXT" value="177" />
+          <entry key="JavaScript" value="1245" />
+          <entry key="PLAIN_TEXT" value="247" />
         </counts>
       </usages-collector>
       <usages-collector id="statistics.js.language.service.starts" />
@@ -73,17 +73,17 @@
       <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/pages/user/myEdit/myEdit.wxml">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="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 relative-caret-position="180">
+              <caret line="6" column="136" lean-forward="true" selection-start-line="6" selection-start-column="136" selection-end-line="6" selection-end-column="136" />
             </state>
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="true">
+      <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/pages/user/myEdit/myEdit.js">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="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 relative-caret-position="390">
+              <caret line="49" column="24" lean-forward="true" selection-start-line="49" selection-start-column="24" selection-end-line="49" selection-end-column="24" />
             </state>
           </provider>
         </entry>
@@ -91,17 +91,20 @@
       <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/pages/main/class/class.js">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="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 relative-caret-position="2460">
+              <caret line="82" column="23" selection-start-line="82" selection-start-column="15" selection-end-line="82" selection-end-column="23" />
+              <folding>
+                <element signature="e#0#54#0" expanded="true" />
+              </folding>
             </state>
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="false">
+      <file pinned="false" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/utils/APIClient.js">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="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 relative-caret-position="360">
+              <caret line="225" column="38" lean-forward="true" selection-start-line="225" selection-start-column="38" selection-end-line="225" selection-end-column="38" />
             </state>
           </provider>
         </entry>
@@ -109,8 +112,8 @@
       <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 relative-caret-position="30">
+              <caret line="1" column="29" selection-start-line="1" selection-start-column="29" selection-end-line="1" selection-end-column="29" />
             </state>
           </provider>
         </entry>
@@ -118,11 +121,12 @@
       <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" />
+            <state relative-caret-position="2070">
+              <caret line="69" column="32" selection-start-line="69" selection-start-column="32" selection-end-line="69" selection-end-column="32" />
               <folding>
                 <element signature="n#!!doc" expanded="true" />
                 <element signature="e#20#81#0" expanded="true" />
+                <element signature="e#104#156#0" expanded="true" />
               </folding>
             </state>
           </provider>
@@ -131,8 +135,17 @@
       <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="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 relative-caret-position="630">
+              <caret line="43" column="40" selection-start-line="43" selection-start-column="40" selection-end-line="43" selection-end-column="40" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/component/hot/hot.js">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="3630">
+              <caret line="121" column="11" selection-start-line="121" selection-start-column="11" selection-end-line="121" selection-end-column="11" />
             </state>
           </provider>
         </entry>
@@ -140,8 +153,8 @@
       <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/utils/httpUtil.js">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="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 relative-caret-position="870">
+              <caret line="29" column="6" selection-start-line="29" selection-start-column="6" selection-end-line="29" selection-end-column="6" />
             </state>
           </provider>
         </entry>
@@ -149,8 +162,8 @@
       <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/component/my/my.wxml">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="-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 relative-caret-position="480">
+              <caret line="19" column="39" selection-start-line="19" selection-start-column="39" selection-end-line="19" selection-end-column="39" />
             </state>
           </provider>
         </entry>
@@ -181,14 +194,14 @@
         <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/index/index.js" />
+        <option value="$PROJECT_DIR$/component/my/my.wxml" />
         <option value="$PROJECT_DIR$/pages/user/myEdit/myEdit.js" />
+        <option value="$PROJECT_DIR$/pages/user/myEdit/myEdit.wxml" />
+        <option value="$PROJECT_DIR$/utils/APIClient.js" />
+        <option value="$PROJECT_DIR$/component/my/my.js" />
       </list>
     </option>
   </component>
@@ -198,18 +211,61 @@
     <detection-done>true</detection-done>
     <sorting>DEFINITION_ORDER</sorting>
   </component>
-  <component name="ProjectFrameBounds" extendedState="7">
+  <component name="ProjectFrameBounds" extendedState="6">
     <option name="x" value="260" />
     <option name="y" value="20" />
     <option name="width" value="1400" />
     <option name="height" value="1000" />
   </component>
+  <component name="ProjectInspectionProfilesVisibleTreeState">
+    <entry key="Project Default">
+      <profile-state>
+        <expanded-state>
+          <State />
+          <State>
+            <id>CSS</id>
+          </State>
+          <State>
+            <id>Code style issuesCSS</id>
+          </State>
+          <State>
+            <id>Control flow issuesJavaScript</id>
+          </State>
+          <State>
+            <id>DOM issuesJavaScript</id>
+          </State>
+          <State>
+            <id>General</id>
+          </State>
+          <State>
+            <id>GeneralJavaScript</id>
+          </State>
+          <State>
+            <id>Invalid elementsCSS</id>
+          </State>
+          <State>
+            <id>JavaScript</id>
+          </State>
+          <State>
+            <id>Probable bugsCSS</id>
+          </State>
+          <State>
+            <id>Pug/Jade</id>
+          </State>
+          <State>
+            <id>YAML</id>
+          </State>
+        </expanded-state>
+      </profile-state>
+    </entry>
+  </component>
   <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
   <component name="ProjectView">
     <navigator proportions="" version="1">
       <foldersAlwaysOnTop value="true" />
     </navigator>
     <panes>
+      <pane id="Scope" />
       <pane id="ProjectPane">
         <subPane>
           <expand>
@@ -237,7 +293,6 @@
           <select />
         </subPane>
       </pane>
-      <pane id="Scope" />
     </panes>
   </component>
   <component name="PropertiesComponent">
@@ -273,18 +328,18 @@
       <workItem from="1541157092216" duration="2211000" />
       <workItem from="1541402122086" duration="6360000" />
       <workItem from="1541554466111" duration="5820000" />
-      <workItem from="1541581837551" duration="8734000" />
+      <workItem from="1541581837551" duration="14978000" />
+      <workItem from="1541640549483" duration="10184000" />
     </task>
     <servers />
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="23887000" />
+    <option name="totallyTimeSpent" value="40315000" />
   </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 active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.13119073" />
       <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
       <window_info id="Favorites" order="2" side_tool="true" />
       <window_info anchor="bottom" id="Message" order="0" />
@@ -445,70 +500,81 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/component/my/my.wxml">
+    <entry file="file://$PROJECT_DIR$/pages/index/index.js">
       <provider selected="true" editor-type-id="text-editor">
-        <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 relative-caret-position="2070">
+          <caret line="69" column="32" selection-start-line="69" selection-start-column="32" selection-end-line="69" selection-end-column="32" />
+          <folding>
+            <element signature="n#!!doc" expanded="true" />
+            <element signature="e#20#81#0" expanded="true" />
+            <element signature="e#104#156#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/utils/APIClient.js">
+    <entry file="file://$PROJECT_DIR$/utils/WXHttpRequest.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 relative-caret-position="30">
+          <caret line="1" column="29" selection-start-line="1" selection-start-column="29" selection-end-line="1" selection-end-column="29" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/utils/WXHttpRequest.js">
+    <entry file="file://$PROJECT_DIR$/component/my/my.wxml">
       <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 relative-caret-position="480">
+          <caret line="19" column="39" selection-start-line="19" selection-start-column="39" selection-end-line="19" selection-end-column="39" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/utils/httpUtil.js">
+    <entry file="file://$PROJECT_DIR$/component/hot/hot.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 relative-caret-position="3630">
+          <caret line="121" column="11" selection-start-line="121" selection-start-column="11" selection-end-line="121" selection-end-column="11" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pages/user/myEdit/myEdit.wxml">
+    <entry file="file://$PROJECT_DIR$/pages/main/class/class.js">
       <provider selected="true" editor-type-id="text-editor">
-        <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 relative-caret-position="2460">
+          <caret line="82" column="23" selection-start-line="82" selection-start-column="15" selection-end-line="82" selection-end-column="23" />
+          <folding>
+            <element signature="e#0#54#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pages/main/class/class.js">
+    <entry file="file://$PROJECT_DIR$/utils/httpUtil.js">
       <provider selected="true" editor-type-id="text-editor">
-        <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 relative-caret-position="870">
+          <caret line="29" column="6" selection-start-line="29" selection-start-column="6" selection-end-line="29" selection-end-column="6" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pages/index/index.js">
+    <entry file="file://$PROJECT_DIR$/pages/user/myEdit/myEdit.wxml">
       <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 relative-caret-position="180">
+          <caret line="6" column="136" lean-forward="true" selection-start-line="6" selection-start-column="136" selection-end-line="6" selection-end-column="136" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pages/user/myEdit/myEdit.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="390">
+          <caret line="49" column="24" lean-forward="true" selection-start-line="49" selection-start-column="24" selection-end-line="49" selection-end-column="24" />
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/component/my/my.js">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="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 relative-caret-position="630">
+          <caret line="43" column="40" selection-start-line="43" selection-start-column="40" selection-end-line="43" selection-end-column="40" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pages/user/myEdit/myEdit.js">
+    <entry file="file://$PROJECT_DIR$/utils/APIClient.js">
       <provider selected="true" editor-type-id="text-editor">
-        <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 relative-caret-position="360">
+          <caret line="225" column="38" lean-forward="true" selection-start-line="225" selection-start-column="38" selection-end-line="225" selection-end-column="38" />
         </state>
       </provider>
     </entry>

+ 1 - 0
app.json

@@ -13,6 +13,7 @@
     "pages/groupPage/grade-details/grade-details",
     "pages/groupPage/collage-details/collage-details",
     "pages/groupPage/my-group/my-group",
+    "pages/groupPage/make-money/make-money",
     "pages/user/myEdit/myEdit",
     "pages/user/myconcern/myconcern",
     "pages/user/myWallet/myWallet",

+ 1 - 1
component/hot/hot.wxml

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

+ 21 - 13
component/my/my.js

@@ -1,4 +1,4 @@
-import APIClient from '../../utils/APIClient'
+import APIClient from '../../utils/httpUtil.js'
 export const myInit =  (that) => {
   that.setData({
     myData: {
@@ -6,6 +6,8 @@ export const myInit =  (that) => {
         concern: '我的关注',
         wallet: '我的钱包',
         address:['北京海淀','中关村','三小'],
+        schoolCity: '青岛市',
+        schoolName: '黄岛区志贤中学',
         playNum: 31549,
         attentionCount: 10254,
         point: 6317,
@@ -33,17 +35,23 @@ export const myInit =  (that) => {
   }
 
   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) => {
-      //
-      // })
+      // const userInfo = wx.getStorageSync('user');
+      // console.log(userInfo.data.data.data);
+      // that.data.myData.user = userInfo.data.data.data;//直接赋值 给 myData的user对象。
+      // that.setData({
+      //     myData: that.data.myData,
+      // },()=>{
+      //     console.log('myData的user对象,赋值成功')
+      //     console.log(that.data.myData);
+      // });
+    APIClient.getOpenidSessionKey(res => {
+      console.log(res.data.data.data);
+      that.data.myData.user = res.data.data.data;//挂载user对象。
+      that.setData({
+        myData: that.data.myData
+      },() => {
+        console.log(that.data.myData)
+      });
+    });
   }()
 }

+ 3 - 0
component/popup/popup.js

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

+ 1 - 1
component/popup/popup.wxml

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

+ 78 - 51
component/share/share.js

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

+ 1 - 1
component/share/share.wxml

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

+ 1 - 1
component/share/share.wxss

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

+ 0 - 9
pages/index/index.js

@@ -81,19 +81,10 @@ Page({
       hotInit(this);
     }
     if (myIndex == 2) {
-      console.log('follow')
       followInit(this);
     }
     if (myIndex == 3) {
       myInit(this);
-      getOpenidSessionKey((res) => {
-          console.log('个人',res);
-      }, (error) => {
-          // console.log(error)
-          this.setData({
-              hide: !this.data.hide
-          })
-      });
     }
   },
   onLoad: function (options) {

+ 29 - 14
pages/main/class/class.js

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

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

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

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

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

+ 42 - 12
pages/social/replyDetail/replyDetail.js

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

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

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

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

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

+ 102 - 20
pages/social/works/works.js

@@ -12,12 +12,16 @@ Page({
         total: '',
         authorAvatar: '',
         user: [],
-        inputValue: 'smdx',
+        inputValue: '',
+        inputSBValue:'',
         replyList: [],
-        howMuch: '2000',
+        howMuch: '200',
         moneySelect: 'moneySelect',
         moneyNormal: 'moneyNormal',
-        ifReward: false
+        ifReward: false,
+        id: '',
+        replyModal: false
+        // shareFlag: false
     },
     onLoad: function (option) {
         console.log(option)
@@ -30,11 +34,16 @@ Page({
             title: option.title,
             id: option.id
         })
-        let uid = wx.getStorageSync('uid');
-        this.getWorks(uid, option.id);
+        this.uid = wx.getStorageSync('uid');
+        this.getWorks(this.uid, option.id);
     },
+    // onReady: function () {
+
+    // },
     getWorks: function (uid, id) {
         httpRequestApi.getWorksDetail(uid, id).success((res) => {
+            console.log(res);
+            console.log(id)
             const others = res.data.data.otherRead;
             const author = res.data.data.user;
             const works = res.data.data.userRead;
@@ -51,7 +60,10 @@ Page({
                 authorAvatar: author.avatar,
                 authorUid: author.uid,
                 videoSrc: works.originVideo,
-                audioSrc: works.audioPath
+                audioSrc: works.audioPath,
+                iconImg: works.iconImg,
+                isLike: res.data.data.isLike,
+                isFans: res.data.data.isFans,
             })
             // 设置音频路径
             this.innerAudioContext = wx.createInnerAudioContext();
@@ -62,8 +74,44 @@ Page({
             this.getReply();
         });
     },
+    likeWorks: function (e) {
+        if(this.data.isLike){
+            wx.showToast({
+                title: '不要重复点赞哦',
+                icon: 'fail',
+                duration: 1000
+              })
+            return;
+        }
+        httpRequestApi.likeWorks(this.uid, this.data.id).success(res => {
+            console.log(this.uid)
+            wx.showToast({
+                title: '点赞数+1',
+                icon: 'success',
+                duration: 1000
+              })
+        });
+    },
+    // 弹出分享框
+    openShare: function (e) {
+        // this.setData({
+        //     shareFlag: !this.data.shareFlag
+        // })
+        this.shareDialog = this.selectComponent("#share-dialog");
+        const data = {
+            avatar: this.data.authorAvatar,
+            author: this.data.author,
+            iconImg: this.data.iconImg,
+            title: this.data.title,
+            // tip: this.data.tip,
+        }
+        this.shareDialog.share(data);
+    },
     videoPlay: function () {
         this.innerAudioContext.play();
+        httpRequestApi.playWorks(this.uid, this.data.id).success(res => {
+
+        })
     },
     videoEnd: function () {
         this.innerAudioContext.stop();
@@ -75,7 +123,7 @@ Page({
         let id = this.data.id;
         let title = this.data.title;
         wx.navigateTo({
-            url: `../../main/reading/reading?id=${id}&title=${title}`
+            url: `../../main/reading/reading?id=${id}&title=${title}&img=${this.data.iconImg}&video=${this.data.videoSrc}`
         })
     },
     onShareAppMessage: function (res) {
@@ -89,19 +137,23 @@ Page({
         }
     },
     follow: function () {
-        let uid = wx.getStorageSync('uid');
-        let followUid = 2;
-        httpRequestApi.followUser(uid, followUid).success((res) => {
-            console.log(res)
+        // let uid = wx.getStorageSync('uid');
+        let followUid = this.data.authorUid;
+        httpRequestApi.followUser(this.uid, followUid).success((res) => {
+            wx.showToast({
+                title: !this.data.isFans? '取消关注' : '关注啦',
+                icon: 'success',
+                duration: 1000
+              })
         });
     },
     // 点赞评论
     likeCommend: function (e) {
         console.log(e);
-        let uid = wx.getStorageSync('uid');
+        // let uid = wx.getStorageSync('uid');
         let followUid = e.currentTarget.dataset.id;
         let index = e.currentTarget.dataset.index;
-        httpRequestApi.likeCommend(uid, followUid).success(res => {
+        httpRequestApi.likeCommend(this.uid, followUid).success(res => {
             console.log(res);
             const str = `replyList[${index}].likes`;
             this.setData({
@@ -117,12 +169,11 @@ Page({
     },
     // 查询回复
     getReply: function () {
-        let uid = wx.getStorageSync('uid');
+        // let uid = wx.getStorageSync('uid');
         let columnId = this.data.id;
-        console.log(columnId)
         let pageNo = 1;
         let pageSize = 10;
-        httpRequestApi.getReply(uid, columnId, pageNo, pageSize).success((res) => {
+        httpRequestApi.getReply(this.uid, columnId, pageNo, pageSize).success((res) => {
             console.log(res.data.data.list);
             const replyList = res.data.data.list;
             const replyTemp = [];
@@ -163,17 +214,43 @@ Page({
     sendHandler: function () {
         console.log(this.data.inputValue);
         if (this.data.inputValue !== '') {
-            let uid = wx.getStorageSync('uid');
+            // let uid = wx.getStorageSync('uid');
             let data = {
                 "columnId": this.data.id,
                 colunmNames: 'what',
                 "detailDesc": this.data.inputValue
             }
-            httpRequestApi.postReply(uid, data).success(res => {
+            httpRequestApi.postReply(this.uid, data).success(res => {
                 console.log(res);
             });
         }
     },
+    // 设置点击时的id
+    setSBId: function(e){
+        console.log(e)
+        this.setData({
+            replySBId: e.currentTarget.dataset.id,
+            replyModal: true
+        })
+    },
+    // 回复某个评论
+    replySB: function () {
+        const data = {
+            postsId: this.data.replySBId,
+            content: this.data.inputSBValue
+        }
+        httpRequestApi.postReplyComment(this.uid, data).success(res => {
+            this.setData({
+                replyModal: false
+            })
+        });
+    },
+    // 获取回复楼中楼的内容
+    inputSBValue: function(e){
+        this.setData({
+            inputSBValue: e.detail.value
+        });
+    },
     // 选择金额
     setMoney: function (e) {
         this.setData({
@@ -185,6 +262,11 @@ Page({
             ifReward: true
         })
     },
+    quitReward:function () {
+        this.setData({
+            ifReward: false
+        })
+    },
     // 奖励
     rewardMoney: function () {
         console.log(this.data.authorUid);
@@ -192,8 +274,8 @@ Page({
             targetUid: this.data.authorUid,
             amount: this.data.howMuch
         }
-        let uid = wx.getStorageSync('uid');
-        httpRequestApi.rewardMoney(uid, data).success(res => {
+        // let uid = wx.getStorageSync('uid');
+        httpRequestApi.rewardMoney(this.uid, data).success(res => {
             console.log(res);
             this.payMoneyt(res.data.data);
         })

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

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

+ 19 - 10
pages/social/works/works.wxml

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

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

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

+ 30 - 5
pages/user/myEdit/myEdit.js

@@ -12,7 +12,32 @@ Page({
       { value: '家长', checked: false },
       { value: '老师', checked: false },
       { value: '学生', checked: true }
-    ]
+    ],
+    date: '2001年12月12日',
+    msg: '',
+    nickname: ''
+  },
+  saveNickName: function(e){
+    let nickname = e.detail.value;
+    this.setData({
+      nicename: nickname
+    }, () => {
+      console.log(nickname);
+    });
+  },
+  saveAddress: function(e){
+    let msg = e.detail.value;
+    this.setData({
+      msg: msg
+    },() => {
+      console.log(msg);
+    });
+  },
+  bindDateChange: function(e) {
+    console.log(e.detail.value)
+    this.setData({
+        date: e.detail.value
+    });
   },
   optionAction:function(e){
     console.log(e.detail.value);
@@ -21,13 +46,13 @@ Page({
     console.log(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 => {
+    let { nickname, picker, radioGroup1, radioGroup2, address } = e.detail.value;
+    let wechatName = nickname, mobile = '13994969642', gender = 3, schoolProvince = 11, schoolCity = '运城市', schoolName = '康杰中学', profession = radioGroup2, birthday = picker;
+    httpRequestApi.settingUserInfo(wechatName, mobile, gender, schoolProvince, schoolCity, schoolName, profession, birthday).success(res => {
       console.log(res.data.data);
         wx.redirectTo({
             url: '/pages/index/index?index=3'
-        })
+        });
       // wx.navigateBack({
       //
       //  });

+ 10 - 6
pages/user/myEdit/myEdit.wxml

@@ -4,7 +4,7 @@
       <view class='nickname-box'>
         <text class='setting-title'>昵称</text>
         <view class='user-action'>
-          <input class='nickname' type='text' placeholder='喔喔' placeholder-class='placeholderStyle' focus='{{ true }}'>
+          <input name='nickname' class='nickname' type='text' placeholder='喔喔' placeholder-class='placeholderStyle' focus='{{ true }}' value='{{ nickname }}' bindblur='saveNickName'>
           </input>
         </view>
         <view class='edit-img'>
@@ -13,7 +13,7 @@
       </view>
       <view class='sex-box'>
         <view class='setting-title'>性别</view>
-        <radio-group class="radio-group" bindchange="optionAction">
+        <radio-group name='radioGroup1' class="radio-group" bindchange="optionAction">
           <label class="radio" wx:for="{{ sexs }}" wx:key="{{ index }}">
             <text class='sex-title'>{{ item.value }}</text>
             <radio value="{{ item.value }}" checked="{{ item.checked }}" color='#fff' />
@@ -21,12 +21,16 @@
         </radio-group>
       </view>
       <view class='birthday-box'>
-        <text class='setting-title'>生日</text>
-        <input type='text' placeholder='2001年12月12日'></input>        
+        <picker name='picker' mode="date" value="{{ date }}" start="1900-01-01" end="2018-09-01" bindchange="bindDateChange">
+            <view class="picker">
+              <text class='setting-title'>生日</text>
+              <text>{{ date }}</text>
+            </view>
+        </picker>
       </view>
       <view class='occupation-box'>
         <text class='setting-title'>职业</text>
-        <radio-group class="radio-group" bindchange="optionSetting">
+        <radio-group name='radioGroup2' class="radio-group" bindchange="optionSetting">
           <label class="radio" wx:for="{{ occupations }}" wx:key="{{ index }}">
             <text class='sex-title'>{{ item.value }}</text>
             <radio value="{{ item.value }}" checked="{{ item.checked }}" color='#fff' />
@@ -35,7 +39,7 @@
       </view>
       <view class='school-box'>
         <text class='setting-title'>学校</text>
-        <input class='address' type='text' placeholder='北京市海淀区万泉胜景远小学'></input>
+        <input name='address' class='address' type='text' placeholder='北京市海淀区万泉胜景远小学' value='{{ msg }}' bindblur='saveAddress'></input>
         <view class='edit-image'>
           <image src='../../../static/image/edit.png' class='icon'></image>
         </view>

+ 7 - 1
project.config.json

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

BIN
static/image/no_collect.png


+ 51 - 11
utils/APIClient.js

@@ -47,10 +47,10 @@ module.exports = {
 		}).send();
 	},
 	// 获取课本详情
-	getBookDetail(id) {
+	getBookDetail(uid,id) {
 		let url = getProductUrl(`wx/product/${id}`);
 		return request.getInstance().header({
-			uid: wx.getStorageSync('uid')
+			uid
 		}).url(url).send();
 	},
 	// 获取单课详情
@@ -60,6 +60,19 @@ module.exports = {
 			uid
 		}).url(url).send();
 	},
+	// 检查是否收藏过课程
+	classIsLike(uid,data){
+		let url = getProductUrl(`wx/favorites/isLike`);
+		return request.getInstance().header({
+			uid
+		}).url(url).data(data).send();
+	},
+	getClassDetail(uid,id) {
+		let url = getProductUrl(`wx/lesson/${id}`);
+		return request.getInstance().header({
+			uid
+		}).url(url).send();
+	},
 	// 获取单课朗读信息
 	getClassRead(uid,data){
 		let url = getBaseUrl(`wx/userRead`);
@@ -67,6 +80,13 @@ module.exports = {
 			uid
 		}).data(data).url(url).send();
 	},
+	// 作品播放了+1
+	playWorks(uid,readId){
+		let url = getBaseUrl(`wx/userRead/play/${readId}`);
+		return request.getInstance().header({
+			uid
+		}).url(url).send();
+	},
 	// 发布作品
 	postWork(uid, data) {
 		console.log(data);
@@ -75,6 +95,13 @@ module.exports = {
 			uid
 		}).url(url).data(data).method('POST').send();
 	},
+	// 点赞作品
+	likeWorks(uid,readId){
+		let url = getBaseUrl(`wx/userRead/like/${readId}`);
+		return request.getInstance().header({
+			uid
+		}).url(url).send();
+	},
 	// 关注用户 
 	followUser(uid, followUid) {
 		let url = getBaseUrl(`wx/fans`);
@@ -209,6 +236,15 @@ module.exports = {
 			uid: wx.getStorageSync('uid')
 		}).url(url).send();
 	},
+	//团购是否成功
+	groupSuccess (orderId) {
+		let url = getBaseUrl(`wx/groupPurchase/joinStatus`);
+		return request.getInstance().header({
+			uid: wx.getStorageSync('uid')
+		}).url(url).data({
+			orderId
+		}).send();
+	},	
 	// 发起奖励
 	rewardMoney(uid, data){
 		let url = getBaseUrl(`wx/wallet/award`);
@@ -217,24 +253,28 @@ module.exports = {
 		}).url(url).data(data).method('POST').send();
 	},
   // 修改资料
-  settingUserInfo( wechatName, birthday, gender, eyeshield){
+  settingUserInfo(wechatName, mobile, gender, schoolProvince, schoolCity, schoolName, profession, birthday){
     let url = getBaseUrl(`wx/user`);
     return request.getInstance().header({
       uid: wx.getStorageSync('uid')
     }).data({
       wechatName: wechatName,
-      birthday: birthday,
+      mobile: mobile,
       gender: gender,
-      eyeshield: eyeshield
+      schoolProvince: schoolProvince,
+      schoolCity: schoolCity,
+      schoolName: schoolName,
+      profession: profession,
+      birthday: birthday
       }).url(url).method('PUT').send();
   },
   //获取个人信息
 	getUserInfo () {
-        let url = getBaseUrl(`wx/user`);
-        return request.getInstance().header({
-            uid: wx.getStorageSync('uid')
-        }).data({
-            uid: wx.getStorageSync('uid')
-        }).url(url).send();
+    let url = getBaseUrl(`wx/user`);
+    return request.getInstance().header({
+        uid: wx.getStorageSync('uid')
+    }).data({
+        uid: wx.getStorageSync('uid')
+    }).url(url).send();
 	}
 }