This commit is contained in:
xiaozhiyong
2023-03-28 11:12:37 +08:00
parent 0617c21fcf
commit 0aba2c9769
2 changed files with 31 additions and 24 deletions

View File

@@ -50,20 +50,25 @@
</view>
</view>
<view class="domain">
<view class="item" v-for="item,index in menuList" :key="index">
<view class="title">{{item.name}}</view>
<view class="options-frame" >
<view class="option" v-for="optionItme,optionIndex in item.submenu" :key="optionIndex" @tap.stop="jump(optionItme)">
<view class="star" @tap.stop="collectionFn(optionItme)">
<uni-icons :color="iconFn(optionItme)" custom-prefix="iconfont" type="iconshoucang-yishoucang" size="18"></uni-icons>
</view>
<view class="wall">
<view class="name">{{optionItme.name}}</view>
<uni-icons color="#fff" custom-prefix="iconfont" :type="optionItme.icon" size="50"></uni-icons>
</view>
<template v-for="item,index in menuList">
<view class="item" v-if="isHaveAuth(item.submenu)" :key="index">
<view class="title">{{item.name}}</view>
<view class="options-frame" >
<template v-for="optionItme,optionIndex in item.submenu">
<view class="option" v-if="user.authList.includes(optionItme.lable)" :key="optionIndex" @tap.stop="jump(optionItme)">
<view class="star" @tap.stop="collectionFn(optionItme)">
<uni-icons :color="iconFn(optionItme)" custom-prefix="iconfont" type="iconshoucang-yishoucang" size="18"></uni-icons>
</view>
<view class="wall">
<view class="name">{{optionItme.name}}</view>
<uni-icons color="#fff" custom-prefix="iconfont" :type="optionItme.icon" size="50"></uni-icons>
</view>
</view>
</template>
</view>
</view>
</view>
</template>
</view>
@@ -136,6 +141,9 @@
}
},
methods: {
isHaveAuth(submenu) {
return submenu.some(item => this.user.authList.includes(item.lable))
},
close() {
uni.showModal({
title: '提示',
@@ -150,7 +158,6 @@
}
}
});
},
jump(e) {
if (this.user.authList.includes(e.lable)) {