diff --git a/pages/fighter-orders/fighter-orders.js b/pages/fighter-orders/fighter-orders.js
index 49a6279..fba3e26 100644
--- a/pages/fighter-orders/fighter-orders.js
+++ b/pages/fighter-orders/fighter-orders.js
@@ -3,6 +3,7 @@ import { createPage, request } from '../../utils/base-page.js';
import { reconnectForRole } from '../../utils/role-tab-bar.js';
import { getOrderStatusText } from '../../utils/api-helper.js';
import { attachAutoSettleFields } from '../../utils/auto-settle-display.js';
+import { isFighterOnly, canEnterAcceptOrder, getLoginPageUrl } from '../../utils/fighter-only.js';
Page(createPage({
data: {
@@ -52,6 +53,10 @@ Page(createPage({
},
onLoad() {
+ if (isFighterOnly() && !canEnterAcceptOrder()) {
+ wx.reLaunch({ url: getLoginPageUrl() });
+ return;
+ }
wx.setNavigationBarTitle({ title: '我的接单' });
this.loadShangpinLeixing().then(() => {
if (this.data.xuanzhongLeixingId) {
@@ -65,6 +70,10 @@ Page(createPage({
},
onShow() {
+ if (isFighterOnly() && !canEnterAcceptOrder()) {
+ wx.reLaunch({ url: getLoginPageUrl() });
+ return;
+ }
this.registerNotificationComponent();
this.loadDealStat();
const app = getApp();
diff --git a/pages/fighter/fighter.js b/pages/fighter/fighter.js
index 268eed6..55e8782 100644
--- a/pages/fighter/fighter.js
+++ b/pages/fighter/fighter.js
@@ -240,6 +240,18 @@ Page(createPage({
},
async onShow() {
+ this.checkRoleStatuses();
+ const needLogin = isFighterOnly() && !isDashouCertified()
+ && !isRoleStatusActive(wx.getStorageSync('guanshistatus'))
+ && !isRoleStatusActive(wx.getStorageSync('zuzhangstatus'))
+ && !isRoleStatusActive(wx.getStorageSync('kaoheguanstatus'));
+ if (needLogin) {
+ // 登录页:强制隐藏底部导航,杜绝 Tab 露出来
+ try { wx.hideTabBar({ animation: false }); } catch (e) {}
+ } else {
+ try { wx.showTabBar({ animation: false }); } catch (e) {}
+ }
+
if (!app.globalData._dashouPhoneChecked) {
const phoneOk = await ensurePhoneAuth({ redirect: true, role: 'dashou' });
if (!phoneOk) return;
@@ -376,12 +388,17 @@ Page(createPage({
push('goToKefu', '在线客服', img.iconKefu);
push('goToComplaintCreate', '投诉反馈', img.iconComplaint || img.iconContact);
push('goToComplaintList', '投诉记录', img.iconComplaint || img.iconRecord);
- // 仅真实商家老板显示;客服工作台仅真实客服显示(互斥)
- // 注意:后端曾错误把 shangjiastatus 恒置 1,前端这里再严格校验一次
+ // 商家老板:仅有商家身份才显示进入商家端
if (isShangjiaCertified()) {
push('onTapShangjiaAuth', '进入商家端', img.iconShangjia);
- } else if (isStaffMode()) {
- push('onTapStaffAuth', '商家客服工作台', img.iconKefu || img.iconShangjia);
+ }
+ // 商家客服:有身份进工作台,没有则显示入驻
+ if (!isShangjiaCertified()) {
+ push(
+ 'onTapStaffAuth',
+ isStaffMode() ? '商家客服工作台' : '入驻商家客服',
+ img.iconKefu || img.iconShangjia
+ );
}
if (d.showPindaoEntry) {
push('openPindaoModal', '频道', img.iconPindao);
@@ -1320,7 +1337,7 @@ Page(createPage({
if (isStaffMode()) {
enterLockedRole('shangjia', getApp());
} else {
- wx.showToast({ title: '未入驻商家客服', icon: 'none' });
+ wx.navigateTo({ url: '/pages/staff-join/staff-join' });
}
return;
}
diff --git a/pages/fighter/fighter.wxml b/pages/fighter/fighter.wxml
index 0f0481f..f6d9afb 100644
--- a/pages/fighter/fighter.wxml
+++ b/pages/fighter/fighter.wxml
@@ -31,8 +31,6 @@
清除缓存
-
-
diff --git a/pages/team-hall/team-hall.js b/pages/team-hall/team-hall.js
index e9d7230..fcb2f9b 100644
--- a/pages/team-hall/team-hall.js
+++ b/pages/team-hall/team-hall.js
@@ -2,6 +2,7 @@
const app = getApp();
import request from '../../utils/request.js';
import { attachAutoSettleFields } from '../../utils/auto-settle-display.js';
+import { isFighterOnly, canEnterAcceptOrder, getLoginPageUrl } from '../../utils/fighter-only.js';
Page({
data: {
@@ -27,11 +28,19 @@ Page({
},
onLoad() {
+ if (isFighterOnly() && !canEnterAcceptOrder()) {
+ wx.reLaunch({ url: getLoginPageUrl() });
+ return;
+ }
this.setData({ ossImageUrl: app.globalData.ossImageUrl || '' });
this.loadShangpinLeixing(true);
},
onShow() {
+ if (isFighterOnly() && !canEnterAcceptOrder()) {
+ wx.reLaunch({ url: getLoginPageUrl() });
+ return;
+ }
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().refresh && this.getTabBar().refresh();
}