Quellcode durchsuchen

共有N人完成录音

孙志雷 vor 6 Jahren
Ursprung
Commit
b6461b1986
2 geänderte Dateien mit 6 neuen und 4 gelöschten Zeilen
  1. 5 3
      pages/social/works/works.js
  2. 1 1
      pages/social/works/works.wxml

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

@@ -21,7 +21,8 @@ Page({
         ifReward: false,
         id: '',
         path: '',
-        replyModal: false
+        replyModal: false,
+        totalRead: 0
         // shareFlag: false
     },
     onLoad: function (option) {
@@ -44,7 +45,7 @@ Page({
     getWorks: function (uid, id) {
         httpRequestApi.getWorksDetail(uid, id).success((res) => {
             console.log(res);
-            console.log(id)
+            console.log(id);
             const others = res.data.data.otherRead;
             const author = res.data.data.user;
             const works = res.data.data.userRead;
@@ -58,7 +59,8 @@ Page({
                 othersTemp.push(temp);
             });
             this.setData({
-                user: othersTemp,
+                user: othersTemp, 
+                totalRead: res.data.data.totalRead,
                 author: author.wechatName,
                 authorAvatar: author.avatar,
                 authorUid: author.uid,

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

@@ -14,7 +14,7 @@
     <view class="userSection">
         <view class="peopleNum">
             <image class="peoplesIcon" src="../../../static/image/peoples.png" />
-            <view class="title">共有12345人完成了录音</view>
+            <view class="title">共有{{totalRead}}人完成了录音</view>
         </view>
         <scroll-view scroll-x class="scrollWrapper" scroll-with-animation="true">
             <view class="avatarRow">