Rorschach 5 years ago
parent
commit
1e7eabe153

+ 0 - 1
pages/index/index.js

@@ -132,7 +132,6 @@ Page({
       })
     });
     if (this.data.myIndex === 3) {
-      console.log('aaaaaaa')
       this.getUserWorksInfo();
     }
   },

+ 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;
+}

+ 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": ""
 				}
 			]
 		}