瀏覽代碼

共有N人完成录音

孙志雷 6 年之前
父節點
當前提交
b6461b1986
共有 2 個文件被更改,包括 6 次插入4 次删除
  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">