Rorschach пре 6 година
родитељ
комит
9a63e693c8
42 измењених фајлова са 576 додато и 521 уклоњено
  1. 1 0
      app.wxss
  2. 2 2
      component/flowerBox/flowerBox.js
  3. 0 41
      component/follow/follow.js
  4. 0 31
      component/follow/follow.wxml
  5. 0 147
      component/follow/follow.wxss
  6. 25 19
      component/group/group.js
  7. 12 12
      component/group/group.wxml
  8. 4 4
      component/group/group.wxss
  9. 58 29
      component/hot/hot.js
  10. 23 10
      component/hot/hot.wxml
  11. 37 5
      component/hot/hot.wxss
  12. 0 6
      component/my/my.js
  13. 17 18
      component/my/my.wxml
  14. 1 0
      component/my/my.wxss
  15. 18 5
      component/share/share.js
  16. 3 3
      pages/groupPage/collage-details/collage-details.wxml
  17. 8 2
      pages/groupPage/group-details/group-details.js
  18. 3 8
      pages/groupPage/group-details/group-details.wxml
  19. 2 0
      pages/groupPage/group-details/group-details.wxss
  20. 50 46
      pages/groupPage/my-group/my-group.js
  21. 96 46
      pages/index/index.js
  22. 14 1
      pages/index/index.wxml
  23. 60 11
      pages/index/index.wxss
  24. 2 1
      pages/main/books/books.wxss
  25. 7 7
      pages/main/class/class.js
  26. 1 1
      pages/social/insideMessage/insideMessage.wxml
  27. 1 0
      pages/social/insideMessage/insideMessage.wxss
  28. 19 15
      pages/social/littleFlower/littleFlower.js
  29. 3 2
      pages/social/littleFlower/littleFlower.wxml
  30. 8 3
      pages/social/littleFlower/littleFlower.wxss
  31. 30 24
      pages/social/replyDetail/replyDetail.js
  32. 6 1
      pages/social/replyDetail/replyDetail.json
  33. 1 1
      pages/social/replyDetail/replyDetail.wxml
  34. 27 7
      pages/social/works/works.js
  35. 3 3
      pages/social/works/works.wxml
  36. 4 1
      pages/social/works/works.wxss
  37. 1 0
      pages/user/myEdit/myEdit.js
  38. 2 2
      pages/user/myEdit/myEdit.wxml
  39. 7 5
      pages/user/myEdit/myEdit.wxss
  40. 2 0
      pages/user/mycourse/mycourse.wxss
  41. 8 1
      project.config.json
  42. 10 1
      utils/APIClient.js

+ 1 - 0
app.wxss

@@ -2,6 +2,7 @@
 page {
   width: 100%;
   height: 100%;
+  overflow-x: hidden;
   color: #444;
   font-family: PingFang SC, Microsoft Yahei, Source Han Sans CN, SimHei;
 }

+ 2 - 2
component/flowerBox/flowerBox.js

@@ -4,8 +4,8 @@ Component({
      */
     properties: {
         flowerNum: {
-        type: "String",
-        value: '1'
+        type: Number,
+        value: 1
       }
     },
   

+ 0 - 41
component/follow/follow.js

@@ -1,41 +0,0 @@
-import httpRequestApi from '../../utils/APIClient';
-import {
-  formatDate
-} from '../../utils/util';
-export const followInit = (that) => {
-  that.setData({
-    followData: []
-  })
-  //请求数据封装
-  that.getWorks = (pageNo, pageSize) => {
-    httpRequestApi.getFollowWorks(pageNo, pageSize).success(res => {
-      console.log(res)
-      const followData = res.data.data.list;
-      // const followTemp = [];
-      followData.forEach(item => {
-        const temp = {};
-        console.log(item.userRead.id)
-        temp.nickName = item.user.wechatName;
-        temp.avatar = item.user.avatar;
-        temp.plays = item.userRead.playAmount;
-        temp.likes = item.userRead.likeAmount;
-        temp.img = item.userRead.iconImg;
-        temp.id = item.userRead.id;
-        temp.title = item.userRead.title;
-        temp.summary = item.userRead.summary;
-        temp.time = formatDate(item.userRead.gmtCreated, 3);
-        // 还差一些字段
-        that.data.followData.push(temp);
-      });
-      // console.log(followTemp);
-      that.setData({
-        followData: that.data.followData,
-        followPageTotalNo: res.data.data.totalNo
-      })
-      httpRequestApi.userIntoPage('pages/index/index','首页动态').success((res)=>{
-        
-      })
-    });
-  }
-  that.getWorks(1, 5);
-}

+ 0 - 31
component/follow/follow.wxml

@@ -1,31 +0,0 @@
-<template name="follow">  
-  <view class="followWares">
-    <view wx:for="{{followData}}" wx:key="{{index}}" class="followWareCard" bindtap="openWorks" data-readid="{{item.id}}" data-title="{{item.title}}">
-      <view class="topData">
-        <view class="worksLeft">
-          <image class="authorAvatar" src="{{item.avatar}}" />
-          <view class="worksInfo">
-            <view class="authorName">{{item.nickName}}</view>
-            <view class="time">{{item.time}}</view>
-          </view>
-        </view>
-        <view class="numberInfo">
-          <view class="wareCardPlays">
-            <text>{{item.plays}}</text>
-            <image class="wareCardPlaysImg" src="../../static/image/hotPlays.png" />
-          </view>
-          <view class="wareCardLikes">
-            <text>{{item.likes}}</text>
-            <image class="wareCardLikesImg" src="../../static/image/like.png" />
-          </view>
-        </view>
-      </view>
-      <image class="wareCardImg" src="{{item.img}}" />
-      <view class="titleSummary">
-        <text class="wareCardTitle">{{item.title}}</text>
-        <text class="wareCardTip">{{item.summary}}</text>
-      </view>
-    </view>
-  </view>
-  <myPlacerholder line1="您还没有关注过用户" line2="快去关注吧" wx:if="{{followData.length <= 0}}" />  
-</template>

+ 0 - 147
component/follow/follow.wxss

@@ -1,147 +0,0 @@
-.followWares {
-    display: flex;
-    flex-wrap: wrap;
-    margin-top:26rpx;
-    /* background: #e8e8e8; */
-}
-.followWareCard {
-    position: relative;
-    overflow: hidden;
-    width: 720rpx;
-    height: 476rpx;
-    background: #fff;
-    /* padding: 26rpx; */
-    border-radius: 12rpx;
-    /* margin: 0 0 18rpx 16rpx; */
-    margin: 0 auto 20rpx;
-    /* box-shadow: 0 8rpx 6rpx 0 rgba(0, 0, 0, .28); */
-}
-
-
-
-.followWareCard .wareCardImg {
-    display: block;
-    width: 662rpx;
-    height: 272rpx;
-    margin: 22rpx auto 0;
-    border-radius: 20rpx;
-}
-
-.followWareCard .titleSummary {
-    display: flex;
-    justify-content: space-between;
-    margin-top: 12rpx;
-}
-
-.followWareCard .wareCardTitle {
-    /* margin: 0 auto; */
-    width: 80%;
-    height: 46rpx;
-    display: block;
-    /* text-align: left; */
-    color: #414141;
-    font-size: 32rpx;
-    letter-spacing: 4rpx;
-    margin-left: 28rpx;
-    /* font-family: MicrosoftYaHei; */
-}
-
-.followWareCard .topData {
-    height: 92rpx;
-    margin-top: 22rpx;
-    display: flex;
-    flex-direction: row;
-    /* justify-content: space-between; */
-    align-items: center;
-}
-
-.worksLeft {
-    display: flex;
-    flex-direction: row;
-    flex:1;
-    margin-left:10rpx;
-    position:relative;
-
-}
-
-.worksLeft .worksInfo .authorName {
-    color: #393939;
-    font-size: 30rpx;
-    margin-top: 8rpx;
-
-}
-
-.worksLeft .worksInfo .time {
-    color: #393939;
-    font-size: 30rpx;
-
-}
-
-.followWareCard .topData .wareCardPlays {
-    width: 100rpx;
-    /* margin-left: 270rpx; */
-    display: flex;
-    flex-direction: row-reverse;
-    align-items: center;
-    padding-right:35rpx;
-
-}
-
-.followWareCard .topData .authorAvatar {
-    width: 92rpx;
-    height: 92rpx;
-    margin: 0 22rpx 0 22rpx;
-    display: block;
-
-    border-radius: 50%;
-}
-.topData .numberInfo{
-    display: flex;
-    flex-direction: column;
-}
-.followWareCard .wareCardTip {
-    width: 178rpx;
-    height: 40rpx;
-    display: block;
-    text-align: left;
-    color: #444;
-    font-size: 24rpx;
-    line-height:44rpx;
-
-}
-
-.followWareCard .wareCardPlays .wareCardPlaysImg {
-    width:26rpx;
-height:26rpx;
-margin-right: 6rpx;
-float: right;
-}
-
-.followWareCard .wareCardPlays text {
-    margin-left: 4rpx;
-    color: #5e5e5e;
-    font-size: 22rpx;
-    text-align:right;
-/* width:57%; */
-    float: right;
-}
-
-.followWareCard .wareCardLikes {
-    width: 100rpx;
-    margin-right: 18rpx;
-    display: flex;
-    flex-direction: row-reverse;
-    align-items: center;
-}
-
-.followWareCard .wareCardLikes .wareCardLikesImg {
-    width:26rpx;
-height:24rpx;
-margin-right: 6rpx;
-}
-
-.followWareCard .wareCardLikes text {
-    margin-left: 4rpx;
-    color: #FF9800;
-    font-size: 24rpx;
-}

+ 25 - 19
component/group/group.js

@@ -2,24 +2,30 @@ import httpRequestApi from '../../utils/APIClient';
 import util from '../../utils/util';
 const app = getApp();
 export const groupInit = (that) => {
-  that.setData({
-    groupData: {
-      recommendList: [],
-      bookList: [],
-      sendGroupFlag: true,
-      selectFlag: [],
-      isIPX: app.globalData.isIPX,
-      timeList: [],
-      listLength: '',
-      baseIndex: 0,
-      isIOS: app.globalData.isIOS,
-      alertFlag: false,
-      myGroupGoing: 0
-    },
-    groupIndex: 1
-  })
-  //推荐团购
+  if(!that.data.groupData){
+    that.setData({
+      groupData: {
+        recommendList: [],
+        bookList: [],
+        sendGroupFlag: true,
+        selectFlag: [],
+        isIPX: app.globalData.isIPX,
+        timeList: [],
+        listLength: '',
+        baseIndex: 0,
+        isIOS: app.globalData.isIOS,
+        alertFlag: false,
+        myGroupGoing: 0
+      },
+      groupIndex: 1
+    })
+  }
+
+  //推荐团购 flag是判断是否获取全部课程
   that.recommend = function () {
+    if(that.data.groupData.bookList.length === 0){
+      that.getGroupList();
+    }
     console.log(that.data.listLength)
     let osType = app.globalData.isIOS ? 'IOS' : 'ANDROID'
     httpRequestApi.getGroupList(that.data.groupIndex,osType).success((res) => {
@@ -58,7 +64,7 @@ export const groupInit = (that) => {
       console.log(res)
       const str = 'groupData.myGroupGoing';
       that.setData({
-        [str]: res.data.count
+        [str]: res.data.data
       })
     })
   },
@@ -80,7 +86,7 @@ export const groupInit = (that) => {
     }).fail((error) => {
       console.log('错误', error)
     })
-  }();
+  };
 
   that.recommend();
 

+ 12 - 12
component/group/group.wxml

@@ -26,24 +26,24 @@
           </view>
         </block>
         <view class="btn-area">
-            <view class="btn-item" bindtap='toMyCollage' wx:if="{{groupData.myGroupGoing > 0}}">我的{{groupData.isIOS ? '助力' : '拼团'}}<text class="red-text">({{groupData.myGroupGoing}})</text>
-          <image src="../../static/image/little_firends.png" />
-        </view>
-         <view class="btn-item"  wx:if="{{groupData.myGroupGoing <= 0}}" bindtap="more" data-type="course">
-           开个团试试
-          <image src="../../static/image/little_firends.png" />
-        </view>
-        <view class="btn-item" bindtap="change">换一批看看
-          <image src="../../static/image/refresh.png" />
-        </view>
+            <view class="btn-item" bindtap='toMyCollage' wx:if="{{groupData.myGroupGoing > 0 && groupData.recommendList.length >3 }}">我的{{groupData.isIOS ? '助力' : '拼团'}}<text class="red-text">({{groupData.myGroupGoing}})</text>
+              <image src="../../static/image/little_firends.png" />
+            </view>
+            <view class="btn-item"  wx:if="{{groupData.myGroupGoing <= 0 || groupData.recommendList.length <=3}}" bindtap="more" data-type="course ">
+               开个团试试
+              <image src="../../static/image/little_firends.png" />
+            </view>
+            <view class="btn-item" wx:if="{{groupData.recommendList.length >3}}" bindtap="change">换一批看看
+              <image src="../../static/image/refresh.png" />
+            </view>
         </view>
       </view>
       <view class="title">
         <text class="title-regular left">全部课程</text>
-        <view class="right" bindtap="more" data-type="course">
+        <!-- <view class="right" bindtap="more" data-type="course">
           更多
           <image src="../../static/image/black_to.png" />
-        </view>
+        </view> -->
       </view>
       <view class="whole-group">
         <view class="group-box">

+ 4 - 4
component/group/group.wxss

@@ -114,8 +114,8 @@ scroll-view {
     font-weight: 800;
     display: flex;
     flex-direction: row;
-    justify-content: space-between;
-    padding: 27rpx 60rpx;
+    justify-content: space-around;
+    padding: 27rpx 0;
     box-sizing: border-box;
 }
 
@@ -146,7 +146,7 @@ scroll-view {
     display: flex;
     align-items: center;
     justify-content: space-between;
-    height: 70rpx;
+    /* height: 70rpx; */
     padding: 0 18rpx;
     position: relative;
     box-sizing: border-box;
@@ -175,7 +175,7 @@ scroll-view {
     color: #393939;
     font-weight: 800;
     position: absolute;
-    top: 30rpx;
+    top: 10rpx;
     right: 30rpx;
 }
 

+ 58 - 29
component/hot/hot.js

@@ -3,14 +3,10 @@ import {
   formatDate
 } from '../../utils/util';
 export const hotInit = (that) => {
-  that.setData({
+  if (!that.data.hotData) {
+    that.setData({
       hotData: {
         title: '热门',
-        imgUrls: [
-          '../../static/image/timg.jpg',
-          '../../static/image/timg.jpg',
-          '../../static/image/timg.jpg'
-        ],
         autoplay: true,
         interval: 5000,
         duration: 700,
@@ -24,12 +20,14 @@ export const hotInit = (that) => {
         winH: that.data.winH,
         searchIcon: true,
         unReadMessageNum: 0,
-        myCourse: []
+        myCourse: [],
+        inputFocus: false
         // circular: true
       }
-    }),
-    // 搜索方法
-    that.searchHandler = () => {
+    })
+  }
+  // 搜索方法
+  that.searchHandler = () => {
       // if (that.data.hotInput.lenght !== 0) {
       //   wx.navigateTo({
       //     url: `../main/searchResult/searchResult?keyWords=${that.data.hotInput}`
@@ -52,16 +50,24 @@ export const hotInit = (that) => {
 
   // 输入框输入
   that.inputHandler = (e) => {
-    that.setData({
-      hotInput: e.detail.value
-    });
-  }
-  // 打开全部课本
-  that.openBooks = (e) => {
-    wx.navigateTo({
-      url: `../main/books/books`
-    })
-  }
+      that.setData({
+        hotInput: e.detail.value
+      });
+    },
+    // 输入框聚焦
+    that.inputFocus = () => {
+      const str = 'hotData.inputFocus'
+      that.setData({
+        [str]: true
+      });
+      console.log(that.data.hotData.inputFocus)
+    },
+    // 打开全部课本
+    that.openBooks = (e) => {
+      wx.navigateTo({
+        url: `../main/books/books`
+      })
+    }
   // 打开更多页面
   that.openMore = () => {
     wx.navigateTo({
@@ -118,9 +124,19 @@ export const hotInit = (that) => {
     httpRequestApi.getHotRecommend(
       uid
     ).success((res) => {
-      console.log(res)
+      // 点击切换按钮时 只刷新我的课程和未读消息 官方推荐和热门不加载
       const recommendRes = res.data.data;
-      // const recommendWorks = [];
+      console.log(that.data.hotData.hotWorks.length)
+      if (that.data.hotData.hotWorks.length > 0) {
+        const myCourseStr = 'hotData.myCourse'
+        const unReadMessageNum = 'hotData.unReadMessageNum'
+        console.log(recommendRes)
+        that.setData({
+          [myCourseStr]: recommendRes.myCourse,
+          [unReadMessageNum]: recommendRes.unreadCount
+        })
+        return;
+      }
       recommendRes.hotReader.forEach(item => {
         const temp = {};
         temp.title = item.userRead.title;
@@ -130,11 +146,11 @@ export const hotInit = (that) => {
         temp.likes = item.userRead.likeAmount ? item.userRead.likeAmount : 0;
         temp.classId = item.userRead.id;
         temp.time = formatDate(item.userRead.gmtCreated, 3);
-        temp.avatar = item.user.avatar;
-        temp.profession = item.user.profession;
-        temp.uid = item.user.uid;
+        temp.avatar = item.user ? item.user.avatar : '';
+        temp.profession =  item.user ?  item.user.profession : '';
+        temp.uid =  item.user ?  item.user.uid : '';
         // temp.avatar = item.user.avatar;
-        temp.nickName = item.user.wechatName;
+        temp.nickName = item.user ?   item.user.wechatName : '';
         // recommendWorks.push(temp);
         that.data.hotData.hotWorks.push(temp);
       });
@@ -145,7 +161,8 @@ export const hotInit = (that) => {
       that.setData({
         [hotStr]: that.data.hotData.hotWorks,
         [myCourseStr]: recommendRes.myCourse,
-        [unReadMessageNum]: recommendRes.unreadCount
+        [unReadMessageNum]: recommendRes.unreadCount,
+        unfinishedCount: recommendRes.unfinishedCount
       })
     })
   }
@@ -176,8 +193,14 @@ export const hotInit = (that) => {
   that.scrollUpdate = (e) => {
     console.log(e)
   }
-  that.getIndex();
-  that.getHotRecommend(that.uid, 1, 3);
+  console.log(that.data.hotData.recommend)
+
+  if(wx.getStorageSync('uid')){
+    that.getIndex();
+    that.getHotRecommend(wx.getStorageSync('uid'));
+  }
+  // that.getIndex();
+
   // 获取全部课本
   // that.getBookList();
   that.swiperChange = (e) => {
@@ -196,4 +219,10 @@ export const hotInit = (that) => {
       url: `/pages/groupPage/grade-details/grade-details?productId=${id}&title=${title}`
     })
   }
+  that.swiperChange = (e) => {
+    const str = 'hotData.swiperCurrent'
+    that.setData({
+      [str]: e.detail.current
+    });
+  }
 }

+ 23 - 10
component/hot/hot.wxml

@@ -1,16 +1,24 @@
 <template name="hot">
     <view class="messageSection" wx:if="{{hotData.unReadMessageNum > 0}}" bindtap="goToMessage">
-        <image class="messageIcon" src="../../static/image/message_icon.png"  />
-        <text class="messageText">您有<text class="red-text">{{hotData.unReadMessageNum}}</text>条未读消息【立即查看】</text>
+        <image class="messageIcon" src="../../static/image/message_icon.png" />
+        <text class="messageText">您有<text class="red-text">{{hotData.unReadMessageNum}}</text>条未读消息【立即查看】
+        </text>
     </view>
     <view class="myCourseSection">
-        <view class="title-regular">我的课程</view>
+        <view class="title">
+<view class="title-regular">我的课程</view>
+         <view class="right" bindtap="toMyCourse" wx:if="{{hotData.myCourse.length > 3}}">
+          更多
+          <image src="../../static/image/black_to.png" />
+        </view>
+        </view>
+        
         <view class="myCoursePlaceHolder" wx:if="{{hotData.myCourse.length === 0}}" bindtap="goToBooks">
             <image src="../../static/image/add_class.png" />
         </view>
         <view class="book-box" wx:if="{{hotData.myCourse.length !== 0}}">
             <block wx:for="{{hotData.myCourse}}" wx:key="{{index}}">
-                <view class="book-item" data-id="{{item.id}}" bindtap="goToBook" data-title="{{item.title}}">
+                <view class="book-item" data-id="{{item.productId}}" bindtap="goToBook" data-title="{{item.title}}">
                     <image class="book-img" src="{{item.iconImg}}"></image>
                     <view class="book-title">{{item.title}}</view>
                 </view>
@@ -18,9 +26,9 @@
         </view>
     </view>
     <view class="searchSection">
-        <input bindinput="inputHandler" bindfocus="searchIconDisappear" bindblur="searchIconCome" bindconfirm="searchHandler" placeholder="{{hotData.hotSearch}}" placeholder-style="text-indent:20rpx" confirm-type="search"></input>
+        <input bindinput="inputHandler" focus="{{hotData.inputFocus}}" bindfocus="searchIconDisappear" bindblur="searchIconCome" bindconfirm="searchHandler" placeholder="{{hotData.hotSearch}}" placeholder-style="text-indent:20rpx" confirm-type="search"></input>
         <view>{{searchIcon}}</view>
-        <view bindtap="searchHandler" class="searchBtn" wx:if="{{hotData.searchIcon}}">
+        <view bindtap="inputFocus" class="searchBtn" wx:if="{{hotData.searchIcon}}">
             <!-- <icon type="search" size="14" /> -->
             <image src="../../static/image/search_new.png" alt="" />
         </view>
@@ -31,7 +39,7 @@
     </view>
     <view class="swiperSection">
         <view class="title-regular swiper-title">官方推荐</view>
-        <swiper previous-margin="0" next-margin="243rpx" circular="{{true}}" autoplay="{{hotData.autoplay}}" interval="{{hotData.interval}}" duration="{{hotData.duration}}" circular="{{hotData.circular}}">
+        <swiper previous-margin="0" next-margin="243rpx" bindchange="swiperChange" current="{{hotData.swiperCurrent}}" circular="{{true}}" autoplay="{{hotData.autoplay}}" interval="{{hotData.interval}}" duration="{{hotData.duration}}" circular="{{hotData.circular}}">
             <block wx:for="{{hotData.recommend}}" wx:key="{{index}}">
                 <swiper-item class="slide-item" bindtap="openClass" data-classId="{{item.classId}}" data-title="{{item.title}}">
                     <image src="{{item.img}}" data-type="{{item.type}}" data-id="{{item.id}}" class="slide-image" />
@@ -42,11 +50,16 @@
                 </swiper-item>
             </block>
         </swiper>
+        <view class="swiper-dots-wrapper">
+            <block wx:for="{{hotData.recommend}}" wx:key="{{index}}">
+                <view class="swiper-dots {{hotData.swiperCurrent === index ? 'dot-active' : ''}}">
+                    <text>{{index + 1}}</text>
+                </view>
+            </block>
+        </view>
     </view>
     <view class="recommdSection">
-        <view class="recommd-title">
-            热门作品
-        </view>
+        <view class="recommd-title">热门作品</view>
         <view class="hotWares">
             <view wx:for="{{hotData.hotWorks}}" wx:key="{{index}}" class="worksCard" bindtap="openWorks" data-readId="{{item.classId}}" data-title="{{item.title}}">
                 <view class="topData">

+ 37 - 5
component/hot/hot.wxss

@@ -1,4 +1,4 @@
-.messageSection{
+.messageSection {
     width: 720rpx;
     height: 80rpx;
     background: #fff;
@@ -11,12 +11,13 @@
     margin: 15rpx auto 0;
 }
 
-.messageIcon{
+.messageIcon {
     width: 60rpx;
     height: 60rpx;
     border-radius: 50%;
 }
-.messageText{
+
+.messageText {
     /* width: 349rpx; */
     height: 30rpx;
     font-size: 30rpx;
@@ -24,6 +25,7 @@
     color: #4f4f50;
     margin-left: 115rpx;
 }
+
 swiper {
     margin-top: 60rpx;
     /* padding-top: 20rpx; */
@@ -278,7 +280,7 @@ swiper {
 }
 
 .title-regular {
-    width: 119rpx;
+    width: 121rpx;
     height: 46rpx;
     display: flex;
     align-items: center;
@@ -290,10 +292,40 @@ swiper {
     left: 16rpx;
     top: 6rpx;
 }
-.swiper-title{
+
+.swiper-title {
     left: 32rpx;
 }
 
+.swiper-dots-wrapper {
+    display: flex;
+    position: absolute;
+    right: 13rpx;
+    top: 17rpx;
+}
+
+.swiper-dots {
+    width: 28rpx;
+    height: 28rpx;
+    background: #D0D0D0;
+    border-radius: 50%;
+    font-size: 20rpx;
+    line-height: 28rpx;
+    text-align: center;
+    color: #fff;
+    font-weight: 800;
+    margin-right: 5rpx;
+}
+.swiper-dots text{
+    width: 100%;
+    height: 100%;
+    line-height: 100%;
+    text-align: center;
+}
+.dot-active {
+    background: #12c962;
+}
+
 .myCourseSection .myCoursePlaceHolder {
     width: 100%;
     height: 100%;

+ 0 - 6
component/my/my.js

@@ -33,12 +33,6 @@ export const myInit = (that) => {
         url: `../user/myconcern/myconcern?title=我的关注`
       });
     }
-    that.toMyCourse = e => {
-      let title = e.currentTarget.dataset.title;
-      wx.navigateTo({
-        url: `../user/mycourse/mycourse?title=${title}`
-      });
-    },
     that.toMyRead = e => {
       wx.navigateTo({
         url: `../user/myread/myread?title=我的朗读`

+ 17 - 18
component/my/my.wxml

@@ -4,15 +4,15 @@
     <view class='follow-details'>
       <view class='follow-info'>
         <view class="info-placerholder"></view>
-        <view class='set-msg' wx:if="{{myData.user.user.wechatName}}">
+        <view class='set-msg' wx:if="{{myData.user.user.wechatName || myData.user.wechatName }}">
           <view class='avatar-box'>
-            <image class='avatar-image' src='{{ myData.user.user.avatar }}'></image>
+            <image class='avatar-image' src='{{ myData.user.user.avatar  || myData.user.avatar  }}'></image>
             <!-- <view class='occupation-title' wx:if="{{myData.user.user.profession}}">{{ myData.user.user.profession }}</view> -->
           </view>
-          <view class='avatar-msg'>
-            <view class='avatar-nickname'>微信昵称:{{ myData.user.user.wechatName }}</view>
-            <view class='avatar-nickname'>宝贝昵称:{{ myData.user.user.wechatName }}的宝贝</view>
-            <image class="edit-img" bindtap="toMyEdit" src="../../static/image/edit_new.png" />
+          <view class='avatar-msg' bindtap="toMyEdit">
+            <view class='avatar-nickname'>微信昵称:{{ myData.user.user.wechatName || myData.user.wechatName  }}</view>
+            <view class='avatar-nickname'>宝贝昵称:{{ myData.user.user.nickName || myData.user.nickName  }}</view>
+            <image class="edit-img" src="../../static/image/edit_new.png" />
             <view class='mine-category'>
               <view class='amount-text'>{{ myData.user.playAmount || 0 }} 播放</view>
               <view class='amount-text'>{{ myData.user.likeAmount || 0 }} 赞</view>
@@ -28,27 +28,27 @@
         <view class="grey-point"></view>
         <view class="flower-amount">
           <image class="" src='../../static/image/flower_small.png' />
-          <view>小红花:{{myData.user.pointAmount || 0 }}</view>
+          <view>小红花:{{myData.user.integralAmount || 0 }}</view>
         </view>
         <view class="flower-tips">
-          <text class="flower-last">{{myData.user.taskAmount }}</text>
+          <text class="flower-last">{{myData.user.unfinishedAmount }}</text>
           个任务福利还没有领哦
         </view>
       </view>
       <!-- android 显示两个 -->
-      <view class="wallet-section" wx:if="{{!myData.isIOS}}" bindtap="goToFlower">
+      <view class="wallet-section" wx:if="{{!myData.isIOS}}">
         <view class="wallet-box" bindtap="toWalletDetail">
           <view class="grey-point"></view>
           <image class="wallet-icon" src='../../static/image/wallet.png' />
           <view>钱包:{{myData.user.walletAmount / 100  || 0 }}</view>
         </view>
-        <view class="flower-box">
+        <view class="flower-box"   bindtap="goToFlower">
           <view class="grey-point"></view>
           <image class="flower-icon" src='../../static/image/flower_small.png' />
           <view class="flower-text">
-            <view>小红花:{{myData.user.pointAmount || 0 }}</view>
+            <view>小红花:{{myData.user.integralAmount || 0 }}</view>
             <view class="flower-tips-text">
-              <text class="flower-last">{{myData.user.taskAmount }}</text>
+              <text class="flower-last">{{myData.user.unfinishedAmount }}</text>
               个任务福利还没有领哦
             </view>
           </view>
@@ -84,7 +84,7 @@
           您还没有朗读过,快去留下声音吧
         </view>
         <view class="my-reading-gut" wx:if="{{myData.user.myRead}}">
-          <view  class="worksCard" style="margin-bottom: 0;" bindtap="openWorks" data-readId="{{myData.user.myRead.id}}" data-title="{{myData.user.myRead.title}}">
+          <view class="worksCard" style="margin-bottom: 0;" bindtap="openWorks" data-readId="{{myData.user.myRead.id}}" data-title="{{myData.user.myRead.title}}">
             <view class="topData">
               <view class="worksLeft">
                 <image class="authorAvatar" lazy-load="true" src="{{myData.user.user.avatar}}" />
@@ -116,11 +116,12 @@
       <view class="my-reading-section ">
         <view class="my-reading-title">
           <view class="title-left">关注的人的作品</view>
-          <view class="title-right">
+          <!-- <view class="title-right">
             更多
             <image src="../../static/image/black_to.png" />
-          </view>
+          </view> -->
         </view>
+        <view class="my-reading-section-placeholder" wx:if="{{followData.length === 0}}">没有更多</view>
         <view class="my-reading-gut">
           <view wx:for="{{followData}}" wx:key="{{index}}" class="worksCard" bindtap="openWorks" data-readid="{{item.id}}" data-title="{{item.title}}">
             <view class="topData">
@@ -152,8 +153,6 @@
         </view>
       </view>
     </view>
-    <view class="footer-section" wx:if="{{ifHaveMore}}">
-      加载更多
-    </view>
+    <view class="footer-section" wx:if="{{ifHaveMore}}">加载更多</view>
   </view>
 </template>

+ 1 - 0
component/my/my.wxss

@@ -283,6 +283,7 @@ image {
   height: 170rpx;
   display: flex;
   flex-direction: column;
+  margin-top:6rpx;
 }
 
 .btn image {

+ 18 - 5
component/share/share.js

@@ -31,7 +31,19 @@ Component({
     groupPurchaseInfo: {},
     groupType: '',
     animationData: {},
-    touchMove: true
+    touchMove: true,
+    randomSologan: [
+      '开发右脑最简单的方式就是大声朗读',
+      '大声朗读之后,孩子的性格都变了',
+      '享受跟你一起朗读的每分每秒',
+      '凡读书,须要读得字字响亮——朱熹',
+      '读对不等于读懂 反复朗读才能深入理解',
+      '大声朗读是语感形成的最佳途径',
+      '大声朗读  还原课文的“诗性美”',
+      '在朗读中 提升孩子的思辨能力',
+      '重温经典课文 享受亲子美好时光',
+      '跟你一起读 仿佛看到了童年的自己'
+    ]
   },
 
   /**
@@ -42,10 +54,9 @@ Component({
       return false
     },
     poster: function () {
-      
       const that = this;
       wx.showLoading({
-        title: '海报生成中',
+        title: '专属海报生成中',
         // mask: true
       })
       httpRequestApi.createQRCode(this.data.QRData).success(res => {
@@ -77,7 +88,8 @@ Component({
       ctx.setFillStyle('#fff')
       ctx.fillText('课文朗读 每天5分钟', (300 - ctx.measureText('课文朗读 每天5分钟').width) / 2, 54.5)
       ctx.setFontSize(16)
-      ctx.fillText('大声朗读是语感形成的必走之路', (300 - ctx.measureText('大声朗读是语感形成的必走之路').width) / 2, 75.5)
+      let randomSologan =this.data.randomSologan[Math.floor(Math.random()*10)];
+      ctx.fillText(randomSologan, (300 - ctx.measureText(randomSologan).width) / 2, 75.5)
       ctx.setFontSize(15)
       ctx.setFillStyle('#838383')
       ctx.fillText('长按识别二维码', 130.5, 391)
@@ -160,6 +172,7 @@ Component({
           this.setData({
             iconImg: res.tempFilePath
           },()=>{
+            console.log(this.data.iconImg)
             this.makeImage();
           })
         }
@@ -172,7 +185,7 @@ Component({
           this.setData({
             avatar: res.tempFilePath
           },()=>{
-            if (this.data.shareType === 'works'){
+            if (this.data.shareType === 'group'){
               this.saveIcon();
             } else {
               this.makeImage();

+ 3 - 3
pages/groupPage/collage-details/collage-details.wxml

@@ -29,7 +29,7 @@
             </view>
             <!-- 团长本人浏览话术 -->
             <view class="group-regular-text" wx:if="{{organizerUid === hosterUid}}">
-                即可获得本课程3年用权
+                即可获得本课程3年使用权
             </view>
             <!-- 其他人浏览 -->
             <view class="group-organizer group-regular-text" wx:if="{{organizerUid !== hosterUid}}">
@@ -101,7 +101,7 @@
         </view>
         <view class="invitation-btn" bindtap="openShare">
             <!-- <image src="../../../static/groupImg/Invitation.png"></image> -->
-            <text>{{ifGroupSuccessed ? '开始你的表演' : '立即邀请好友助力'}}</text>
+            <text>{{ifGroupSuccessed ? '开始你的表演' : groupOsType === 'IOS' ? '立即邀请好友助力' : '立即邀请好友参团'}}</text>
         </view>
         <view class="explain" wx:if="{{groupOsType === 'IOS' ? false : true}}">
             <view class="explain-title">拼团规则</view>
@@ -120,7 +120,7 @@
         </view>
     </view>
 </view>
-<canvas canvas-id="myCanvas" style="width:600rpx; height: 1050rpx; position: absolute; left: -999rpx; top: -9999rpx;"></canvas>
+<canvas canvas-id="myCanvas" style="width:300px; height: 525px; position: absolute; left: -999rpx; top: -9999rpx;"></canvas>
 <shareDialog id="share-dialog" shareType='group' shareId="{{orderId}}" />
 <popup typeOf="sendSuccess" title="报告团长" headTextTwo='您发起的团购已经成立,订单号:{{orderId}}' content="{{content}}"></popup>
 <goBackHome id="goBackHome" shareType="{{goBackHome}}" wx:if="{{goBackHome}}" />

+ 8 - 2
pages/groupPage/group-details/group-details.js

@@ -188,6 +188,12 @@ Page({
   getGroupInfo: function (orderId) {
     httpRequestApi.getMygroupInfo(orderId).success(res => {
       const groupOrder = res.data.data.groupPurchaseOrder;
+      if (groupOrder.os === 'ANDROID' && app.globalData.isIOS) {
+        wx.redirectTo({
+          url: `/pages/groupPage/grade-details/grade-details?productId=${res.data.data.groupPurchaseOrder.productId}&goBackHome=1`
+        })
+        return;
+      }
       // 团员进入collage页面
       const myUid = wx.getStorageSync('uid');
       if (myUid === groupOrder.organizer) {
@@ -199,7 +205,7 @@ Page({
       res.data.data.joinUserList.forEach(item => {
         if (item.uid === myUid) {
           wx.redirectTo({
-            url: `../collage-details/collage-details?orderId=${groupId}&goBackHome=${this.data.goBackHome}`
+            url: `../collage-details/collage-details?orderId=${orderId}&goBackHome=${this.data.goBackHome}`
           })
           return;
         }
@@ -257,7 +263,7 @@ Page({
   goToDetail: function (detailId) {
     setTimeout(() => {
       wx.redirectTo({
-        url: `/pages/groupPage/collage-details/collage-details?orderId=${detailId}&goBackHome=true`
+        url: `/pages/groupPage/collage-details/collage-details?orderId=${this.data.orderId}&goBackHome=true`
       })
       wx.setNavigationBarTitle({
         title: '拼团详情'

+ 3 - 8
pages/groupPage/group-details/group-details.wxml

@@ -5,11 +5,6 @@
     </view>
     <view class="green-placerholder"></view>
     <image class="class-icon" src="{{groupPurchaseInfo.bgImg}}" />
-    团成功{{ifGroupSuccessed}}
-    团继续{{stillGoing}}
-    团类型{{groupOsType}}
-    剩余时间{{timeLast}}
-    剩余人数{{surplusNum}}
     <view class="details-head">
         <!-- 剩余时间盒子 -->
         <view class="last-time-box" wx:if="{{!dataLoading}}">
@@ -72,7 +67,7 @@
             <view class="line3"></view>
         </view>
         <view class="invitation-btn" bindtap="jionGroup">
-            <text>我要助力</text>
+            <text>我要{{groupOsType === 'IOS' ? '助力' : '参团'}}</text>
         </view>
     </view>
     <view scroll-y="{{true}}" wx:if="{{!isLoading}}">
@@ -101,13 +96,13 @@
     </view>
 </view>
 <!-- ios界面的底部按钮 -->
-<view class="group-details-btn {{isIPX ? 'bottomx' :''}}" wx:if="{{groupOSType === 'IOS' && stillGoing && !groupStatus }}" hidden="{{hideBottomBtn}}">
+<!-- <view class="group-details-btn {{isIPX ? 'bottomx' :''}}" wx:if="{{groupOSType === 'IOS' && stillGoing && !groupStatus }}" hidden="{{hideBottomBtn}}">
     <image class="btn-image" src="../../../static/groupImg/group_in_ios.jpg" />
     <form class="only-one-btn {{isIPX ? 'bottomx' :''}}" report-submit="{{formIsANAsshole}}" bindsubmit="jionGroup">
         我来助力!获得七天试用权
         <button class="formBtn" form-type="submit"></button>
     </form>
-</view>
+</view> -->
 <!-- <view class="group-popup" bindtap="sendGroup" hidden="{{sendGroupFlag}}" wx:if="{{!isLoading}}">
     <view class="group-content">
         <view class="group-title">请选择课本</view>

+ 2 - 0
pages/groupPage/group-details/group-details.wxss

@@ -16,6 +16,8 @@
     width: 100%;
     height: auto;
     background: #fff;
+    overflow:hidden;
+
 }
 
 .loading {

+ 50 - 46
pages/groupPage/my-group/my-group.js

@@ -28,54 +28,58 @@ Page({
     currentTarget
   }) {
     const orderId = currentTarget.dataset.orderid;
-    const productId = currentTarget.dataset.productid;
-    const groupId = currentTarget.dataset.groupid;
-    const uid = currentTarget.dataset.uid;
-    const myUid = wx.getStorageSync('uid');
-    const num = currentTarget.dataset.num;
-    const ind = currentTarget.dataset.ind;
-    const groupType = currentTarget.dataset.grouptype;
-    if(app.globalData.isIOS ){
-      if( groupType==='IOS' ){
-        if( uid === myUid){
-          wx.navigateTo({
-            url: `/pages/groupPage/collage-details/collage-details?orderId=${orderId}&read=true`
-          })
-          return;
-        } else {
 
-        }
-      } else {
-        wx.navigateTo({
-          url: `/pages/groupPage/collage-details/collage-details?orderId=${orderId}&read=true`
-        })
-        return;
-      }  
-    } 
-    
-    this.setData({
-      ind
+    wx.navigateTo({
+      url: `/pages/groupPage/collage-details/collage-details?orderId=${orderId}&read=true`
     })
-    console.log(num)
-    if (!num) {
-      wx.navigateTo({
-        url: `/pages/groupPage/collage-details/collage-details?orderId=${orderId}`
-      })
-    } else {
-      if (this.data.closeFlags[ind]) {
-        this.popup.close();
-        this.setData({
-          productId,
-          orderId,
-          groupId
-        })
-        this.dialog(uid, groupType);
-      } else {
-        wx.navigateTo({
-          url: `/pages/groupPage/collage-details/collage-details?orderId=${orderId}&read=true`
-        })
-      }
-    }
+    // const productId = currentTarget.dataset.productid;
+    // const groupId = currentTarget.dataset.groupid;
+    // const uid = currentTarget.dataset.uid;
+    // const myUid = wx.getStorageSync('uid');
+    // const num = currentTarget.dataset.num;
+    // const ind = currentTarget.dataset.ind;
+    // const groupType = currentTarget.dataset.grouptype;
+    // if(app.globalData.isIOS ){
+    //   if( groupType==='IOS' ){
+    //     if( uid === myUid){
+    //       wx.navigateTo({
+    //         url: `/pages/groupPage/collage-details/collage-details?orderId=${orderId}&read=true`
+    //       })
+    //       return;
+    //     } else {
+
+    //     }
+    //   } else {
+    //     wx.navigateTo({
+    //       url: `/pages/groupPage/collage-details/collage-details?orderId=${orderId}&read=true`
+    //     })
+    //     return;
+    //   }  
+    // } 
+    
+    // this.setData({
+    //   ind
+    // })
+    // console.log(num)
+    // if (!num) {
+    //   wx.navigateTo({
+    //     url: `/pages/groupPage/collage-details/collage-details?orderId=${orderId}`
+    //   })
+    // } else {
+    //   if (this.data.closeFlags[ind]) {
+    //     this.popup.close();
+    //     this.setData({
+    //       productId,
+    //       orderId,
+    //       groupId
+    //     })
+    //     this.dialog(uid, groupType);
+    //   } else {
+    //     wx.navigateTo({
+    //       url: `/pages/groupPage/collage-details/collage-details?orderId=${orderId}&read=true`
+    //     })
+    //   }
+    // }
   },
 
   /**

+ 96 - 46
pages/index/index.js

@@ -18,9 +18,9 @@ import {
 import {
   myInit
 } from '../../component/my/my';
-import {
-  followInit
-} from '../../component/follow/follow';
+// import {
+//   followInit
+// } from '../../component/follow/follow';
 // import '../../utils/hls';
 import httpRequestApi from '../../utils/APIClient';
 import httputil from '../../utils/httpUtil';
@@ -30,8 +30,7 @@ import {
 
 Page({
   data: {
-    tab: [
-      {
+    tab: [{
         name: '我的',
         templates: 'my',
       },
@@ -47,7 +46,7 @@ Page({
       //   name: '动态',
       //   templates: 'follow',
       // },
-     
+
     ],
     winH: 568,
     myIndex: 1,
@@ -63,8 +62,11 @@ Page({
     hotInput: '12345',
     mineSettingInfo: '528',
     hide: true,
-    isIOS:app.globalData.isIOS,
-    ifHaveMore: true
+    isIOS: app.globalData.isIOS,
+    ifHaveMore: true,
+    indexSignDialog: false,
+    indexMissionDialog: false,
+    unfinishedCount:0
   },
   jurisdiction: function () {
     //隐藏弹框
@@ -103,16 +105,8 @@ Page({
       hotInit(this);
     }
     if (myIndex == 2) {
-      // this.setData({
-      //   followPageNo: 1
-      // })
-      // followInit(this);
       groupInit(this);
     }
-    if (myIndex == 3) {
-      // console.log(this.data.isIOS)
-      myInit(this);
-    }
   },
   onLoad: function (options) {
     this.uid = wx.getStorageSync('uid');
@@ -126,7 +120,27 @@ Page({
     if (options.index) {
       this.updateData(options.index)
     }
-    hotInit(this)
+    setTimeout(() => {
+      if(wx.getStorageSync('uid')){
+        httpRequestApi.userLoginRecord().success(res => {
+          if (res.data.data) {
+            // 有数据弹任务窗口
+            if(this.data.unfinishedCount > 0){
+              this.setData({
+                indexSignDialog: true
+              })
+            }
+            
+          } else {
+            // 没数据弹签到
+            this.setData({
+              indexMissionDialog: true
+            })
+          }
+        })
+      }
+    }, 2800)
+    // hotInit(this)
     // this.init();
 
   },
@@ -135,21 +149,25 @@ Page({
       title: '小学课文朗读配音'
     })
     // this.init();
-    getOpenidSessionKey((res) => {}, (error) => {
+    getOpenidSessionKey((res) => {
+      hotInit(this)
+    }, (error) => {
       // console.log(error)
       this.setData({
         hide: !this.data.hide
       })
+      return;
     });
-    if (this.data.myIndex === 3) {
-      this.getUserWorksInfo();
+    if (this.data.myIndex === 0) {
+      // 从修改信息页面退回
+      this.getUserWorksInfo(true);
     }
   },
   //初始化数据
   // init: function () {
   //   httputil.getOpenidSessionKey((res) => {
   //     console.log('微信的用户信息', res)
-      
+
   //   }, (error) => {
   //     console.log(1111111111111111)
   //     // this.jurisdiction()
@@ -159,14 +177,28 @@ Page({
   //   });
   // },
   // 获取用户信息
-  getUserWorksInfo: function () {
-    console.log(wx.getStorageSync('user'));
+  getUserWorksInfo: function (flag) {
+    console.log(flag)
+    if (flag) {
+      httpRequestApi.getUserWorksInfo().success(res => {
+        const str = 'myData.user.user.nickName';
+        this.setData({
+          [str]: res.data.data.user.nickName
+        })
+      })
+      return;
+    }
+    const userLocal = wx.getStorageSync('user')
+    console.log(userLocal)
+    const str = 'myData.user';
+    this.setData({
+      [str]: userLocal
+    })
     httpRequestApi.getUserWorksInfo().success(res => {
       this.data.myData.user = res.data.data;
-      this.data.myData.user.user.birthday = this.data.myData.user.user.birthday ?  formatDate(res.data.data.user.birthday,3) : '2018年1月1日';
       httpRequestApi.userIntoPage('pages/index/index', '首页我的').success((res) => {})
-      if(this.data.myData.user.myRead){
-        this.data.myData.user.myRead.gmtCreated = formatDate(this.data.myData.user.myRead.gmtCreated,4)
+      if (this.data.myData.user.myRead) {
+        this.data.myData.user.myRead.gmtCreated = formatDate(this.data.myData.user.myRead.gmtCreated, 4)
       }
       this.setData({
         myData: this.data.myData,
@@ -194,19 +226,19 @@ Page({
       }
     }
     // 当前在推荐页面 加载推荐
-    if (this.data.myIndex === 1) {
-      console.log(this.data.recommendPageNo)
-      this.setData({
-        recommendPageNo: this.data.recommendPageNo + 1
-      })
-      if (this.data.recommendPageNo <= this.data.recommendTotalNo) {
-        this.getHotRecommend(this.uid, this.data.recommendPageNo, 3);
+    // if (this.data.myIndex === 1) {
+    //   console.log(this.data.recommendPageNo)
+    //   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('没有更多')
+    //   }
+    // }
 
-      } else {
-        console.log('没有更多')
-      }
-    }
-   
   },
   onPullDownRefresh: function () {
     //当前在团购页下拉加载
@@ -219,7 +251,7 @@ Page({
     setTimeout(function () {
       wx.hideNavigationBarLoading() //完成停止加载
       wx.stopPullDownRefresh() //停止下拉刷新
-    },1500);
+    }, 1500);
   },
   // 获取全部课本
   // getBookList: function () {
@@ -235,7 +267,7 @@ Page({
   //     console.log('错误', error)
   //   })
   // },
-  goToMessage: function(){
+  goToMessage: function () {
     wx.navigateTo({
       url: `../../pages/social/insideMessage/insideMessage`
     });
@@ -244,22 +276,40 @@ Page({
       [str]: 0
     })
   },
-  toMyCollage: function(e){
-    if(app.globalData.isIOS){
+  toMyCollage: function (e) {
+    if (app.globalData.isIOS) {
       wx.navigateTo({
         url: `../../pages/groupPage/my-group/my-group?title=我的助力`
       });
-    }else {
+    } else {
       wx.navigateTo({
         url: `../../pages/groupPage/my-group/my-group?title=我的拼团`
       });
     }
-    
+
+  },
+  toMyCourse: function(){
+    wx.navigateTo({
+      url: `../../pages/user/mycourse/mycourse?title=我的课程`
+    });
   },
-  goToFlower: function(){
+  goToFlower: function () {
     wx.navigateTo({
       url: `../../pages/social/littleFlower/littleFlower`
     });
+  },
+  signInBtn: function (e){
+    this.setData({
+      indexSignDialog: false
+    })
+    console.log(e.detail.formId)
+    httpRequestApi.postFormId(e.detail.formId).success(res=>{console.log(res)})
+    this.goToFlower();
+  },
+  missionBtn: function(){
+    this.setData({
+      indexMissionDialog: false
+    })
+    this.goToFlower();
   }
-
 })

+ 14 - 1
pages/index/index.wxml

@@ -3,7 +3,7 @@
   <!-- 引入组件 -->
   <import src="/component/group/group.wxml" />
   <import src="/component/hot/hot.wxml" />
-  <import src="/component/follow/follow.wxml" />
+  <!-- <import src="/component/follow/follow.wxml" /> -->
   <import src="/component/my/my.wxml" />
   <!-- 调用组件 -->
   <template is="{{templates}}" data="{{groupData: groupData, hotData: hotData, followData: followData, myData: myData}}"></template>
@@ -29,4 +29,17 @@
  <!-- <MyToast /> -->
 <view hidden="{{hide}}">
   <Dialog bindmyevent="jurisdiction" />
+</view>
+<view class="index-dialog" wx:if="{{indexSignDialog}}">
+  <form bindsubmit="signInBtn" report-submit="{{true}}" class="index-dialog-wrapper" >
+    <view class="index-dialog-text">签到领取小红花哦</view>
+    <view class="index-dialog-btn" >去签到</view>
+    <button class="index-dialog-btn-hide" form-type="submit"></button>
+  </form>
+</view>
+<view class="index-dialog" wx:if="{{indexMissionDialog}}">
+  <view class="index-dialog-wrapper" bindtap="missionBtn" >
+    <view class="index-dialog-text">还有奖励任务没有完成哦</view>
+    <view class="index-dialog-btn" >查看任务</view>
+  </view>
 </view>

+ 60 - 11
pages/index/index.wxss

@@ -4,12 +4,12 @@
 /*热团*/
 @import "/component/group/group.wxss";
 /*关注*/
-@import "/component/follow/follow.wxss";
+/* @import "/component/follow/follow.wxss"; */
 /*我的*/
 @import "/component/my/my.wxss";
 
 .container {
-  background: rgba(240, 241, 245, 1);
+  background: rgba(242, 242, 242, 1);
 }
 
 .template {
@@ -152,7 +152,7 @@
   flex-direction: row;
   flex: 1;
   margin-left: 10rpx;
-
+  position: relative;
 }
 
 .worksLeft .worksInfo .authorName {
@@ -188,20 +188,19 @@
 }
 
 .worksCard .topData .profession {
-  width: 68rpx;
-  height: 24rpx;
+  width: 60rpx;
+  height: 30rpx;
   background: rgba(97, 202, 84, 1);
-  border-radius: 166rpx;
-  border: 2rpx solid rgba(255, 255, 255, 1);
-  font-size: 16rpx;
+  border-radius: 15rpx;
+  font-size: 22rpx;
   /* font-family: PingFangSC-Medium; */
-  /* font-weight: 500; */
+  font-weight: 800; 
   color: rgba(255, 255, 255, 1);
-  line-height: 24rpx;
+  line-height: 30rpx;
   text-align: center;
   position: absolute;
   bottom: -7rpx;
-  left: 37rpx;
+  left: 42rpx;
 
 }
 
@@ -256,3 +255,53 @@
   color: #848484;
   font-size: 24rpx;
 }
+.index-dialog{
+  width: 100%;
+  height: 100%;
+  position: fixed;
+  top: 0;
+  left: 0;
+  z-index:3;
+  background: rgba(0,0,0,.3)
+}
+.index-dialog-wrapper{
+  width: 370rpx;
+  height: 240rpx;
+  background: #fff;
+  border-radius: 30rpx;
+  box-shadow: 0 0 10 0 rgba(0,0,0, .5);
+  position: fixed;
+  top: 281rpx;
+  left: 0;
+  right: 0;
+  margin: 0 auto;
+}
+.index-dialog-text{
+  width: 100%;
+  font-size: 30rpx;
+  color: #535353;
+  font-weight: 800;
+  text-align: center;
+  margin-top: 59rpx;
+}
+
+.index-dialog-btn{
+  width: 160rpx;
+  height: 50rpx;
+  border: 3rpx solid #f75642;
+  border-radius: 25rpx;
+  line-height: 50rpx;
+  text-align: center;
+  color: #f75642;
+  font-size: 30rpx;
+  font-weight: 800;
+  margin: 41rpx auto;
+}
+
+.index-dialog-btn-hide{
+  width: 100%;
+  height: 100%;
+  position: absolute;
+  background: rgba(0,0,0, 0);
+  top: 0;
+}

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

@@ -23,7 +23,8 @@
     width: 214rpx;
     height: 38rpx;
     font-size: 28rpx;
-    color:#373737;
+    color:#393939;
+    font-weight: 800;
     text-overflow: ellipsis;
     overflow: hidden;
     white-space: nowrap;

+ 7 - 7
pages/main/class/class.js

@@ -87,8 +87,8 @@ Page({
     this.setData({
       videoLoad: true
     }, () => {
-      this.videoCtx = wx.createVideoContext('classVideo', this);
-      this.videoCtx.play();
+      // this.videoClassCtx = wx.createVideoContext('classVideo', this);
+      // this.videoClassCtx.play();
     })
   },
   // 检查是否收藏
@@ -194,9 +194,9 @@ Page({
   },
   goToWorks: function (e) {
     console.log(this.data.works)
-    // this.videoCtx = wx.createVideoContext('myVideo', this);
-    if (this.videoCtx) {
-      this.videoCtx.stop();
+    // this.videoClassCtx = wx.createVideoContext('myVideo', this);
+    if (this.videoClassCtx) {
+      this.videoClassCtx.stop();
     }
     console.log(e);
     let readId = e.currentTarget.dataset.id;
@@ -261,8 +261,8 @@ Page({
     this.videoPlayTime = e.detail.currentTime;
   },
   onHide: function () {
-    let videoCtx = wx.createVideoContext('classVideo', this);
-    videoCtx.stop();
+    let videoClassCtx = wx.createVideoContext('classVideo', this);
+    videoClassCtx.stop();
   },
   onUnload: function () {
     if (this.videoPlayTime) {

+ 1 - 1
pages/social/insideMessage/insideMessage.wxml

@@ -1,6 +1,6 @@
 <view class="message-view">
     <view class="message-box" wx:for="{{messageList}}" wx:key="{{index}}">
         <view class="message-time">{{item.gmtCreated}}</view>
-        <view class="message-text">{{item.content}}</view>
+        <view class="message-text">{{item.type === 'MESSAGE' ? '通知' : item.type === 'OFFICIAL' ? '官方消息' : '本周学习报告'}}: {{item.content}}</view>
     </view>
 </view>

+ 1 - 0
pages/social/insideMessage/insideMessage.wxss

@@ -3,6 +3,7 @@
     min-height: 100%;
     background: #f0eff2;
     padding-top: 19rpx;
+    overflow: hidden;
 }
 
 .message-box{

+ 19 - 15
pages/social/littleFlower/littleFlower.js

@@ -19,6 +19,7 @@ Page({
                 temp.type = item.task.type;
                 temp.type = item.task.type;
                 temp.bonus = item.task.award;
+                temp.finished = item.finished;
                 this.data.misssionList.push(temp)
             });
             this.setData({
@@ -107,21 +108,23 @@ Page({
                         }
                         break;
                     case 5:
-                        if (pointNum >= 0 && pointNum <= 5) {
+                        if (pointNum > 0 && pointNum <= 4) {
                             item.style = 'red';
                             item.mark = '3';
-                            // 超过今天五个圈圈
+                        } else if(pointNum === 0){
+                            item.style = 'red';
+                            item.mark = '5';
                         } else {
                             item.style = 'white';
                             item.mark = '5';
                         }
                         break;
                     case 6:
-                        if (pointNum >= 1) {
+                        if (pointNum > 1) {
                             item.style = 'red';
                             item.mark = '3';
                             // 超过今天五个圈圈
-                        } else if (pointNum < 1 && pointNum >= 0) {
+                        } else if (pointNum <= 1 && pointNum >= 0) {
                             item.style = 'red';
                             item.mark = '5';
                         } else {
@@ -130,11 +133,11 @@ Page({
                         }
                         break;
                     case 7:
-                        if (pointNum >= 2) {
+                        if (pointNum > 2) {
                             item.style = 'red';
                             item.mark = '3';
                             // 超过今天五个圈圈
-                        } else if (pointNum < 2 && pointNum >= 0) {
+                        } else if (pointNum <= 2 && pointNum >= 0) {
                             item.style = 'red';
                             item.mark = '5';
                         } else {
@@ -143,41 +146,41 @@ Page({
                         }
                         break;
                     case 8:
-                        if (pointNum >= 3) {
+                        if (pointNum > 3) {
                             item.style = 'red';
                             item.mark = '3';
                             // 超过今天五个圈圈
-                        } else if (pointNum < 3 && pointNum >= 0) {
+                        } else if (pointNum <= 3 && pointNum >= 0) {
                             item.style = 'red';
                             item.mark = '5';
                         }
                         break;
                     case 9:
-                        if (pointNum >= 4) {
+                        if (pointNum > 4) {
                             item.style = 'red';
                             item.mark = '3';
                             // 超过今天五个圈圈
-                        } else if (pointNum < 4 && pointNum >= 0) {
+                        } else if (pointNum <= 4 && pointNum >= 0) {
                             item.style = 'red';
                             item.mark = '5';
                         }
                         break;
                     case 10:
-                        if (pointNum >= 5) {
+                        if (pointNum > 5) {
                             item.style = 'red';
                             item.mark = '3';
                             // 超过今天五个圈圈
-                        } else if (pointNum < 5 && pointNum >= 0) {
+                        } else if (pointNum <= 5 && pointNum >= 0) {
                             item.style = 'red';
                             item.mark = '5';
                         }
                         break;
                     case 11:
-                        if (pointNum >= 6) {
+                        if (pointNum > 6) {
                             item.style = 'red';
                             item.mark = '3';
                             // 超过今天五个圈圈
-                        } else if (pointNum < 6 && pointNum >= 0) {
+                        } else if (pointNum <= 6 && pointNum >= 0) {
                             item.style = 'red';
                             item.mark = '5';
                         }
@@ -199,7 +202,8 @@ Page({
                 }
             });
             this.setData({
-                dateList
+                dateList,
+                continuousDay
             })
         });
     },

+ 3 - 2
pages/social/littleFlower/littleFlower.wxml

@@ -1,6 +1,6 @@
 <view class="little-flower-box">
     <view class="green-placerholder"></view>
-    <view class="sign-in-title">已连续签到1天</view>
+    <view class="sign-in-title">已连续签到{{continuousDay}}天</view>
     <view class="sign-in-box">
         <view wx:for="{{dateList}}" wx:key="{{index}}" class="date-item">
             <view class="date-left">
@@ -22,7 +22,8 @@
                     {{item.bonus}}
                 </view>
             </view>
-            <view class="mission-status">{{item.ifFinished ? '已完成' : '未完成'}}</view>
+            <view class="mission-status" wx:if="{{!item.finished}}">未完成</view>
+            <view class="mission-status mission-complete" wx:if="{{item.finished}}">已完成</view>
         </view>
     </scroll-view>
     <view class="explain">

+ 8 - 3
pages/social/littleFlower/littleFlower.wxss

@@ -70,15 +70,17 @@
     color: #fff;
     font-size: 22rpx;
     line-height: 50rpx;
-    text-align: center;
+    text-indent:10rpx;
+
 }
 
 .cross-red-line {
     width: 40rpx;
     height: 3rpx;
     border-top: 2rpx solid #f75642;
-    /* margin-left: 4rpx; */
-    margin-top: -44rpx;
+    margin-top:-39rpx;
+margin-left:7rpx;
+
 }
 
 .flower-title {
@@ -146,4 +148,7 @@
 .mission-item .mission-status {
     color: #f75642;
     text-align: right;
+}
+.mission-item .mission-complete{
+    color: #919191;
 }

+ 30 - 24
pages/social/replyDetail/replyDetail.js

@@ -26,27 +26,34 @@ Page({
         this.getReplyDetail();
     },
     // 保存 回复的内容
-    saveValue: function(e){
-      this.setData({
-        replyInfo: e.detail.value
-      });
+    saveValue: function (e) {
+        this.setData({
+            replyInfo: e.detail.value
+        });
     },
-    replyDone:function(){
+    replyDone: function () {
         console.log(this.data.productId)
-      const data = {
-        postsId: this.data.postId,
-        productId: this.data.productId,
-        content: encodeURI(this.data.replyInfo)
-      }
-      if(this.data.replyInfo){
-        httpRequestApi.postReplyComment(this.uid, data).success(res => {
-          this.setData({
-            replyModal: false,
-            replyInfo: '',
-          });
-          this.getReplyDetail();//更新 变化后的 replyTemp。
-        });
-      }
+        const data = {
+            postsId: this.data.postId,
+            productId: this.data.productId,
+            content: encodeURI(this.data.replyInfo)
+        }
+        if (this.data.replyInfo) {
+            httpRequestApi.postReplyComment(this.uid, data).success(res => {
+                this.setData({
+                    replyModal: false,
+                    replyInfo: '',
+                    flowerNum: res.data.count
+                }, () => {
+                    if (res.data.count > 0) {
+                        console.log(123123)
+                        this.flowerBox = this.selectComponent("#flower-box");
+                        this.flowerBox.comeOut();
+                    }
+                    this.getReplyDetail();
+                });
+            });
+        }
     },
     // 查询回复详情
     getReplyDetail: function () {
@@ -59,7 +66,7 @@ Page({
             const authorDetail = {};
             authorDetail.name = replied.user.wechatName;
             authorDetail.text = decodeURI(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);
@@ -67,7 +74,7 @@ Page({
                 const temp = {};
                 temp.name = item.user.wechatName;
                 temp.text = decodeURI(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;
@@ -109,10 +116,9 @@ Page({
             content: this.data.inputSBValue
         }
         httpRequestApi.postReplyComment(this.uid, data).success(res => {
+            console.log(res.data.count)
             this.setData({
-                replyModal: false
-            },()=>{
-                this.getReplyDetail();
+                replyModal: false,
             })
         });
     },

+ 6 - 1
pages/social/replyDetail/replyDetail.json

@@ -1 +1,6 @@
-{}
+{
+    "enablePullDownRefresh": false,
+    "usingComponents": {
+        "FlowerBox": "/component/flowerBox/flowerBox"
+    }
+}

+ 1 - 1
pages/social/replyDetail/replyDetail.wxml

@@ -26,5 +26,5 @@
     </view>
   </view>
   
-  
+      <FlowerBox id="flower-box" flowerNum="{{flowerNum}}"  />
 </view>

+ 27 - 7
pages/social/works/works.js

@@ -47,7 +47,8 @@ Page({
         isModalShow: false,
         modalCloseShow: true,
         hide: true,
-        addComeOut: ''
+        addComeOut: '',
+        flowerNum: '6'
         // shareFlag: false
     },
     showAlert: function () {
@@ -57,9 +58,13 @@ Page({
     },
     onLoad: function (option) {
         console.log(option)
-        if (option.count) {
-            this.flowerBox = this.selectComponent("#flower-box");
-            this.flowerBox.comeOut();
+        if (option.flowerCount > 0) {
+            this.setData({
+                flowerNum: option.flowerCount
+            }, () => {
+                this.flowerAnimationHandler();
+            })
+
         }
         getOpenidSessionKey((res) => {
             let id = option.id ? option.id : option.scene.replace('QR', '')
@@ -93,11 +98,12 @@ Page({
     },
     onHide: function () {
         // this.data.stackSize >= 2
-
+        console.log('hide')
         if (this.innerAudioContext) {
+            console.log('音频应该被暂停')
             this.innerAudioContext.pause();
         }
-        this.videoCtx = null
+        // this.videoCtx = null
     },
     onUnload: function () {
         console.log(this.videoPlayTime)
@@ -216,7 +222,12 @@ Page({
         }
         httpRequestApi.likeWorks(this.uid, this.data.id).success(res => {
             this.setData({
-                isLike: true
+                isLike: true,
+                flowerNum: res.data.count
+            },()=>{
+                if(res.data.count > 0){
+                    this.flowerAnimationHandler();
+                }
             });
         })
 
@@ -482,17 +493,26 @@ Page({
                 productId: this.data.productId
             }
             httpRequestApi.postReply(this.uid, data).success(res => {
+                console.log(res)
                 this.setData({
                     inputValue: '',
                     pageNo: 1,
                     replyList: [],
+                    flowerNum: res.data.count
                 })
                 this.getReply();
+                if (res.data.count > 0) {
+                    this.flowerAnimationHandler();
+                }
             });
             // 评论成功后刷新数据
 
         }
     },
+    flowerAnimationHandler: function(){
+        this.flowerBox = this.selectComponent("#flower-box");
+        this.flowerBox.comeOut();
+    },
     // 触底加载
     onReachBottom: function () {
         // 当前在推荐页面 加载推荐

+ 3 - 3
pages/social/works/works.wxml

@@ -1,4 +1,4 @@
-<view class="{{noScroll}}">
+<view class="works-page {{noScroll}}">
     <view class="videoSection" wx:if="{{!isIOS}}">
         <cover-image wx:if="{{!videoLoad}}" class="video-playBtn" bindtap="videoPlayHandler" src="../../../static/image/play-btn.png"></cover-image>
         <image wx:if="{{!videoLoad}}" class="videoIcon" src="{{iconImg}}" />
@@ -74,7 +74,7 @@
         <view class="collectBtn footerBtn" bindtap="goToClass">
             <!-- <view wx:if="{{isIOS}}" class="stop-default"></view> -->
             <image src="../../../static/image/listen_carfully.png" />
-            <text>听配音</text>
+            <text>听示范</text>
         </view>
         <view class="readingBtn footerBtn" bindtap="goToReading">
             <image class="microphone" src="../../../static/image/microphone.png" />
@@ -130,5 +130,5 @@
     <view hidden="{{hide}}">
         <Dialog bindmyevent="jurisdiction" />
     </view>
-    <FlowerBox id="flower-box" flowerNum="{{'6'}}"  />
+    <FlowerBox id="flower-box" flowerNum="{{flowerNum}}"  />
 </view>

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

@@ -4,6 +4,10 @@
     overflow: hidden;
 }
 
+.works-page{
+    width: 100%;
+    overflow-x: hidden;
+}
 .videoSection {
     width: 750rpx;
     height: 421.9rpx;
@@ -123,7 +127,6 @@
 .readAuthorSection .like image {
     width: 100%;
     height: 100%;
-    margin-right: 15rpx;
 
 }
 

+ 1 - 0
pages/user/myEdit/myEdit.js

@@ -59,6 +59,7 @@ Page({
       // wx.redirectTo({
       //   url: '/pages/index/index?index=3'
       // });
+      wx.setStorageSync('user',res.data.data);
       wx.navigateBack({
         delta: 1
       })

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

@@ -2,9 +2,9 @@
   <view class='setting-info'>
     <form bindsubmit="formSubmit" class='form'>
       <view class='nickname-box'>
-        <text class='setting-title'>昵称</text>
+        <text class='setting-title'>宝贝昵称</text>
         <view class='user-action'>
-          <input name='nickname' class='nickname' type='text' placeholder='{{user.wechatName}}' placeholder-class='placeholderStyle' focus='{{ true }}' value='{{user.wechatName}}' bindblur='saveNickName'>
+          <input name='nickname' class='nickname' type='text' placeholder='{{user.nickName}}' placeholder-class='placeholderStyle' focus='{{ true }}' value='{{user.nickName}}' bindblur='saveNickName'>
           </input>
         </view>
         <view class='edit-img'>

+ 7 - 5
pages/user/myEdit/myEdit.wxss

@@ -10,7 +10,6 @@
   height: 100%;
   overflow: hidden;
   padding: 0 17rpx;
-  margin: 0 auto;
   font-size: 32rpx;
   color: #5E5E5E;
   background: #F7F7F7;
@@ -32,16 +31,17 @@
 .user-action{
   /* min-width: 100rpx; */
   /* max-width: 400rpx; */
-  width: 100%;
+  width: 74%;
 }
 
 .nickname{
-  width: 100%;
+  width: 74%;
 }
 
 .setting-title{
   display: inline-block;
-  width: 94rpx; 
+  width: 145rpx;
+  text-align: center;
 }
 
 .placeholderStyle{
@@ -140,6 +140,8 @@ radio .wx-radio-input.wx-radio-input-checked{
   padding: 22rpx 0 22rpx 26rpx;
   border-radius: 12rpx;
   position: relative;
+  overflow:hidden;
+
 }
 
 .occupation-box{
@@ -170,7 +172,7 @@ radio .wx-radio-input.wx-radio-input-checked{
 .address{
   /* width: 420rpx; */
   /* height: 88rpx; */
-  width: 100%;
+  width: 74%;
 }
 
 .edit-image{

+ 2 - 0
pages/user/mycourse/mycourse.wxss

@@ -31,4 +31,6 @@
   overflow: hidden;
   white-space: nowrap;
   text-align: center;
+  font-weight:800;
+
 }

+ 8 - 1
project.config.json

@@ -36,7 +36,7 @@
 			"list": []
 		},
 		"miniprogram": {
-			"current": 3,
+			"current": 4,
 			"list": [
 				{
 					"id": -1,
@@ -63,6 +63,13 @@
 					"pathName": "pages/loginPage/loginPage",
 					"query": "",
 					"scene": "1012"
+				},
+				{
+					"id": -1,
+					"name": "分享团",
+					"pathName": "pages/groupPage/group-details/group-details",
+					"query": "share=true&shareId=1547694928146618",
+					"scene": "1012"
 				}
 			]
 		}

+ 10 - 1
utils/APIClient.js

@@ -438,7 +438,7 @@ module.exports = {
     let url = getBaseUrl('wx/loginLog');
     return request.getInstance().header({
       uid: wx.getStorageSync('uid')
-    }).url(url).send();
+    }).url(url).method('POST').send();
   },
   // 用户进入页面统计
   userIntoPage(action,actionName) {
@@ -470,5 +470,14 @@ module.exports = {
     return request.getInstance().header({
       uid: wx.getStorageSync('uid')
     }).url(url).send();
+  },
+  // 保存formId
+  postFormId(formId){
+    let url = getBaseUrl('wx/form');
+    return request.getInstance().header({
+      uid: wx.getStorageSync('uid')
+    }).data({
+      formId
+    }).url(url).method('POST').send();
   }
 }