67 lines
1.5 KiB
Vue
67 lines
1.5 KiB
Vue
<template>
|
|
<view class="body">
|
|
<view class="" v-for="(item,index) in datas" :key="index">
|
|
<view class="sekuai">
|
|
<view class="neibu">
|
|
<view @click="neibuClick(item)" class="zhuBT">
|
|
{{item}}
|
|
</view>
|
|
<view class="tupian">
|
|
<u-image src="https://maomaochong.top:8088/i/2024/03/25/66015effd9c6e.png" :fade="true" duration="200" mode="scaleToFill" width="170" height="170"></u-image>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
datas:[],
|
|
map: {'项目列表维护': '/pages/project/projectIndex'}
|
|
}
|
|
},
|
|
onShow() {
|
|
var me = this
|
|
var res=uni.getStorageSync('token')
|
|
var a
|
|
for(a=0;a<res.menu.length;a++){
|
|
console.log(res.menu[a].menuId)
|
|
if(res.menu[a].menuId=="1101"){
|
|
me.datas.push(res.menu[a].menuName)
|
|
}
|
|
if(res.menu[a].menuId=="1102"){
|
|
me.datas.push(res.menu[a].menuName)
|
|
}
|
|
if(res.menu[a].menuId=="1103"){
|
|
me.datas.push(res.menu[a].menuName)
|
|
}
|
|
if(res.menu[a].menuId=="1104"){
|
|
me.datas.push(res.menu[a].menuName)
|
|
}
|
|
if(res.menu[a].menuId=="1105"){
|
|
me.datas.push(res.menu[a].menuName)
|
|
}
|
|
if(res.menu[a].menuId=="12"){
|
|
me.datas.push(res.menu[a].menuName)
|
|
}
|
|
}
|
|
console.log(me.datas)
|
|
},
|
|
methods: {
|
|
neibuClick(val){
|
|
console.log(val)
|
|
uni.navigateTo({
|
|
url: this.map[val] // 要跳转的页面路径
|
|
});
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
@import url("index.css");
|
|
</style>
|