修复+优化
This commit is contained in:
parent
2fcfba42ea
commit
128ebf0124
|
|
@ -252,12 +252,14 @@ export default {
|
|||
url: "https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/4b558456-2e38-4185-8713-d1f0e6645820.png",
|
||||
path: "/pages/artisan/profile",
|
||||
go_id_type: 1,
|
||||
directAccess: true,
|
||||
},
|
||||
{
|
||||
title: "财务管理",
|
||||
url: "https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/edafae37-8258-4e1c-9dcc-019484117047.png",
|
||||
path: "/pages/wallet/wallet",
|
||||
go_id_type: 1,
|
||||
directAccess: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
@ -834,27 +836,21 @@ export default {
|
|||
});
|
||||
},
|
||||
async handleFunction(item) {
|
||||
// 如果是退出登录,直接处理,不检查账号状态
|
||||
if (this.isLogin && item.type === "setting") {
|
||||
uni.navigateTo({
|
||||
url: `/pages/settings/index`,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// 检查账号状态,如果不允许访问,直接返回
|
||||
// 1. 账号停用检查
|
||||
if (!this.checkAccess(item)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 未登录直接跳转登录
|
||||
// 2. 未登录 → 提示
|
||||
if (!this.isLogin) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/blogPopup/blogPopup'
|
||||
uni.showToast({
|
||||
title: `您暂未登录,无法使用${item.title || item.text || ''}!`,
|
||||
icon: "none",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// 3. 入驻页面特殊处理
|
||||
if (item.path == "/pages/ruzhu/ruzhu") {
|
||||
request.post("/sj/userSjAuth/details", {
|
||||
type: 1
|
||||
|
|
@ -869,29 +865,47 @@ export default {
|
|||
});
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
if (item.type) {
|
||||
uni.navigateTo({
|
||||
url: `${item.path}?type=${item.type}`,
|
||||
});
|
||||
} else {
|
||||
if (item.go_id_type == 1 && (!this.isCertified || !this.hasBusinessTime || !this.hasServiceSkill)) {
|
||||
this.showSetupModal = true;
|
||||
return;
|
||||
}
|
||||
if (!this.isLogin && item.go_id_type) {
|
||||
// 4. 需要入驻身份的模块 (go_id_type == 1)
|
||||
if (item.go_id_type == 1) {
|
||||
// 4a. 未入驻 → 提示
|
||||
if (!this.isSettled) {
|
||||
uni.showToast({
|
||||
title: `您暂未登录,无法使用${item.title}!`,
|
||||
title: `您暂未入驻,无法使用${item.title || item.text || ''}!`,
|
||||
icon: "none",
|
||||
});
|
||||
return;
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: `${item.path}`,
|
||||
});
|
||||
|
||||
// 4b. 直接进入的模块(店铺装修、财务管理)
|
||||
if (item.directAccess) {
|
||||
uni.navigateTo({ url: item.path });
|
||||
return;
|
||||
}
|
||||
|
||||
// 4c. 未认证或前置条件不完整 → 弹出温馨提示
|
||||
if (!this.isCertified || !this.hasBusinessTime || !this.hasServiceSkill) {
|
||||
this.showSetupModal = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// 4d. 前置条件完整 → 直接进入
|
||||
uni.navigateTo({ url: item.path });
|
||||
return;
|
||||
}
|
||||
|
||||
// 5. 有 type 参数的模块
|
||||
if (item.type) {
|
||||
uni.navigateTo({
|
||||
url: `${item.path}?type=${item.type}`,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// 6. 其他模块直接进入
|
||||
uni.navigateTo({ url: item.path });
|
||||
},
|
||||
goToProfile() {
|
||||
// 添加访问检查
|
||||
|
|
|
|||
|
|
@ -582,13 +582,13 @@ export default {
|
|||
/* #endif */
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: #fafafa;
|
||||
background: white;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.status-tabs {
|
||||
height: 94rpx;
|
||||
background-color: #fafafa;
|
||||
background-color: white;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
|
|
@ -624,7 +624,7 @@ export default {
|
|||
|
||||
.status-tabs2 {
|
||||
height: 56rpx;
|
||||
background-color: #fafafa;
|
||||
background-color: white;
|
||||
white-space: nowrap;
|
||||
padding-bottom: 30rpx;
|
||||
padding-top: 10rpx;
|
||||
|
|
|
|||
Loading…
Reference in New Issue