zhaoxiaohai 3 years ago
parent
commit
7a79982fb9

+ 6 - 3
custom-tab-bar/index.js

@@ -51,7 +51,8 @@ Component({
                 url: '/pages/tabbar-pages/user/index'
             }
         ],
-        show: false
+        show: false,
+        phoneNumber: '',
     },
 
     /**
@@ -60,6 +61,9 @@ Component({
     methods: {
         /* tabbar */
         onChange(event) {
+            if (this.data.phoneNumber == '') this.setData({
+                phoneNumber: getApp().globalData.servicehotline
+            });
             if (event.target.dataset.index == 1) return this.setData({
                 show: true
             })
@@ -80,8 +84,7 @@ Component({
         CallOut() {
             wx.makePhoneCall({
                 phoneNumber: getApp().globalData.servicehotline
-            }).catch((e) => {
-            })
+            }).catch((e) => {})
         },
         onClose() {
             this.setData({

+ 2 - 1
pages/tabbar-pages/message/index.js

@@ -47,7 +47,8 @@ Page({
             if (res.msg != '成功') return wx.showToast({
                 title: res.data,
             });
-            const name = 'msgList[' + index + '].fisread'
+            const name = 'msgList[' + index + '].fisread';
+            this.selectComponent("#gxshuju").unReadMessageCount();
             this.setData({
                 [name]: 1
             })

+ 3 - 1
pages/tabbar-pages/message/index.json

@@ -1,4 +1,6 @@
 {
   "navigationStyle": "custom",
-  "usingComponents": {}
+  "usingComponents": {
+    "CusTabBar": "/custom-tab-bar/index"
+  }
 }

+ 5 - 1
pages/tabbar-pages/message/index.wxml

@@ -29,4 +29,8 @@
         </navigator>
     </view>
     <My_pageReachBottom dummyStatus="{{msgList.length>0}}" loadMore='{{pageNumber>=pageTotal}}'></My_pageReachBottom>
-</scroll-view>
+</scroll-view>
+
+<block hidden="true">
+    <CusTabBar id="gxshuju"></CusTabBar>
+</block>