zhaoxiaohai 2 年之前
父节点
当前提交
515e26cc05
共有 2 个文件被更改,包括 5 次插入3 次删除
  1. 4 2
      pages/annunciate/index.js
  2. 1 1
      pages/annunciate/index.wxml

+ 4 - 2
pages/annunciate/index.js

@@ -17,7 +17,8 @@ Page({
             "where": {
                 "condition": ""
             }
-        }
+        },
+        unreadNum: 0
     },
 
     /**
@@ -56,7 +57,8 @@ Page({
                 total: res.total,
                 list: (res.pageNumber == 1) ? res.data : this.data.list.concat(res.data),
                 ['content.pageNumber']: res.pageNumber + 1,
-                ['content.pageTotal']: res.pageTotal
+                ['content.pageTotal']: res.pageTotal,
+                unreadNum: res.total - res.tips.readNum
             })
         })
     },

+ 1 - 1
pages/annunciate/index.wxml

@@ -1,6 +1,6 @@
 <view class="top" />
 <My_listBox id='ListBox' height='{{scrollHeight}}' bind:getlist='getList'>
-    <view class="unread">总共{{total}}条,未读25条</view>
+    <view class="unread">总共{{total}}条,未读{{unreadNum}}条</view>
     <navigator class="list-box" url="#" wx:for="{{list}}" data-item="{{item}}" bindtap="toDetails">
         <Item item="{{item}}" />
     </navigator>