zhaoxiaohai 2 gadi atpakaļ
vecāks
revīzija
22de7153b6

+ 8 - 5
pages/tabbar/home/index.js

@@ -87,7 +87,6 @@ Page({
             });
             /* 首页小组件查询 */
             let home = getApp().globalData.queryPer.query(wx.getStorageSync('userauth'), ['通用'], ['首页'])[0].apps[0].meta.wedgits;
-            console.log("首页", home)
             if (home.some(v => v.wedgit == 'homedatadisplay')) subassembly.push('homedatadisplay');
             this.setData({
                 gridList,
@@ -99,7 +98,6 @@ Page({
             bannerList: wx.getStorageSync('banner_list')[0].ads
         })
         this.queryNoticeList(0); //获取通告列表
-        this.queryMessage(0)
     },
     /* 销售线索待办 */
     getCount() {
@@ -157,9 +155,10 @@ Page({
             content: {
                 nocache: true,
                 pageNumber: 1,
-                pageSize: 3,
+                pageSize: 5,
                 pageTotal: 1,
-                type: "应用"
+                type: "",
+                where:{}
             },
         }).then(res => {
             if (res.msg != '成功') return (i <= 5) ? this.queryMessage(i + 1) : wx.showToast({
@@ -198,7 +197,7 @@ Page({
             item
         } = e.currentTarget.dataset;
         wx.navigateTo({
-            url: '/pages/tabbar/message/details?id=' + item.objectid,
+            url: '/pages/tabbar/message/details?id=' + item.messageid,
         })
     },
     /* 去通告 */
@@ -225,9 +224,13 @@ Page({
      * 生命周期函数--监听页面显示
      */
     onShow() {
+        getApp().globalData.callback = function (res) {
+            console.log("callback", res)
+        };
         this.getTabBar().init();
         this.startDataCarousel();
         this.getCount(); //更新徽标数据
+        this.queryMessage(0); //更新最新消息
     },
     /**
      * 生命周期函数--监听页面隐藏

+ 0 - 6
pages/tabbar/home/index.scss

@@ -15,7 +15,6 @@
         margin: 0 8rpx 0 24rpx;
     }
 }
-
 /* 轮播图区域 */
 .banner {
     position: relative;
@@ -61,7 +60,6 @@
         }
     }
 }
-
 /* 滚动播放 */
 .scroll-area {
     width: 690rpx;
@@ -84,7 +82,6 @@
         }
     }
 }
-
 /* 宫格区域 */
 .grld {
     display: flex;
@@ -129,7 +126,6 @@
         }
     }
 }
-
 /* 概况 */
 .general-situation {
     display: flex;
@@ -156,7 +152,6 @@
         color: #999999;
     }
 }
-
 /* 概况数据展示 */
 .data-display {
     display: flex;
@@ -189,7 +184,6 @@
         }
     }
 }
-
 /* 通告 */
 .annunciate {
     .unread {

+ 2 - 2
pages/tabbar/home/index.wxml

@@ -22,8 +22,8 @@
 <view style="height: 130rpx;" />
 <!-- 滚动通知 -->
 <view class="scroll-area" data-item="{{notice}}" catchtap="toMsg" wx:if="{{notice}}">
-    <van-notice-bar custom-class='notice-bar' background="none" color='#666' text="{{notice.message}}">
-        <text slot="left-icon" class="iconfont icon-a-shouyexiaoxigundongquxiaoxi" />
+    <van-notice-bar custom-class='notice-bar' background="none" data-item="{{notice}}" color='#666' text="{{notice.message}}">
+        <text slot="left-icon" data-item="{{notice}}" class="iconfont icon-a-shouyexiaoxigundongquxiaoxi" />
     </van-notice-bar>
 </view>
 <!-- 宫格区域 -->