zhaoxiaohai %!s(int64=2) %!d(string=hai) anos
pai
achega
9275db7e14

+ 3 - 10
pages/tabbar/message/index.js

@@ -6,7 +6,6 @@ Page({
      * 页面的初始数据
      */
     data: {
-        tabShow: true,
         height: 0,
         list: [],
         content: {
@@ -22,23 +21,17 @@ Page({
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-        //配置权限
-        let auth = getApp().globalData.queryPer.query(wx.getStorageSync('userauth'), ['通用'], ['消息中心'])[0].apps;
-        if (auth.length == 1) this.setData({
-            tabShow: false,
-            "content.type": (auth[0].meta.title == '系统消息') ? '系统' : '应用'
-        });
-    },
+    onLoad(options) {},
     //切换tab选项
     tabChange({
         detail
     }) {
         this.setData({
-            "content.type": detail.label.slice(0, 2)
+            "content.type": detail.name
         })
         this.getlist(true);
     },
+    
     /**
      * 生命周期函数--监听页面初次渲染完成
      */

+ 13 - 2
pages/tabbar/message/index.scss

@@ -1,7 +1,17 @@
 @import '/static/unread.wxss';
-page{
+
+page {
     padding: 0 !important;
+    overflow: hidden !important;
+}
+
+.tab-active-class {
+    color: var(--assist) !important;
+    font-size: 28rpx !important;
+    font-family: PingFang SC-Bold, PingFang SC !important;
+    font-weight: bold !important;
 }
+
 /* 消息列表 */
 .list {
     position: relative;
@@ -37,7 +47,8 @@ page{
         font-family: PingFang SC-Regular, PingFang SC;
         color: #999999;
         margin-top: 16rpx;
-        .tag{
+
+        .tag {
             margin-right: 10rpx;
         }
     }

+ 7 - 3
pages/tabbar/message/index.wxml

@@ -1,12 +1,16 @@
-<My_tabs wx:if="{{tabShow}}" isShow='{{tabShow}}' bind:onChange='tabChange' />
-<view id='tabs' />
+<!-- <My_tabs id='tabs' bind:onChange='tabChange' /> -->
+<van-tabs id='tabs' active="{{ content.type }}" color='var(--assist)' tab-active-class='tab-active-class' bind:change="tabChange">
+    <van-tab title="系统消息" name='系统' />
+    <van-tab title="应用消息" name='应用' />
+</van-tabs>
+
 <My_listBox id="ListBox" height="{{height}}" bind:getlist='getlist'>
     <view class="unread">总共{{total}}条</view>
     <navigator url="#" class='list' wx:for="{{list}}" data-item="{{item}}" bindtap="toDetails">
         <view class="title line-1">{{item.title}}</view>
         <view class="content line-1">{{item.message}}</view>
         <view class="time">
-            <van-tag class="tag" plain type="primary">{{item.objectname}}</van-tag>{{item.createdate}}
+            <van-tag class="tag" wx:if="{{item.objectname}}" plain type="primary">{{item.objectname}}</van-tag>{{item.createdate}}
         </view>
         <view wx:if="{{item.isread=='0'}}" class="unread-item" />
     </navigator>

+ 0 - 4
pages/tabbar/message/modules/tabs.js

@@ -16,9 +16,6 @@ Component({
         },
         onChange: {
             type: Function
-        },
-        isShow: {
-            type: Boolean
         }
     },
 
@@ -51,7 +48,6 @@ Component({
         },
         //更改横线位置
         setBorBotLeft() {
-            if (this.data.isShow) return;
             let animation = wx.createAnimation({
                 duration: 1000,
                 timingFunction: 'ease',