隐藏首页菜单

master
wangdong 5 months ago
parent 9b8343c054
commit 0975359ec1
  1. 58
      src/views/index/Index.vue

@ -164,23 +164,24 @@
<span>常用功能</span> <span>常用功能</span>
</div> </div>
<a-row :gutter="32"> <a-row :gutter="32">
<a-col class :span="6" v-for="(item, index) in functions" :key="index"> <template v-for="(item, index) in functions">
<div <a-col class :span="6" v-if="(item.name !== '发布商品' || storeVersion !== 1) && (!item.moduleKey || $module(item.moduleKey))" :key="index">
v-if="!item.moduleKey || $module(item.moduleKey)" <div
class="item" class="item"
@click="handleLink(item.link)" @click="handleLink(item.link)"
> >
<div class="flex flex-y-center"> <div class="flex flex-y-center">
<div <div
class="icon flex flex-x-center flex-y-center" class="icon flex flex-x-center flex-y-center"
:style="{ backgroundColor: item.color }" :style="{ backgroundColor: item.color }"
> >
<a-icon :component="item.icon" /> <a-icon :component="item.icon" />
</div>
<span class="name">{{ item.name }}</span>
</div> </div>
<span class="name">{{ item.name }}</span>
</div> </div>
</div> </a-col>
</a-col> </template>
</a-row> </a-row>
</a-card> </a-card>
@ -212,11 +213,18 @@ const functions = [
link: '/goods/create' link: '/goods/create'
}, },
{ {
name: '店铺装修', name: '数据统计',
icon: Icons.functions.decorate, icon: Icons.functions.statistics,
color: '#f15858', color: '#139dff',
link: '/page/index' link: '/statistics',
moduleKey: 'statistics-statistics'
}, },
// {
// name: '',
// icon: Icons.functions.decorate,
// color: '#f15858',
// link: '/page/index'
// },
{ {
name: '会员管理', name: '会员管理',
icon: Icons.functions.user, icon: Icons.functions.user,
@ -248,13 +256,6 @@ const functions = [
color: '#f15858', color: '#f15858',
link: '/market/coupon/index', link: '/market/coupon/index',
moduleKey: 'app-coupon' moduleKey: 'app-coupon'
},
{
name: '数据统计',
icon: Icons.functions.statistics,
color: '#139dff',
link: '/statistics',
moduleKey: 'statistics-statistics'
} }
] ]
@ -308,6 +309,11 @@ export default {
data data
} }
}, },
computed: {
storeVersion() {
return window.localStorage.getItem('storeInfo') ? JSON.parse(window.localStorage.getItem('storeInfo')).store_version : 0
}
},
created () { created () {
// //
this.getData() this.getData()

Loading…
Cancel
Save