Browse Source

更改小问题

Limengbo 5 years ago
parent
commit
eedf640516
43 changed files with 343 additions and 81 deletions
  1. 17 1
      app.js
  2. 31 0
      component/goBackHome/goBackHome.js
  3. 4 0
      component/goBackHome/goBackHome.json
  4. 3 0
      component/goBackHome/goBackHome.wxml
  5. 12 0
      component/goBackHome/goBackHome.wxss
  6. 4 1
      component/hot/hot.wxml
  7. 2 2
      component/popup/popup.js
  8. 1 1
      component/popup/popup.wxml
  9. 24 10
      component/share/share.js
  10. 3 3
      component/share/share.wxml
  11. 13 8
      component/share/share.wxss
  12. 1 1
      pages/groupPage/grade-details/grade-details.js
  13. 1 1
      pages/groupPage/grade-details/grade-details.wxml
  14. 3 2
      pages/groupPage/group-details/group-details.js
  15. 1 1
      pages/groupPage/group-details/group-details.wxml
  16. 1 0
      pages/groupPage/group-details/group-details.wxss
  17. 33 10
      pages/groupPage/my-group/my-group.js
  18. 2 2
      pages/groupPage/my-group/my-group.wxml
  19. 16 5
      pages/index/index.js
  20. 8 3
      pages/main/class/class.js
  21. 2 1
      pages/main/class/class.json
  22. 1 0
      pages/main/class/class.wxml
  23. 23 2
      pages/social/replyDetail/replyDetail.js
  24. 7 0
      pages/social/replyDetail/replyDetail.wxml
  25. 31 3
      pages/social/replyDetail/replyDetail.wxss
  26. 16 5
      pages/social/works/works.js
  27. 2 1
      pages/social/works/works.json
  28. 10 5
      pages/social/works/works.wxml
  29. 26 2
      pages/social/works/works.wxss
  30. 0 1
      pages/user/myEdit/myEdit.js
  31. 8 1
      pages/user/myconcern/myconcern.js
  32. 1 1
      pages/user/myconcern/myconcern.wxml
  33. 19 7
      project.config.json
  34. BIN
      static/groupImg/Preservation.png
  35. BIN
      static/groupImg/circle.png
  36. BIN
      static/groupImg/jiang.png
  37. BIN
      static/groupImg/share.png
  38. BIN
      static/groupImg/weixin.png
  39. BIN
      static/image/empty_heart.png
  40. BIN
      static/image/fully_heart.png
  41. BIN
      static/image/goBackHome.png
  42. 9 0
      utils/APIClient.js
  43. 8 1
      utils/util.js

+ 17 - 1
app.js

@@ -1,6 +1,9 @@
 //app.js
+import {GetQueryString} from 'utils/util'
 App({
-  onLaunch: function () {
+  onLaunch: function (options) {
+   
+
     // 展示本地存储能力
     var logs = wx.getStorageSync('logs') || []
     logs.unshift(Date.now())
@@ -33,6 +36,19 @@ App({
       }
     })
   },
+  // onShow: function(options){
+  //   console.log(options)
+  //   const type = GetQueryString(decodeURIComponent(options.query.scene), "type");
+  //   const sceneId = GetQueryString(decodeURIComponent(options.query.scene), "id");
+  //   console.log(type, sceneId)
+  //   switch (type) {
+  //     case "works":
+  //       wx.navigateTo({
+  //         url: `../social/works/works?id=${sceneId}&title="测试"`
+  //       })
+  //       break
+  //   };
+  // },
   globalData: {
     userInfo: null
   }

+ 31 - 0
component/goBackHome/goBackHome.js

@@ -0,0 +1,31 @@
+// compontents/dialog/dialog.js
+Component({
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+        show: {
+            type: 'Boolean',
+            value: false
+          },
+    },
+  
+    /**
+     * 组件的初始数据
+     */
+    data: {
+    //   show: false
+    },
+  
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+        goBackHome: function(){
+            wx.redirectTo({
+                url: '../../index/index'
+            })
+      }
+    }
+  })
+  

+ 4 - 0
component/goBackHome/goBackHome.json

@@ -0,0 +1,4 @@
+{
+    "component": true,
+    "usingComponents": {}
+  }

+ 3 - 0
component/goBackHome/goBackHome.wxml

@@ -0,0 +1,3 @@
+<view class="goBackHome" bindtap="goBackHome" >
+    <image src="../../static/image/goBackHome.png" />
+</view>

+ 12 - 0
component/goBackHome/goBackHome.wxss

@@ -0,0 +1,12 @@
+.goBackHome {
+    width: 100rpx;
+    height: 100rpx;
+    position: fixed;
+    bottom: 168rpx;
+    right: 45rpx;
+
+}
+.goBackHome image{
+    width: 100%;
+    height: 100%;
+}

+ 4 - 1
component/hot/hot.wxml

@@ -12,6 +12,9 @@
             <icon type="search" size="17" />
         </button>
         <view class="allBooks" bindtap="goToBooks">全部课本</view>
+        <!-- <form bindsubmit="submitTest" report-submit="{{true}}" class="allBooks">
+            <button formType="submit">Reset</button>
+        </form> -->
     </view>
     <view class="hotSection">
         <view class="title">
@@ -46,7 +49,7 @@
                 <text>人气推荐</text>
             </view>
         </view>
-        <view class="hotWares"  >
+        <view class="hotWares">
             <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>

+ 2 - 2
component/popup/popup.js

@@ -30,7 +30,7 @@ Component({
    * 组件的初始数据
    */
   data: {
-    closeFlag: true
+    flag: true
   },
 
   /**
@@ -39,7 +39,7 @@ Component({
   methods: {
     close: function () {
       this.setData({
-        closeFlag: !this.data.closeFlag
+        flag: !this.data.flag
       })
       this.triggerEvent('Close', {})
     },

+ 1 - 1
component/popup/popup.wxml

@@ -1,5 +1,5 @@
 <!--component/popup/popup.wxml-->
-<view class="popup" hidden="{{closeFlag}}">
+<view class="popup" hidden="{{flag}}">
     <!--成功-->
     <view class="popup-container" wx:if="{{typeOf == 'success' ? true : false}}">
         <view class="head-img" style="height: 240rpx">

+ 24 - 10
component/share/share.js

@@ -79,17 +79,19 @@ Component({
                   y: 0,
                   width: 370,
                   height: 507,
-                  destWidth: 370,
-                  destHeight: 507,
+                  // destWidth: 370,
+                  destWidth: 1110,
+                  // destHeight: 507,
+                  destHeight: 1521,
                   canvasId: 'myCanvas',
                   success: (res) => {
                     console.log(res.tempFilePath)
-                    wx.saveImageToPhotosAlbum({
-                      filePath: res.path,
-                      success(res) {
-                        console.log(res);
-                      }
-                    })
+                    // wx.saveImageToPhotosAlbum({
+                    //   filePath: res.path,
+                    //   success(res) {
+                    //     console.log(res);
+                    //   }
+                    // })
                     that.setData({
                       imgUrls: res.tempFilePath
                     }, () => {
@@ -158,6 +160,17 @@ Component({
         })
       }
     },
+    //关闭弹框
+    close: function(e){
+      console.log(e)
+      this.setData({
+        shareFlag: !this.data.shareFlag,
+        imgUrls: ''
+      })
+    },
+    nothing: function(e){
+      return
+    },
     // 保存图片到本地
     saveImg: function () {
       console.log('yibuububu')
@@ -269,7 +282,7 @@ Component({
         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.drawImage(this.data.iconImg, 9, 205, 704, 145);
         ctx.setFontSize(18)
         ctx.setFillStyle('#000')
         ctx.drawImage('../../../static/groupImg/share_bottom.png', 3, 419, 370, 192);
@@ -327,7 +340,8 @@ Component({
     PreservationImg: function () {
       wx.saveImageToPhotosAlbum({
         filePath: this.data.imgUrls,
-        success(res) {
+        success: (res)=> {
+          console.log(res)
           this.setData({
             imgUrls: false
           })

+ 3 - 3
component/share/share.wxml

@@ -1,5 +1,5 @@
-<view class="share" bindtap="share" wx:if="{{shareFlag}}">
-   <view class="btn" wx:if="{{!imgUrls}}">
+<view class="share" bindtap="close" wx:if="{{shareFlag}}">
+   <view class="btn" wx:if="{{!imgUrls}}" id="btnArea" bindtap="nothing">
        <image class="bg" src="../../static/groupImg/share.png"></image>
        <view class="share-btn">
             <button class="share-friend" open-type="share" catchtap="shareFriend">
@@ -12,7 +12,7 @@
             </view>           
        </view>
    </view>
-   <view class="share-img" wx:if="{{imgUrls}}">
+   <view class="share-img" wx:if="{{imgUrls}}" id="imgArea" bindtap="nothing">
        <cover-image class="img" src="{{imgUrls}}"></cover-image>
        <view class="Preservation">
            <image class="PreservationBg" src="../../static/groupImg/Preservation.png"></image>

+ 13 - 8
component/share/share.wxss

@@ -18,19 +18,22 @@
 }
 
 .btn .bg {
-    width: 90%;
-    margin: 46rpx 5%;
+  display: block;
+    width: 500rpx;
+    margin: 5% auto;
     height: 42rpx;
 }
-
+.btn text{
+  font-size: 28rpx;
+}
 .share-btn {
     display: flex;
     justify-content: space-around;
 }
 
 .share-btn image {
-    width: 66rpx;
-    height: 66rpx;
+    width: 68rpx;
+    height: 68rpx;
 }
 
 .share-btn view {
@@ -40,6 +43,7 @@
     align-items: center;
     font-size: 32rpx;
     height: 120rpx;
+    width: 180rpx
 }
 
 .img {
@@ -86,12 +90,13 @@
     margin:0;
     border-radius:0;    
     height: 140rpx;
-    font-size:32rpx;  
+    font-size:32rpx;
+    width: 180rpx;  
 }
 
 .share-friend image {
-    width: 66rpx;
-    height: 66rpx;
+    width: 68rpx;
+    height: 68rpx;
 }
 
 button::after{ border: none; } 

+ 1 - 1
pages/groupPage/grade-details/grade-details.js

@@ -102,7 +102,7 @@ Page({
       'signType': 'MD5',
       'paySign': prePayMap.sign,
       'success': function (res) {
-        console.log('支付成功')
+        console.log('支付成功',res)
         wx.showModal({
           title: '提示',
           content: '支付成功',

+ 1 - 1
pages/groupPage/grade-details/grade-details.wxml

@@ -7,7 +7,7 @@
             <text>{{bookInfo}}</text>
         </view>
         <view class="catalog">
-            <image src="../../../static/groupImg/Rectangle 34@2x.png"></image>
+            <image src="../../../static/groupImg/Rectangle34@2x.png"></image>
             <text>课文目录</text>
         </view>
         <view class="catalog-list">

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

@@ -137,7 +137,7 @@ Page({
             //获取拼团信息
             console.log(that.data.orderId)
             wx.showLoading({
-              title: '作品转码中',
+              title: '支付查询中...',
               mask: true
             })
             setTimeout(() => {
@@ -165,7 +165,8 @@ Page({
         organizer: groupOrder.organizer,
       })
       if (type === 'join') {
-        //this.data.surplusList.pop();
+        this.data.surplusList.pop();
+        debugger;
         if (groupOrder.status === 'SUCCESSED') {
           this.showSuccess(groupOrder.organizer, groupOrder.organizerPrice)
         } else {

+ 1 - 1
pages/groupPage/group-details/group-details.wxml

@@ -48,7 +48,7 @@
             <text>{{bookInfo}}</text>
         </view>
         <view class="catalog">
-            <image src="../../../static/groupImg/Rectangle 34@2x.png"></image>
+            <image src="../../../static/groupImg/Rectangle34@2x.png"></image>
             <text>课文目录</text>
         </view>
         <view class="catalog-list">

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

@@ -176,6 +176,7 @@ scroll-view {
     display: flex;
     width: 100%;
     height: 102rpx;
+    z-index: 99;
 }
 
 .left-btn {

+ 33 - 10
pages/groupPage/my-group/my-group.js

@@ -15,7 +15,8 @@ Page({
     productId: '',
     orderId: '',
     groupId: '',
-    closeFlag: true
+    closeFlags: [],
+    ind: 0
   },
     //跳转到团购详情页
   collageDetails: function ({currentTarget}) {
@@ -24,16 +25,17 @@ Page({
     const groupId = currentTarget.dataset.groupid;
     const uid = currentTarget.dataset.uid;
     const num = currentTarget.dataset.num;
+    const ind = currentTarget.dataset.ind;
+    this.setData({
+      ind
+    })
     console.log(num)
     if(!num) {
       wx.navigateTo({
         url: `/pages/groupPage/collage-details/collage-details?orderId=${orderId}`
       })
     } else {
-      this.setData({
-        closeFlag: true
-      })
-      if(this.data.closeFlag) {
+      if(this.data.closeFlags[ind]) {
         this.popup.close();
         this.setData({
           productId,
@@ -66,7 +68,15 @@ Page({
         return
       }
       console.log('我的团', res.data.data.list)
+      res.data.data.list.forEach(element => {
+        if(element.status == 'SUCCESSED') {
+          this.data.closeFlags.push(true);
+        }else {
+          this.data.closeFlags.push(false);
+        }
+      });
       this.setData({
+        closeFlags: this.data.closeFlags,
         myGroupList: res.data.data.list
       })
     }).fail( error => {
@@ -126,9 +136,12 @@ Page({
       }
   },
   close: function () {
+    const ind = this.data.ind;
+    this.data.closeFlags[ind] = false;
     this.setData({
-      closeFlag: false
+      closeFlags: this.data.closeFlags
     })
+    console.log(this.data.closeFlags)
   },
 
   //再次发起团
@@ -137,6 +150,7 @@ Page({
     const productId = this.data.productId;
     const groupId = this.data.groupId;
     const id = this.data.orderId;
+    debugger;
     //开始发起团购
     httpRequestApi.SendGroupPurchas({
       productId,
@@ -156,10 +170,7 @@ Page({
       wx.navigateTo({
         url: `/pages/groupPage/make-money/make-money?productId=${productId}&id=${res.data.data.groupPurchaseOrder.id}&groupId=${groupId}`
       })
-      //if(res.data.data.)
-      this.setData({
-        closeFlag: false
-      })
+      this.close();
     }).fail((error) => {
 
     })  
@@ -212,5 +223,17 @@ Page({
    */
   onShareAppMessage: function () {
 
+  },
+  onPullDownRefresh: function () {
+    this.onLoad();
+    
+    wx.showNavigationBarLoading() //在标题栏中显示加载
+    //模拟加载
+    setTimeout(function()
+    {
+      // complete
+      wx.hideNavigationBarLoading() //完成停止加载
+      wx.stopPullDownRefresh() //停止下拉刷新
+    },1500);
   }
 })

+ 2 - 2
pages/groupPage/my-group/my-group.wxml

@@ -3,10 +3,10 @@
     <scroll-view scroll-y="{{true}}">
         <view class="my-group-content">
             <block wx:for="{{myGroupList}}" wx:key="{{index}}">
-                <view class="group-item" bindtap="collageDetails" data-num="{{item.status==='SUCCESSED'}}" data-orderId="{{item.id}}" data-groupId="{{item.groupId}}" data-productId="{{item.productId}}" data-uid="{{item.organizer}}">
+                <view class="group-item" bindtap="collageDetails" data-ind="{{index}}" data-num="{{item.status==='SUCCESSED'}}" data-orderId="{{item.id}}" data-groupId="{{item.groupId}}" data-productId="{{item.productId}}" data-uid="{{item.organizer}}">
                     <image class="item-img" src="{{item.iconImg}}" ></image>
                     <view id="grade">{{item.groupTitle}}</view>
-                    <image class="jiang" src="../../../static/groupImg/jiang.png" wx:if="{{item.groupType== 'PROMOTION' }}"></image>
+                    <image class="jiang" src="../../../static/groupImg/jiang.png" wx:if="{{(item.groupType== 'PROMOTION') && (item.status==='SUCCESSED') }}"></image>
                     <image class="type-img" src="../../../static/groupImg/{{item.status==='SUCCESSED' ? 'yisuccess' : 'weisuccess' }}.png"></image>
                 </view> 
             </block>

+ 16 - 5
pages/index/index.js

@@ -20,6 +20,9 @@ import {
 // import '../../utils/hls';
 import httpRequestApi from '../../utils/APIClient';
 import httputil from '../../utils/httpUtil';
+import {
+  GetQueryString
+} from '../../utils/util';
 
 Page({
   data: {
@@ -78,7 +81,7 @@ Page({
       templates
     });
     if (myIndex == 0) {
-      
+
       groupInit(this);
     }
     if (myIndex == 1) {
@@ -105,9 +108,18 @@ Page({
     }
   },
   onLoad: function (options) {
-    console.log(options)
-    this.uid = wx.getStorageSync('uid');
 
+    this.uid = wx.getStorageSync('uid');
+    // const type = GetQueryString(decodeURIComponent(options.scene),"type");
+    // const sceneId = GetQueryString( decodeURIComponent(options.scene),"id");
+    // console.log(type,sceneId)
+    // switch(type){
+    //   case "works":
+    //   wx.navigateTo({
+    //     url: `../social/works/works?id=${sceneId}&title="测试"`
+    //   })
+    //   break
+    // };
     wx.getSystemInfo({
       success: (res) => {
         this.setData({
@@ -132,7 +144,6 @@ Page({
       })
     });
     if (this.data.myIndex === 3) {
-      console.log('aaaaaaa')
       this.getUserWorksInfo();
     }
   },
@@ -162,7 +173,7 @@ Page({
   },
   // 触底加载
   onReachBottom: function () {
-    
+
     // 当前在推荐页面 加载推荐
     if (this.data.myIndex === 1) {
       console.log(this.data.recommendPageNo)

+ 8 - 3
pages/main/class/class.js

@@ -17,10 +17,15 @@ Page({
     pageNo: 1,
     totalNo: 0,
     collectFlag: false,
+    goBackHome: false
   },
   onLoad: function (option) {
     console.log(option);
-    
+    if(option.scene){
+      this.setData({
+          goBackHome: true
+      })
+  }
     this.setData({
       // title: option.title,
       id: option.id
@@ -126,8 +131,8 @@ Page({
     // let uid =  wx.getStorageSync('uid');
     let data = {
       targetCode: this.data.id,
-      title: this.data.title,
-      iconImg: this.data.iconImg
+      // title: this.data.title,
+      // iconImg: this.data.iconImg
     }
     httpRequestApi.collectClass(this.uid, data).success(res => {
       this.setData({

+ 2 - 1
pages/main/class/class.json

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

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

@@ -39,4 +39,5 @@
     </view>
     <canvas canvas-id="myCanvas" style="width:370px;z-index=99999; height: 507px; position: absolute; left: -999rpx; top: -9999rpx;"></canvas>
     <shareDialog id="share-dialog" shareType='class' />
+    <goBackHome id="goBackHome" shareType="{{goBackHome}}" wx:if="{{goBackHome}}" />
 </view>

+ 23 - 2
pages/social/replyDetail/replyDetail.js

@@ -7,8 +7,8 @@ Page({
         class1: 'commentItem commentItemFirst',
         classNormal: 'commentItem',
         postId: '',
-        comment: []
-
+        comment: [],
+        replyInfo: ''
     },
     onLoad: function (option) {
         console.log(option)
@@ -22,6 +22,27 @@ Page({
         this.uid = wx.getStorageSync('uid');
         this.getReplyDetail();
     },
+    // 保存 回复的内容
+    saveValue: function(e){
+     this.setData({
+       replyInfo: e.detail.value
+     },() => {
+       console.log(this.data.replyInfo);
+     });
+    },
+    replyDone:function(){
+      const data = {
+        postsId: this.data.postId,
+        content: this.data.replyInfo
+      }
+      
+      httpRequestApi.postReplyComment(this.uid, data).success(res => {
+        this.setData({
+          replyModal: false
+        });
+        this.getReplyDetail();//更新 变化后的 replyTemp。
+      });
+    },
     // 查询回复详情
     getReplyDetail: function () {
         // let uid = wx.getStorageSync('uid');

+ 7 - 0
pages/social/replyDetail/replyDetail.wxml

@@ -17,4 +17,11 @@
     <view class="replySection" wx:if="{{replyModal}}">
         <input bindblur="bindTextAreaBlur" bindconfirm="replySB" confirm-type="send" placeholder="回复" bindinput="inputSBValue" auto-focus auto-height />
     </view>
+    <view class='reply-msg'>
+      <!-- <input name='reply' class='reply-input' placeholder='回复@{{ comment[0].name }}' confirm-type="send" bindinput='saveValue' auto-focus auto-height></input> -->
+
+      <input name='reply' class='reply-input' placeholder='回复@{{ comment[0].name }}' bindinput='saveValue'>
+      </input>
+      <text class='reply-btn' bindtap='replyDone'>回复</text>
+    </view>
 </view>

+ 31 - 3
pages/social/replyDetail/replyDetail.wxss

@@ -1,5 +1,6 @@
 .commentArea {
-    width: 100%;
+  width: 100%;
+  margin-bottom: 92rpx;
 }
 
 .commentArea .commentItem {
@@ -51,7 +52,7 @@
     margin-top: 12rpx;
     width: 420rpx;
     /* height: 44rpx; */
-    line-height: 44rpx;
+    line-height: 60rpx;
     font-size: 32rpx;
     color: #000;
     /* overflow: hidden;
@@ -99,4 +100,31 @@
     width: 100%;
     height: 300rpx;
     text-indent: 4rpx;
-}
+}
+
+.reply-msg{
+  position: fixed;
+  bottom: 0;
+  width: 750rpx;
+  height: 92rpx;
+  z-index: 100rpx;
+  box-sizing: border-box;
+  display: flex;
+  justify-content: space-around;
+  align-items: center;
+  background: #FFFFFF;
+  font-size: 28rpx;
+}
+
+.reply-input{
+  width: 610rpx;
+  height: 60rpx;
+  line-height: 60rpx;
+  padding-left: 20rpx;
+  border-radius: 12rpx;
+  background: #F0F1F5;
+}
+
+.reply-btn{
+  color: #3BAF34;
+}

+ 16 - 5
pages/social/works/works.js

@@ -24,13 +24,18 @@ Page({
         replyModal: false,
         totalRead: 0,
         pageNo: 1,
-        pageSize: 2
+        pageSize: 2,
+        goBackHome: false
         // shareFlag: false
     },
     onLoad: function (option) {
         console.log(option)
         let id = option.id ? option.id : option.scene.replace('QR', '')
-
+        if(option.scene){
+            this.setData({
+                goBackHome: true
+            })
+        }
         wx.setNavigationBarTitle({
             title: option.title //页面标题为路由参数
         })
@@ -92,7 +97,8 @@ Page({
 
         });
     },
-    onShow() {
+    onShow(options) {
+        console.log(options)
         this.setData({
             replyList: [],
             pageNo: 1,
@@ -135,7 +141,7 @@ Page({
             iconImg: this.data.iconImg,
             title: this.data.title,
             path: `pages/social/works/works`,
-            scene: `QR${this.data.id}`
+            scene: `this.data.id`
             // tip: this.data.tip,
         }
         this.shareDialog.share(data);
@@ -421,5 +427,10 @@ Page({
             }
         })
     },
-
+    // 回到首页
+    goBackHome: function(){
+        wx.redirectTo({
+            url: '../../index/index'
+        })
+    }
 })

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

@@ -2,7 +2,8 @@
     "component": true,
     "usingComponents": {
         "shareDialog": "/component/share/share",
-        "popup": "/component/popup/popup"
+        "popup": "/component/popup/popup",
+        "goBackHome": "/component/goBackHome/goBackHome"
     },
     "window": {
         "onReachBottomDistance": 50

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

@@ -8,7 +8,8 @@
             <text class="likeBtn">{{isLike ? '已' : ''}}点赞</text>
         </view>
         <view class="follow" wx:if="{{authorUid !== myUid}}">
-            <text class="followBtn" bindtap="follow" >{{isFans ? '已' : ''}}关注</text>
+            <image src="{{isFans? '../../../static/image/fully_heart.png' : '../../../static/image/empty_heart.png'}}" />
+            <text class="followBtn" bindtap="follow">{{isFans ? '已' : ''}}关注</text>
         </view>
     </view>
     <view class="userSection">
@@ -41,9 +42,9 @@
             </view>
             <view class="btnWrapper">
                 <image class="commentBtn" src="../../../static/image/comment.png" bindtap="setSBId" data-id="{{item.id}}" data-index="{{index}}" />
-                <text class="commentText" bindtap="setSBId" data-id="{{item.id}}" data-index="{{index}}" >评论</text>
+                <text class="commentText" bindtap="setSBId" data-id="{{item.id}}" data-index="{{index}}">评论</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"  data-index="{{index}}" data-likes="{{item.likes}}" data-id="{{item.id}}" bindtap="likeCommend">{{item.likes}}</text>
+                <text class="likeText" data-index="{{index}}" data-likes="{{item.likes}}" data-id="{{item.id}}" bindtap="likeCommend">{{item.likes}}</text>
             </view>
         </view>
     </view>
@@ -71,7 +72,7 @@
     <shareDialog id="share-dialog" shareType='works' shareId="{{id}}" />
     <!-- 评论框 -->
     <view class="replySection" wx:if="{{replyModal}}">
-        <input bindblur="bindTextAreaBlur"  bindconfirm="replySB" confirm-type="send" placeholder="回复" bindinput="inputSBValue" auto-focus auto-height />
+        <input bindblur="bindTextAreaBlur" bindconfirm="replySB" confirm-type="send" placeholder="回复" bindinput="inputSBValue" auto-focus auto-height />
     </view>
     <!-- 奖励弹窗 -->
     <cover-view class="modalWrapper" wx:if="{{ifReward}}">
@@ -94,5 +95,9 @@
         </cover-view>
         <cover-image class="quitBtn" bindtap="quitReward" src="../../../static/groupImg/cha.png" />
     </cover-view>
-    
+    <!-- 回到首页弹窗 -->
+    <!-- <view class="goBackHome" bindtap="goBackHome" wx:if="{{goBackHome}}">
+        <image src="../../../static/image/goBackHome.png" />
+    </view> -->
+    <goBackHome id="goBackHome" shareType="{{goBackHome}}" wx:if="{{goBackHome}}" />
 </view>

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

@@ -51,15 +51,25 @@
 }
 
 .readAuthorSection .follow {
+    display: flex;
+    align-items: center;
+    justify-content: center;
     margin-left: 12rpx;
     width: 160rpx;
     height: 60rpx;
-    border: 2rpx solid #259b24;
+    border: 2rpx solid #ff0000;
     font-size: 28rpx;
     border-radius: 30rpx;
     text-align: center;
     line-height: 60rpx;
-    color: #539bee;
+    color: #ff0000;
+}
+
+.readAuthorSection .follow image {
+    width: 36rpx;
+    height: 36rpx;
+    margin-right: 15rpx;
+
 }
 
 .userSection {
@@ -213,6 +223,7 @@
     right: 10rpx;
     display: flex;
     align-items: center;
+    /* width: 200rpx; */
 }
 
 .btnWrapper .commentBtn {
@@ -452,4 +463,17 @@ button::after {
     width: 100%;
     height: 300rpx;
     text-indent: 4rpx;
+}
+
+.goBackHome {
+    width: 100rpx;
+    height: 100rpx;
+    position: fixed;
+    bottom: 168rpx;
+    right: 45rpx;
+
+}
+.goBackHome image{
+    width: 100%;
+    height: 100%;
 }

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

@@ -68,7 +68,6 @@ Page({
 
   },
   onLoad: function (option) {
-
     httpRequestApi.getUserInfo().success(res => {
       const user = res.data.data
       console.log(user)

+ 8 - 1
pages/user/myconcern/myconcern.js

@@ -9,7 +9,12 @@ Page({
       gesture: true,
       fanList:[]
   },
-
+  toUserDetails: function(e){
+    let fanId = e.currentTarget.dataset.fanId;
+    wx.navigateTo({
+      url: `../../social/works/works?fanId=${fanId}`
+    });
+  },
   /**
    * 生命周期函数--监听页面加载
    */
@@ -26,6 +31,8 @@ Page({
     httpRequestApi.myFans().success(res => {
       this.setData({
         fanList: res.data.data.list
+      },() => {
+        console.log(this.data.fanList);
       });
     });
   },

+ 1 - 1
pages/user/myconcern/myconcern.wxml

@@ -8,7 +8,7 @@
 </wxs>
 <view class='my-concern'>
   <view class="concern-center">
-    <view class='concern-info' wx:for="{{ fanList }}" wx:key="{{ index }}">
+    <view class='concern-info' wx:for="{{ fanList }}" wx:key="{{ index }}" bindtap='toUserDetails' data-fanId='{{ item.fans.fanId }}'>
       <view class='avatar-box'>
         <image class='avatar-image' src="{{ item.user.avatar }}" />
       </view>

+ 19 - 7
project.config.json

@@ -36,7 +36,7 @@
 			"list": []
 		},
 		"miniprogram": {
-			"current": 0,
+			"current": 7,
 			"list": [
 				{
 					"id": 0,
@@ -46,12 +46,6 @@
 				},
 				{
 					"id": -1,
-					"name": "edit",
-					"pathName": "pages/user/myEdit/myEdit",
-					"query": ""
-				},
-				{
-					"id": -1,
 					"name": "团购详情",
 					"pathName": "pages/group-details/group-details",
 					"query": ""
@@ -74,6 +68,24 @@
 					"pathName": "pages/user/myEdit/myEdit",
 					"query": "title=修改资料",
 					"scene": "1012"
+				},
+				{
+					"id": -1,
+					"name": "read",
+					"pathName": "pages/user/myread/myread",
+					"query": ""
+				},
+				{
+					"id": -1,
+					"name": "replydetails",
+					"pathName": "pages/social/replyDetail/replyDetail",
+					"query": ""
+				},
+				{
+					"id": -1,
+					"name": "replydetails",
+					"pathName": "pages/social/replyDetail/replyDetail",
+					"query": ""
 				}
 			]
 		}

BIN
static/groupImg/Preservation.png


BIN
static/groupImg/circle.png


BIN
static/groupImg/jiang.png


BIN
static/groupImg/share.png


BIN
static/groupImg/weixin.png


BIN
static/image/empty_heart.png


BIN
static/image/fully_heart.png


BIN
static/image/goBackHome.png


+ 9 - 0
utils/APIClient.js

@@ -111,6 +111,15 @@ module.exports = {
       "uid": followUid
     }).method('POST').send();
   },
+  // 取消关注
+  cancerFollow(uid, followUid) {
+    let url = getBaseUrl(`wx/fans`);
+    return request.getInstance().header({
+      uid
+    }).url(url).data({
+      "uid": followUid
+    }).method('PUT').send();
+  },
   //获取关注的用户列表
   getFollowUsers(uid, pageNo, pageSize) {
     let url = getBaseUrl(`wx/fans`);

+ 8 - 1
utils/util.js

@@ -32,7 +32,14 @@ function formatDate(time, flag) {
 		return month + '-' + day + ' ' + hour + ':' + minute;
 	}
 }
+function GetQueryString(str,name){
+	var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
+	var r = str.match(reg);
+	if(r!=null) return  unescape(r[2]); 
+	return null;
+}
 module.exports = {
   formatTime: formatTime,
-  formatDate
+	formatDate,
+	GetQueryString
 }