修复+优化
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",
|
url: "https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/4b558456-2e38-4185-8713-d1f0e6645820.png",
|
||||||
path: "/pages/artisan/profile",
|
path: "/pages/artisan/profile",
|
||||||
go_id_type: 1,
|
go_id_type: 1,
|
||||||
|
directAccess: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "财务管理",
|
title: "财务管理",
|
||||||
url: "https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/edafae37-8258-4e1c-9dcc-019484117047.png",
|
url: "https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/edafae37-8258-4e1c-9dcc-019484117047.png",
|
||||||
path: "/pages/wallet/wallet",
|
path: "/pages/wallet/wallet",
|
||||||
go_id_type: 1,
|
go_id_type: 1,
|
||||||
|
directAccess: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
@ -834,27 +836,21 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async handleFunction(item) {
|
async handleFunction(item) {
|
||||||
// 如果是退出登录,直接处理,不检查账号状态
|
// 1. 账号停用检查
|
||||||
if (this.isLogin && item.type === "setting") {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: `/pages/settings/index`,
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 检查账号状态,如果不允许访问,直接返回
|
|
||||||
if (!this.checkAccess(item)) {
|
if (!this.checkAccess(item)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 未登录直接跳转登录
|
// 2. 未登录 → 提示
|
||||||
if (!this.isLogin) {
|
if (!this.isLogin) {
|
||||||
uni.navigateTo({
|
uni.showToast({
|
||||||
url: '/pages/blogPopup/blogPopup'
|
title: `您暂未登录,无法使用${item.title || item.text || ''}!`,
|
||||||
|
icon: "none",
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 3. 入驻页面特殊处理
|
||||||
if (item.path == "/pages/ruzhu/ruzhu") {
|
if (item.path == "/pages/ruzhu/ruzhu") {
|
||||||
request.post("/sj/userSjAuth/details", {
|
request.post("/sj/userSjAuth/details", {
|
||||||
type: 1
|
type: 1
|
||||||
|
|
@ -869,29 +865,47 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
// 4. 需要入驻身份的模块 (go_id_type == 1)
|
||||||
}
|
if (item.go_id_type == 1) {
|
||||||
if (item.type) {
|
// 4a. 未入驻 → 提示
|
||||||
uni.navigateTo({
|
if (!this.isSettled) {
|
||||||
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) {
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: `您暂未登录,无法使用${item.title}!`,
|
title: `您暂未入驻,无法使用${item.title || item.text || ''}!`,
|
||||||
icon: "none",
|
icon: "none",
|
||||||
});
|
});
|
||||||
return;
|
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() {
|
goToProfile() {
|
||||||
// 添加访问检查
|
// 添加访问检查
|
||||||
|
|
|
||||||
|
|
@ -582,13 +582,13 @@ export default {
|
||||||
/* #endif */
|
/* #endif */
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
background: #fafafa;
|
background: white;
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-tabs {
|
.status-tabs {
|
||||||
height: 94rpx;
|
height: 94rpx;
|
||||||
background-color: #fafafa;
|
background-color: white;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -624,7 +624,7 @@ export default {
|
||||||
|
|
||||||
.status-tabs2 {
|
.status-tabs2 {
|
||||||
height: 56rpx;
|
height: 56rpx;
|
||||||
background-color: #fafafa;
|
background-color: white;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
padding-bottom: 30rpx;
|
padding-bottom: 30rpx;
|
||||||
padding-top: 10rpx;
|
padding-top: 10rpx;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue