184 行
4.7 KiB
Vue
184 行
4.7 KiB
Vue
<!-- 分销商功能专区菜单栏 -->
|
|
<template>
|
|
<view class="menu-box ss-flex-col">
|
|
<!-- 头部栏 -->
|
|
<view class="menu-header ss-flex ss-row-between ss-col-center">
|
|
<view class="header-left ss-flex ss-col-center">
|
|
<view class="title-bar"></view>
|
|
<text class="title">功能专区</text>
|
|
</view>
|
|
<text class="sub-hint">快捷业务入口</text>
|
|
</view>
|
|
|
|
<!-- 菜单网格 -->
|
|
<view class="menu-list ss-flex ss-flex-wrap">
|
|
<view
|
|
v-for="(item, index) in menuList"
|
|
:key="index"
|
|
class="item-box ss-flex-col ss-col-center"
|
|
@tap="sheep.$router.go(item.path)"
|
|
>
|
|
<view class="icon-wrap ss-flex ss-row-center ss-col-center">
|
|
<image
|
|
class="menu-icon"
|
|
:src="sheep.$url.static(item.img)"
|
|
mode="aspectFill"
|
|
></image>
|
|
</view>
|
|
<view class="menu-title">{{ item.title }}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script setup>
|
|
import sheep from '@/sheep';
|
|
import { computed } from 'vue';
|
|
|
|
const userInfo = computed(() => sheep.$store('user').userInfo);
|
|
const allMenus = [
|
|
{
|
|
img: '/assets/addons/shopro/uniapp/commission/commission_icon1.png',
|
|
title: '我的团队',
|
|
path: '/pages/commission/team',
|
|
},
|
|
{
|
|
img: '/assets/addons/shopro/uniapp/commission/commission_icon2.png',
|
|
title: '收益明细',
|
|
path: '/pages/commission/rewards',
|
|
},
|
|
{
|
|
img: '/assets/addons/shopro/uniapp/commission/commission_icon2.png',
|
|
title: '我的收益',
|
|
path: '/pages/user/wallet/commission',
|
|
},
|
|
{
|
|
img: '/assets/addons/shopro/uniapp/commission/commission_icon3.png',
|
|
title: '我的dmepa',
|
|
path: '/pages/commission/madow',
|
|
},
|
|
{
|
|
img: '/assets/addons/shopro/uniapp/commission/commission_icon5.png',
|
|
title: '兑换券',
|
|
path: '/pages/commission/voucher',
|
|
},
|
|
{
|
|
img: '/assets/addons/shopro/uniapp/commission/commission_icon3.png',
|
|
title: '推广订单',
|
|
path: '/pages/commission/order',
|
|
},
|
|
{
|
|
img: '/assets/addons/shopro/uniapp/commission/commission_icon7.png',
|
|
title: '邀请海报',
|
|
path: 'action:showShareModal',
|
|
},
|
|
{
|
|
img: '/assets/addons/shopro/uniapp/commission/commission_icon8.png',
|
|
title: '分享记录',
|
|
path: '/pages/commission/share-log',
|
|
},
|
|
{
|
|
img: '/assets/addons/shopro/uniapp/commission/commission_icon5.png',
|
|
title: '我的资料',
|
|
path: '/pages/commission/apply',
|
|
isAgentFrom: true,
|
|
},
|
|
{
|
|
img: '/assets/addons/shopro/uniapp/commission/commission_icon4.png',
|
|
title: '推广商品',
|
|
path: '/pages/commission/goods',
|
|
hideInPartner: true,
|
|
},
|
|
];
|
|
|
|
const menuList = computed(() =>
|
|
allMenus.filter((item) => {
|
|
if (item.isAgentFrom && !userInfo.value?.agent_form) return false;
|
|
if (item.hideInPartner && userInfo.value?.partner_mode !== false) return false;
|
|
return true;
|
|
}),
|
|
);
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.menu-box {
|
|
width: 694rpx;
|
|
margin: 0 auto 20rpx;
|
|
background: #ffffff;
|
|
border-radius: 20rpx;
|
|
border: 1rpx solid rgba(224, 185, 130, 0.3);
|
|
box-shadow: 0 6rpx 20rpx rgba(105, 46, 4, 0.05);
|
|
z-index: 3;
|
|
position: relative;
|
|
overflow: hidden;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.menu-header {
|
|
padding: 22rpx 28rpx 18rpx 28rpx;
|
|
background: linear-gradient(180deg, #fffcf6 0%, #ffffff 100%);
|
|
border-bottom: 1rpx solid #f6f0e4;
|
|
|
|
.header-left {
|
|
.title-bar {
|
|
width: 6rpx;
|
|
height: 24rpx;
|
|
border-radius: 4rpx;
|
|
background: linear-gradient(180deg, #ff6000 0%, #ff9500 100%);
|
|
margin-right: 12rpx;
|
|
}
|
|
|
|
.title {
|
|
font-size: 26rpx;
|
|
font-weight: 700;
|
|
color: #522703;
|
|
line-height: 32rpx;
|
|
}
|
|
}
|
|
|
|
.sub-hint {
|
|
font-size: 22rpx;
|
|
color: #b5906a;
|
|
font-weight: 500;
|
|
}
|
|
}
|
|
|
|
.menu-list {
|
|
padding: 28rpx 12rpx 10rpx 12rpx;
|
|
background: #ffffff;
|
|
}
|
|
|
|
.item-box {
|
|
width: 25%;
|
|
margin-bottom: 30rpx;
|
|
transition: transform 0.15s ease;
|
|
|
|
&:active {
|
|
transform: scale(0.93);
|
|
}
|
|
|
|
.icon-wrap {
|
|
width: 80rpx;
|
|
height: 80rpx;
|
|
border-radius: 50%;
|
|
background: #faf6f0;
|
|
box-shadow: 0 2rpx 8rpx rgba(105, 46, 4, 0.06);
|
|
}
|
|
|
|
.menu-icon {
|
|
width: 76rpx;
|
|
height: 76rpx;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.menu-title {
|
|
font-size: 24rpx;
|
|
font-weight: 500;
|
|
color: #333333;
|
|
line-height: 32rpx;
|
|
text-align: center;
|
|
margin-top: 12rpx;
|
|
}
|
|
}
|
|
</style>
|