update: 修改经营分类新接口数据结构联调
This commit is contained in:
parent
3f9b13020a
commit
eace8e317d
@ -54,7 +54,7 @@ export function GetSmsCode(params){
|
||||
export function GetStoreCategories() {
|
||||
return new Promise((resolve, reject) => {
|
||||
http({
|
||||
url: '/api/mobile/shop/store/biz-category/list',
|
||||
url: '/api/mobile/shop/shop-base-store-category/list',
|
||||
method: 'post'
|
||||
}).then(res => {
|
||||
resolve(res)
|
||||
@ -68,17 +68,17 @@ export function GetStoreCategories() {
|
||||
*/
|
||||
export function transformStoreCategories(data) {
|
||||
return data.map(item => ({
|
||||
value: item.id,
|
||||
label: item.category_name,
|
||||
value: item.store_category_id,
|
||||
label: item.store_category_name,
|
||||
children: item.children ? [
|
||||
// 添加一个与一级目录同名的选项
|
||||
{
|
||||
value: item.id,
|
||||
label: `${item.category_name} 分割比率(${item.split_ratio}%)`
|
||||
value: item.store_category_id,
|
||||
label: `${item.store_category_name} 分割比例(${item.split_ratio}%)`
|
||||
},
|
||||
...item.children.map(child => ({
|
||||
value: child.id,
|
||||
label: `${child.category_name} 分割比率(${child.split_ratio}%)`
|
||||
value: child.store_category_id,
|
||||
label: `${child.store_category_name} 分割比例(${child.split_ratio}%)`
|
||||
}))
|
||||
] : []
|
||||
}));
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
</router-link>
|
||||
</ul>
|
||||
|
||||
<div class="header-right">
|
||||
<div class="header_right">
|
||||
<div class="start">
|
||||
<el-button plain type="danger" @click="handleOpenStartPage">
|
||||
{{
|
||||
@ -101,7 +101,7 @@ const userStore = useUserStore();
|
||||
// 从 userStore 中获取登录状态
|
||||
const isLoggedIn = ref(userStore.isLoggedIn);
|
||||
const mobile = ref("");
|
||||
const approval_status = ref("");
|
||||
const approval_status = ref(0);
|
||||
|
||||
// 每次页面加载时检查 token
|
||||
onMounted(() => {
|
||||
@ -144,7 +144,7 @@ const handleOpenStartPage = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
if (approval_status == 4) {
|
||||
if (approval_status.value == 4) {
|
||||
router.push({ name: "start" });
|
||||
} else {
|
||||
router.push({ name: "check" }); // 已登录跳转到 check 页面
|
||||
@ -152,7 +152,7 @@ const handleOpenStartPage = () => {
|
||||
};
|
||||
|
||||
const handleUserInfoClick = () => {
|
||||
if (approval_status == 4) {
|
||||
if (approval_status.value == 4) {
|
||||
router.push({ name: "start" });
|
||||
} else {
|
||||
router.push({ name: "check" });
|
||||
@ -288,7 +288,7 @@ onUnmounted(() => {
|
||||
}
|
||||
|
||||
|
||||
.header-right {
|
||||
.header_right {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
@ -301,21 +301,30 @@ onUnmounted(() => {
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.header {
|
||||
padding: 0 10px;
|
||||
}
|
||||
.header-menu {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.hamburger-menu {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.logo {
|
||||
img {
|
||||
height: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
.header {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.header_right {
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
.header-menu {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.start {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sub_menu {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,13 +1,9 @@
|
||||
<template>
|
||||
<div class="help_container">
|
||||
<div class="main">
|
||||
<el-row>
|
||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<div class="help_img">
|
||||
<div class="help_img">
|
||||
<img src="../../assets/image/help/help_temp.png">
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -15,14 +11,15 @@
|
||||
<script lang="ts" setup>
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.help_container {
|
||||
width: 100%;
|
||||
min-height: calc(100vh - 70px - 150px);
|
||||
background: #eee;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.main {
|
||||
.main {
|
||||
width: 1200px;
|
||||
margin:0 auto;
|
||||
background: #fff;
|
||||
@ -34,14 +31,17 @@
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.el-row{
|
||||
width: 100%;
|
||||
}
|
||||
.help_img img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.help_img img {
|
||||
width: 100%; /* 让图片宽度填充父容器 */
|
||||
height: auto; /* 保持图片的宽高比 */
|
||||
object-fit: contain; /* 确保图片完全显示在容器内,不会被裁剪 */
|
||||
@media (max-width: 768px) {
|
||||
.main {
|
||||
width: 100%;
|
||||
min-height: 400px;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user