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() {
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}%)`
}))
] : []
}));

View File

@ -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>

View File

@ -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>