update: 修改经营分类新接口数据结构联调

This commit is contained in:
mixtan 2025-06-16 21:34:21 +08:00
parent 3f9b13020a
commit eace8e317d
3 changed files with 46 additions and 37 deletions

View File

@ -54,7 +54,7 @@ export function GetSmsCode(params){
export function GetStoreCategories() { export function GetStoreCategories() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
http({ http({
url: '/api/mobile/shop/store/biz-category/list', url: '/api/mobile/shop/shop-base-store-category/list',
method: 'post' method: 'post'
}).then(res => { }).then(res => {
resolve(res) resolve(res)
@ -68,17 +68,17 @@ export function GetStoreCategories() {
*/ */
export function transformStoreCategories(data) { export function transformStoreCategories(data) {
return data.map(item => ({ return data.map(item => ({
value: item.id, value: item.store_category_id,
label: item.category_name, label: item.store_category_name,
children: item.children ? [ children: item.children ? [
// 添加一个与一级目录同名的选项 // 添加一个与一级目录同名的选项
{ {
value: item.id, value: item.store_category_id,
label: `${item.category_name} 分割比率(${item.split_ratio}%)` label: `${item.store_category_name} 分割比例(${item.split_ratio}%)`
}, },
...item.children.map(child => ({ ...item.children.map(child => ({
value: child.id, value: child.store_category_id,
label: `${child.category_name} 分割比率(${child.split_ratio}%)` label: `${child.store_category_name} 分割比例(${child.split_ratio}%)`
})) }))
] : [] ] : []
})); }));

View File

@ -16,7 +16,7 @@
</router-link> </router-link>
</ul> </ul>
<div class="header-right"> <div class="header_right">
<div class="start"> <div class="start">
<el-button plain type="danger" @click="handleOpenStartPage"> <el-button plain type="danger" @click="handleOpenStartPage">
{{ {{
@ -101,7 +101,7 @@ const userStore = useUserStore();
// userStore // userStore
const isLoggedIn = ref(userStore.isLoggedIn); const isLoggedIn = ref(userStore.isLoggedIn);
const mobile = ref(""); const mobile = ref("");
const approval_status = ref(""); const approval_status = ref(0);
// token // token
onMounted(() => { onMounted(() => {
@ -144,7 +144,7 @@ const handleOpenStartPage = () => {
return; return;
} }
if (approval_status == 4) { if (approval_status.value == 4) {
router.push({ name: "start" }); router.push({ name: "start" });
} else { } else {
router.push({ name: "check" }); // check router.push({ name: "check" }); // check
@ -152,7 +152,7 @@ const handleOpenStartPage = () => {
}; };
const handleUserInfoClick = () => { const handleUserInfoClick = () => {
if (approval_status == 4) { if (approval_status.value == 4) {
router.push({ name: "start" }); router.push({ name: "start" });
} else { } else {
router.push({ name: "check" }); router.push({ name: "check" });
@ -288,7 +288,7 @@ onUnmounted(() => {
} }
.header-right { .header_right {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;
@ -301,21 +301,30 @@ onUnmounted(() => {
} }
@media (max-width: 768px) { @media (max-width: 768px) {
.header {
padding: 0 10px;
}
.header-menu {
display: none;
}
.hamburger-menu {
display: block;
}
.logo { .logo {
img { img {
height: 28px; height: 28px;
} }
} }
.header {
padding: 0 10px;
}
.header_right {
gap: 5px;
}
.header-menu {
display: none;
}
.start {
display: none;
}
.sub_menu {
display: block;
}
} }
</style> </style>

View File

@ -1,13 +1,9 @@
<template> <template>
<div class="help_container"> <div class="help_container">
<div class="main"> <div class="main">
<el-row> <div class="help_img">
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
<div class="help_img">
<img src="../../assets/image/help/help_temp.png"> <img src="../../assets/image/help/help_temp.png">
</div> </div>
</el-col>
</el-row>
</div> </div>
</div> </div>
</template> </template>
@ -15,14 +11,15 @@
<script lang="ts" setup> <script lang="ts" setup>
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.help_container { .help_container {
width: 100%; width: 100%;
min-height: calc(100vh - 70px - 150px); min-height: calc(100vh - 70px - 150px);
background: #eee; background: #eee;
padding: 20px; padding: 20px;
}
.main { .main {
width: 1200px; width: 1200px;
margin:0 auto; margin:0 auto;
background: #fff; background: #fff;
@ -34,14 +31,17 @@
justify-content: center; justify-content: center;
} }
.el-row{ .help_img img {
width: 100%; width: 100%;
} height: auto;
object-fit: contain;
} }
.help_img img { @media (max-width: 768px) {
width: 100%; /* 让图片宽度填充父容器 */ .main {
height: auto; /* 保持图片的宽高比 */ width: 100%;
object-fit: contain; /* 确保图片完全显示在容器内,不会被裁剪 */ min-height: 400px;
}
} }
</style> </style>