2025-04-11 17:32:55 +08:00
|
|
|
<template>
|
|
|
|
<div class="layout-user-centre-warp">
|
|
|
|
<div class="layout-user-centre">
|
|
|
|
<div class="layout-user-centre-top">
|
|
|
|
<div class="logo-warp">
|
2025-07-11 17:01:20 +08:00
|
|
|
<costomImg :url="'images/logo3.png'" :is-view="false"></costomImg>
|
2025-04-11 17:32:55 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="layout-user-centre-menu">
|
|
|
|
<el-menu ellipsis class="layout-user-centre-menu">
|
|
|
|
<app-link v-for="(item, index) in meuns" :key="index" :to="item.path">
|
|
|
|
<el-menu-item active-text-color="#25BF82">
|
|
|
|
<div class="iconfont" :class="'icon-' + item.icon" :style="{ 'font-size': item.iconSize }"></div>
|
|
|
|
<span class="txt-ellipsis clamp1">{{ item.label }}</span>
|
|
|
|
</el-menu-item>
|
|
|
|
</app-link>
|
|
|
|
</el-menu>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup name="layout-user-centre">
|
|
|
|
import { computed, ref } from 'vue';
|
|
|
|
import { useSettingStore } from '@/store/modules/setting';
|
|
|
|
import { usePermissionStore } from '@/store/modules/permission';
|
|
|
|
import AppLink from '../Menu/Link.vue';
|
|
|
|
import { useRoute, useRouter } from 'vue-router';
|
|
|
|
import { isEmpty, getAssetsFile } from '@/utils';
|
|
|
|
import costomImg from '@/components/costomImg.vue';
|
|
|
|
|
|
|
|
const route = useRoute();
|
|
|
|
const router = useRouter();
|
|
|
|
const SettingStore = useSettingStore();
|
|
|
|
const PermissionStore = usePermissionStore();
|
|
|
|
const cacheRoutes = computed(() => PermissionStore.keepAliveRoutes);
|
|
|
|
const isReload = computed(() => SettingStore.isReload);
|
|
|
|
|
|
|
|
const isSubApp = computed(() => route.path.includes('sub'));
|
|
|
|
|
|
|
|
const keyword = ref('');
|
|
|
|
|
|
|
|
const meuns = ref([
|
|
|
|
{ label: '我的购物车', path: '/sub-operation-service/userCenter-shoppingCart', icon: 'shopcar', iconSize: '26px' },
|
|
|
|
{ label: '我的订单', path: '/sub-operation-service/userCenter-userOrders', icon: 'order', iconSize: '26px' },
|
|
|
|
{ label: '我的土地', path: '/sub-operation-service/userCenter-userLands', icon: 'land', iconSize: '26px' },
|
|
|
|
// { label: '我的溯源', path: '', icon: 'soucecode' },
|
|
|
|
// { label: '我的金融', path: '', icon: 'finance' },
|
|
|
|
// { label: '我的农机', path: '', icon: 'farmmachinery' },
|
|
|
|
// { label: '我的品牌', path: '', icon: 'brand' },
|
|
|
|
// { label: '我的劳务', path: '', icon: 'labor' },
|
|
|
|
// { label: '分拣/包装', path: '', icon: 'sorting' },
|
|
|
|
// { label: '仓储/物流', path: '', icon: 'logistics' },
|
|
|
|
// { label: '修改密码', path: '', icon: 'password' },
|
|
|
|
]);
|
|
|
|
|
|
|
|
function Search() {
|
|
|
|
console.log(keyword.value, 'search');
|
|
|
|
}
|
|
|
|
|
|
|
|
const toHome = () => {
|
|
|
|
console.info('toHome', router);
|
|
|
|
router.push('/sub-operation-service/home');
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
div {
|
|
|
|
box-sizing: border-box;
|
|
|
|
}
|
|
|
|
.layout-user-centre-warp {
|
|
|
|
display: inline-block;
|
|
|
|
padding: 16px;
|
2025-05-20 13:05:37 +08:00
|
|
|
width: 320px;
|
|
|
|
height: 100vh;
|
|
|
|
text-align: center;
|
2025-04-11 17:32:55 +08:00
|
|
|
.layout-user-centre {
|
|
|
|
overflow: auto;
|
2025-05-20 13:05:37 +08:00
|
|
|
height: calc(100% - 0px);
|
2025-04-11 17:32:55 +08:00
|
|
|
border-radius: 16px;
|
2025-05-20 13:05:37 +08:00
|
|
|
background: $color-fff;
|
2025-04-11 17:32:55 +08:00
|
|
|
}
|
|
|
|
.layout-user-centre-top {
|
|
|
|
padding: 8px;
|
2025-05-20 13:05:37 +08:00
|
|
|
width: 100%;
|
2025-04-11 17:32:55 +08:00
|
|
|
.logo-warp {
|
|
|
|
height: 74px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.el-menu {
|
|
|
|
border-right: 0 !important;
|
|
|
|
background: $color-fff;
|
|
|
|
.el-menu-item {
|
|
|
|
font-size: 20px;
|
|
|
|
font-weight: 400;
|
|
|
|
.iconfont {
|
|
|
|
display: inline-block;
|
|
|
|
vertical-align: middle;
|
|
|
|
padding-right: 8px;
|
|
|
|
color: $color-333;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
li {
|
|
|
|
color: $color-333;
|
|
|
|
}
|
|
|
|
.router-link-active {
|
|
|
|
li {
|
|
|
|
color: $color-main !important;
|
|
|
|
.iconfont {
|
|
|
|
color: $color-main !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|