zhaoxiaohai 2 лет назад
Родитель
Сommit
d697fb7a1f

+ 1 - 0
pages/annunciate/incidental.scss

@@ -11,6 +11,7 @@
         align-items: center;
 
         .tag {
+            max-width: 100rpx;
             height: 36rpx;
             line-height: 36rpx;
             padding: 0 10rpx;

+ 4 - 2
pages/annunciate/index.js

@@ -8,10 +8,11 @@ Page({
      */
     data: {
         scrollHeight: 0,
+        list: [],
         "content": {
             "pageNumber": 1,
             "pageSize": 20,
-            pageTotal: 1,
+            "pageTotal": 1,
             "where": {
                 "condition": ""
             }
@@ -36,13 +37,14 @@ Page({
             "method": "queryNoticeList",
             content: this.data.content
         }).then(res => {
-            console.log("列表", res)
+            console.log("通告列表", res)
             this.selectComponent('#ListBox').RefreshToComplete();
             if (res.msg != '成功') return wx.showToast({
                 title: res.data,
                 icon: "none"
             })
             this.setData({
+                total: res.total,
                 list: (res.pageNumber == 1) ? res.data : this.data.list.concat(res.data),
                 ['content.pageNumber']: res.pageNumber + 1,
                 ['content.pageTotal']: res.pageTotal

+ 1 - 0
pages/annunciate/index.scss

@@ -37,6 +37,7 @@ page {
                 font-family: PingFang SC-Regular, PingFang SC;
                 color: #666666;
                 margin-top: 16rpx;
+                text-align: left !important;
             }
         }
     }

+ 8 - 8
pages/annunciate/index.wxml

@@ -1,27 +1,27 @@
 <view class="top" />
 <My_listBox id='ListBox' height='{{scrollHeight}}' bind:getlist='getList'>
-    <view class="unread">总共50条,未读25条</view>
-    <navigator class="my-card list" url="./details" wx:for="{{20}}">
+    <view class="unread">总共{{total}}条,未读25条</view>
+    <navigator class="my-card list" url="./details" wx:for="{{list}}">
         <view class="content">
             <image class="cover" src="/static/image/a-cover.png" />
             <view class="main">
-                <view class="title line-1">标题显示最多40个字符,超出部分省略标题显示最多40个字符,超出部分省略</view>
-                <view class="explain line-1">标题显示最多40个字符,超出部分省略标题显示最多40个字符,超出部分省略</view>
+                <view class="title line-1">{{item.title}}</view>
+                <view class="explain line-1">{{item.summary}}</view>
             </view>
         </view>
         <view class="incidental">
             <view class="incidental_l">
-                <van-tag custom-class='tag' color="#FF3B30" plain>政策公告</van-tag>
-                <view class="time">发布于:2022-10-12</view>
+                <van-tag custom-class='tag line-1' color="#FF3B30" plain>{{item.classname}}</van-tag>
+                <view class="time">发布于:{{item.createdate}}</view>
             </view>
             <view class="incidental_r">
                 <view class="incidental_r_item">
                     <text class="iconfont icon-a-tonggaofujian" />
-                    附件:1
+                    附件:{{item.attinfos.length}}
                 </view>
                 <view class="incidental_r_item">
                     <text class="iconfont icon-a-tonggaoliulanliang" />
-                    200
+                    {{item.readcount}}
                 </view>
             </view>
         </view>