fix(admin/server/mp): 完成PC管理后台全模块31项闭环缺陷修复与三端回归验证

这个提交包含在:
xcbyy
2026-11-28 17:46:59 +08:00
父节点 61740b63c2
当前提交 0ec6d558d1
共有 66 个文件被更改,包括 11189 次插入 和 1876 次删除

查看文件

@@ -147,6 +147,7 @@
<view class="list-row btn-active" @click="contactService">
<image class="row-svg" :src="ICONS.headphones" mode="aspectFit" />
<text class="row-label">官方在线客服</text>
<text class="row-sub-tag" v-if="serviceWorkHoursText">{{ serviceWorkHoursText }}</text>
<image class="row-arrow-svg" :src="ICONS.chevronRight" mode="aspectFit" />
</view>
<view class="list-row btn-active" @click="openCoupons">
@@ -328,7 +329,8 @@ import {
setExpertCertStatus,
CERT_STATUS,
isUserLoggedIn,
clearSessionAndRole
clearSessionAndRole,
consumePendingTabQuery
} from '@/common/role.js';
import { DEFAULT_AVATAR_URL, resolveAvatarUrl, isLocalTempUrl } from '@/common/request.js';
import { getNavBarInfo } from '@/common/nav.js';
@@ -453,7 +455,8 @@ const platformConfigs = ref({
hotline: '400-888-6666',
hotlineDesc: '7x24h 官方客服服务热线',
wechat: 'peiwan_vip_kefu',
wechatDesc: '官方 VIP 客服微信号'
wechatDesc: '官方 VIP 客服微信号',
workHours: '周一至周日 00:00 - 24:00'
},
safety_notice: {
title: '平台官方公告与指引',
@@ -469,6 +472,11 @@ const platformConfigs = ref({
}
});
const serviceWorkHoursText = computed(() => {
const cs = platformConfigs.value.customer_service || {};
return String(cs.workHours || '').trim();
});
const loadPlatformConfigs = async () => {
try {
const res = await getPlatformConfigs();
@@ -641,6 +649,30 @@ const onAvatarError = () => {
user.value.avatar = DEFAULT_AVATAR_URL;
};
const applyUserTabQuery = (query) => {
if (!query || typeof query !== 'object') return;
const rawInvite = query.inviter_id || query.inviterId || query.code;
if (rawInvite) {
try {
uni.setStorageSync('PENDING_INVITER_CODE', String(rawInvite));
} catch (_) {}
}
const action = String(query.action || '').trim().toLowerCase();
if (action === 'contact') {
setTimeout(() => contactService(), 150);
} else if (action === 'settings') {
setTimeout(() => openSettingsModal(), 150);
} else if (action === 'edit') {
setTimeout(() => editProfile(), 150);
}
};
const onUserTabQueryChange = (payload) => {
if (payload && payload.path === '/pages/user/index' && payload.query) {
applyUserTabQuery(payload.query);
}
};
onMounted(() => {
navInfo.value = getNavBarInfo();
currentRole.value = getCurrentRole();
@@ -652,6 +684,7 @@ onMounted(() => {
uni.$on('user-logout', onUserLogout);
uni.$on('privacy-settings-change', onPrivacySettingsChange);
uni.$on('notice-subscribe-change', onNoticeSubscribeChange);
uni.$on('tab-query-change', onUserTabQueryChange);
// 预加载订阅消息模板ID,确保点击授权时无需等待网络(保留点击手势)
preloadSubscribeTemplates();
});
@@ -664,6 +697,10 @@ onShow(() => {
uni.hideTabBar({ animation: false, fail: () => {} });
privacyHidePhone.value = uni.getStorageSync('privacy_hide_phone') === '1';
noticeSubscribe.value = uni.getStorageSync('notice_subscribe') !== '0';
const pendingQuery = consumePendingTabQuery('/pages/user/index');
if (pendingQuery) {
applyUserTabQuery(pendingQuery);
}
loadPlatformConfigs();
if (isUserLoggedIn()) {
loadUserProfile();
@@ -684,6 +721,7 @@ onUnmounted(() => {
uni.$off('user-logout', onUserLogout);
uni.$off('privacy-settings-change', onPrivacySettingsChange);
uni.$off('notice-subscribe-change', onNoticeSubscribeChange);
uni.$off('tab-query-change', onUserTabQueryChange);
});
const switchThemeTo = (targetKey) => {
@@ -1033,14 +1071,18 @@ const applyExpert = () => {
const contactService = () => {
const cs = platformConfigs.value.customer_service || {};
const hotline = cs.hotline || '400-888-6666';
const wechat = cs.wechat || 'peiwan_vip_kefu';
const cleanPhone = String(hotline).replace(/[^0-9+]/g, '');
const hotline = String(cs.hotline || '400-888-6666').trim();
const hotlineDesc = String(cs.hotlineDesc || '7x24h 官方客服服务热线').trim();
const wechat = String(cs.wechat || 'peiwan_vip_kefu').trim();
const wechatDesc = String(cs.wechatDesc || '官方 VIP 客服微信号').trim();
const workHours = String(cs.workHours || '周一至周日 00:00 - 24:00').trim();
const cleanPhone = hotline.replace(/[^0-9+]/g, '');
uni.showActionSheet({
itemList: [
`拨打官方服务热线 (${hotline})`,
`复制平台 VIP 客服微信号 (${wechat})`,
`拨打${hotlineDesc} (${hotline})`,
`复制${wechatDesc} (${wechat})`,
`客服服务时间 (${workHours})`,
'查看平台官方安全指引'
],
success: (res) => {
@@ -1048,16 +1090,24 @@ const contactService = () => {
uni.makePhoneCall({
phoneNumber: cleanPhone,
fail: () => {
uni.showToast({ title: `服务热线: ${hotline}`, icon: 'none' });
uni.showToast({ title: `${hotlineDesc}: ${hotline}`, icon: 'none' });
}
});
} else if (res.tapIndex === 1) {
uni.setClipboardData({
data: wechat,
success: () => {
uni.showToast({ title: '官方客服微信号已复制', icon: 'success' });
uni.showToast({ title: `${wechatDesc}已复制`, icon: 'success' });
}
});
} else if (res.tapIndex === 2) {
uni.showModal({
title: '官方客服服务信息',
content: `${hotlineDesc}:${hotline}\n${wechatDesc}:${wechat}\n服务时间:${workHours}`,
showCancel: false,
confirmText: '我知道了',
confirmColor: '#6366F1'
});
} else {
openNotice();
}
@@ -1162,9 +1212,11 @@ const openAbout = () => {
url: '/pages/common/protocol?type=service',
fail: () => {
const proto = platformConfigs.value.platform_protocol || {};
const summary = String(proto.summary || '').trim();
const body = proto.userAgreementContent || '平台遵循合法合规与安全原则,所有同城活动履约均须在公开透明街区展开。';
uni.showModal({
title: proto.userAgreementTitle || '用户服务协议',
content: proto.userAgreementContent || '平台遵循合法合规与安全原则,所有同城活动履约均须在公开透明街区展开。',
content: summary ? `【协议要点摘要】\n${summary}\n\n${body}` : body,
showCancel: false
});
}