fix(miniapp): 清理剩余身份兜底并修正待接单状态/客服入口

- 修复 user/index 使用 normalizeUserId 未导入(分享按钮会报错)

- 待接单独立为 PENDING_ACCEPT:新增待接单 tab/状态色/取消订单与联系客服操作,不再显示为进行中

- 移除 hall/bill-records/reports/settings/favorites/order-create/activity-create/activity-detail/apply 的 1001/2006 身份兜底

- 线下订单(含指定大神)必须填写碰面地点;再次预约不再兜底到 101 号大神;评价不预选标签

- 接单大厅去掉「已实名认证/信誉积分100」等伪造信任文案;客服按钮统一为「联系客服」

- 114 套件/745 用例全绿
这个提交包含在:
xcbyy
2026-10-22 09:25:27 +08:00
父节点 be1c7be5d3
当前提交 d941a16d28
共有 16 个文件被更改,包括 99 次插入 和 46 次删除

查看文件

@@ -182,7 +182,7 @@ import { onShow } from '@dcloudio/uni-app';
import { ICONS } from '@/common/icons.js';
import { getCurrentThemeKey, applyThemeToNativeUI } from '@/common/theme.js';
import { getNavBarInfo } from '@/common/nav.js';
import { getUserFinanceRecords, getUserProfile } from '@/common/api.js';
import { getUserFinanceRecords, getUserProfile, normalizeUserId } from '@/common/api.js';
const currentThemeKey = ref(getCurrentThemeKey());
const navInfo = ref(getNavBarInfo());
@@ -313,7 +313,7 @@ const getTypeIconClass = (type = '') => {
};
const loadFinanceData = async () => {
const uid = uni.getStorageSync('userId') || 2006;
const uid = normalizeUserId();
try {
const [profile, list] = await Promise.all([
getUserProfile(uid).catch(() => null),

查看文件

@@ -123,7 +123,7 @@ import { onShow } from '@dcloudio/uni-app';
import { ICONS } from '@/common/icons.js';
import { getCurrentThemeKey, applyThemeToNativeUI } from '@/common/theme.js';
import { getNavBarInfo } from '@/common/nav.js';
import { getFavorites, removeFavorite } from '@/common/api.js';
import { getFavorites, removeFavorite, normalizeUserId } from '@/common/api.js';
const currentThemeKey = ref(getCurrentThemeKey());
const navInfo = ref(getNavBarInfo());
@@ -154,7 +154,7 @@ const loadFavoritesList = async (showLoadingTip = false) => {
isLoading.value = true;
}
try {
const userId = uni.getStorageSync('userId') || 1001;
const userId = normalizeUserId();
const list = await getFavorites(userId);
allFavorites.value = Array.isArray(list) ? list : [];
} catch (err) {
@@ -205,7 +205,7 @@ const handleCancelFavorite = (item) => {
if (res.confirm) {
try {
uni.showLoading({ title: '正在移除...' });
const userId = uni.getStorageSync('userId') || 1001;
const userId = normalizeUserId();
await removeFavorite(item.id, userId);
allFavorites.value = allFavorites.value.filter(fav => fav.id !== item.id);
uni.hideLoading();

查看文件

@@ -363,7 +363,7 @@ import { ICONS } from '@/common/icons.js';
import { getCurrentThemeKey, setTheme, THEME_KEYS, applyThemeToNativeUI } from '@/common/theme.js';
import { getCurrentRole, setCurrentRole, ROLE_TYPES, toggleRole as toggleUserRole, isExpertCertified, getExpertCertStatus, setExpertCertStatus, CERT_STATUS } from '@/common/role.js';
import { getNavBarInfo } from '@/common/nav.js';
import { getUserProfile, rechargeBalance, withdrawCommission, getUserFinanceRecords, updateUserProfile, uploadImage, getRechargeTiers, getPlatformConfigs, applyExpertCert, getUserWithdrawals, getFavorites, removeFavorite, getDistributionTeam, getDistributionRecords, getMyReports, bindInviteCode, getNotifications, getMyCoupons } from '@/common/api.js';
import { getUserProfile, rechargeBalance, withdrawCommission, getUserFinanceRecords, updateUserProfile, uploadImage, getRechargeTiers, getPlatformConfigs, applyExpertCert, getUserWithdrawals, getFavorites, removeFavorite, getDistributionTeam, getDistributionRecords, getMyReports, bindInviteCode, getNotifications, getMyCoupons, normalizeUserId } from '@/common/api.js';
import { preloadSubscribeTemplates, requestSubscribeAll } from '@/common/subscribe.js';
const DEFAULT_GUEST_AVATAR = 'https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=200';
@@ -903,7 +903,7 @@ const saveProfile = async () => {
}
uni.showLoading({ title: '正在保存资料...' });
try {
const updated = await updateUserProfile(user.value.id || 1001, {
const updated = await updateUserProfile(normalizeUserId(), {
nickname: finalNickname,
avatar: editForm.value.avatar,
phone: finalPhone,
@@ -1093,7 +1093,7 @@ const showInvitePoster = () => {
};
const loadDistributionData = async () => {
const uid = user.value.id || 1001;
const uid = normalizeUserId();
try {
const [teamData, records] = await Promise.all([
getDistributionTeam(uid),
@@ -1105,7 +1105,7 @@ const loadDistributionData = async () => {
};
const copyInviteCode = () => {
const code = `PW${user.value.id || 1001}`;
const code = `PW${normalizeUserId()}`;
uni.setClipboardData({
data: code,
success: () => {
@@ -1115,7 +1115,7 @@ const copyInviteCode = () => {
};
const copyInviteLink = () => {
const link = `https://peiww.gynhc.com/invite?code=PW${user.value.id || 1001}`;
const link = `https://peiww.gynhc.com/invite?code=PW${normalizeUserId()}`;
uni.setClipboardData({
data: link,
success: () => {
@@ -1153,7 +1153,7 @@ const submitDistWithdraw = async () => {
submittingDistWithdraw.value = true;
uni.showLoading({ title: '正在提交申请...' });
try {
await withdrawCommission(user.value.id || 1001, amount, { channel: 'WECHAT' });
await withdrawCommission(normalizeUserId(), amount, { channel: 'WECHAT' });
user.value.commission = (currentComm - amount).toFixed(2);
distWithdrawAmount.value = '';
uni.hideLoading();

查看文件

@@ -183,7 +183,7 @@ import { onShow } from '@dcloudio/uni-app';
import { ICONS } from '@/common/icons.js';
import { getCurrentThemeKey, applyThemeToNativeUI } from '@/common/theme.js';
import { getNavBarInfo } from '@/common/nav.js';
import { getMyReports, getPlatformConfigs } from '@/common/api.js';
import { getMyReports, getPlatformConfigs, normalizeUserId } from '@/common/api.js';
const currentThemeKey = ref(getCurrentThemeKey());
const navInfo = ref(getNavBarInfo());
@@ -323,7 +323,7 @@ const handleBack = () => {
};
const loadReportsData = async () => {
const uid = uni.getStorageSync('userId') || 1001;
const uid = normalizeUserId();
try {
const list = await getMyReports(uid);
allReports.value = Array.isArray(list) ? list : [];

查看文件

@@ -186,7 +186,7 @@ import { onShow } from '@dcloudio/uni-app';
import { ICONS } from '@/common/icons.js';
import { getCurrentThemeKey, applyThemeToNativeUI } from '@/common/theme.js';
import { getNavBarInfo } from '@/common/nav.js';
import { getUserSettings, updateUserSettings, getSubscribeTemplates } from '@/common/api.js';
import { getUserSettings, updateUserSettings, getSubscribeTemplates, normalizeUserId } from '@/common/api.js';
const currentThemeKey = ref(getCurrentThemeKey());
const navInfo = ref(getNavBarInfo());
@@ -212,7 +212,7 @@ const checkIsLoggedIn = () => {
};
const currentUserId = computed(() => {
return Number(uni.getStorageSync('userId') || 1001);
return normalizeUserId();
});
// 本地与云端同步设置状态