Commit ec203487 by zhangzhen

细节优化

parent a145f8eb
......@@ -43,8 +43,8 @@
</view>
<view class="flex-col content-box">
<view class="user-action">
<view v-for="(item,k) in userAction" :key="k" class="action-box" >
<view v-if="item.show|| userInfo.isCleaner" :style="{background:item.color}" class="action-item" @tap="onActionNav(item,k)">
<view v-for="(item,k) in userAction" :key="k" v-if="item.show" class="action-box" >
<view :style="{background:item.color}" class="action-item" @tap="onActionNav(item,k)">
<view class="flex-1">
<text class="text-title text-lg">{{item.label}}</text>
</view>
......@@ -148,7 +148,7 @@
label:"订单",
iconUrl:config.assetsPath+'/my_list_15.png',
routePath:"/pages/orderRecord/orderRecord",
type:"",
type:"1",
color:"#FEF9EE",
show:true
},
......@@ -156,22 +156,23 @@
label:"消费记录",
iconUrl:config.assetsPath+'/my_list_16.png',
routePath:"/pages/payRecord/index",
type:"",
type:"2",
color:"#EEF3FE",
show:true
},
// {
// label:"立即充值",
// iconUrl:config.assetsPath+'/vip_icon.png',
// routePath:"",
// type:"",
// show:true
// },
{
label:"保洁管理",
iconUrl:config.assetsPath+'/my_list_17.png',
routePath:"/pages/cleanManage/cleanManage",
type:"",
type:"3",
color:"#F1EEFE",
show:false
},
{
label:"保洁记录",
iconUrl:config.assetsPath+'/my_list_17.png',
routePath:"/pages/cleanRecord/index",
type:"4",
color:"#F1EEFE",
show:false
}
......@@ -241,6 +242,21 @@
this.userInfo = res.data.data;
this.userName = this.userInfo.phone.slice(-4);
uni.setStorageSync('userInfo',this.userInfo)
this.userAction = this.userAction.map(item=>{
let show = item.show;
if(item.type == '3' && this.userInfo.isCleaner){
show = true
}
if(item.type == '4' && this.userInfo.isAdmin){
show = true
}
return {
...item,
show
}
})
this.loginStatus = true;
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment