update: 修改经营分类新接口数据结构联调
This commit is contained in:
parent
3f9b13020a
commit
eace8e317d
@ -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}%)`
|
||||||
}))
|
}))
|
||||||
] : []
|
] : []
|
||||||
}));
|
}));
|
||||||
|
|||||||
@ -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>
|
||||||
|
|||||||
@ -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>
|
||||||
Loading…
Reference in New Issue
Block a user