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,8 @@ import {
applyPostParty,
getPostApplies,
handlePostApply,
getUserProfile
getUserProfile,
normalizeUserId
} from '@/common/api.js';
const DEFAULT_USER_AVATAR = 'https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=120';
@@ -199,7 +200,7 @@ const currentUserProfile = ref({});
const readCachedUserInfo = () => {
const pwInfo = uni.getStorageSync('PW_USER_INFO') || {};
const uInfo = uni.getStorageSync('userInfo') || {};
const uid = Number(uni.getStorageSync('userId')) || Number(pwInfo.id) || Number(uInfo.id) || 1001;
const uid = normalizeUserId();
const rawName = pwInfo.nickname || uInfo.nickname || '';
const nickname = (rawName && !['点击登录 / 注册', '电竞玩家 (我)'].includes(rawName)) ? rawName : '';
const avatar = pwInfo.avatar || uInfo.avatar || '';
@@ -239,7 +240,7 @@ const normalizeCommentItem = (item) => {
if (!item) return item;
const cur = currentUserProfile.value.nickname ? currentUserProfile.value : readCachedUserInfo();
const isMyComment =
(item.userId && Number(item.userId) === Number(cur.id || 1001)) ||
(item.userId && Number(item.userId) === Number(cur.id || 0)) ||
item.author === '电竞玩家 (我)';
return {
...item,
@@ -275,7 +276,7 @@ const getPostCategoryName = (catKey) => {
const isPostOwner = (target) => {
const cur = currentUserProfile.value.nickname ? currentUserProfile.value : readCachedUserInfo();
return target && (
Number(target.userId) === Number(cur.id || 1001) ||
Number(target.userId) === Number(cur.id || 0) ||
target.author === '电竞玩家 (我)' ||
(cur.nickname && target.author === cur.nickname) ||
target.isMine === true
@@ -466,7 +467,7 @@ const sendComment = async () => {
const profile = currentUserProfile.value.nickname
? currentUserProfile.value
: await syncCurrentUserProfile();
const uid = Number(profile.id || uni.getStorageSync('userId')) || 1001;
const uid = normalizeUserId();
const authorName = profile.nickname || '同城用户';
const authorAvatar = profile.avatar || DEFAULT_USER_AVATAR;
@@ -522,7 +523,7 @@ const handleJoinParty = () => {
const profile = currentUserProfile.value.nickname
? currentUserProfile.value
: await syncCurrentUserProfile();
const uid = Number(profile.id || uni.getStorageSync('userId')) || 1001;
const uid = normalizeUserId();
const applicantName = profile.nickname || '同城用户';
const applicantAvatar = profile.avatar || DEFAULT_USER_AVATAR;
try {

查看文件

@@ -414,7 +414,7 @@ const currentUserProfile = ref({});
const readCachedUserInfo = () => {
const pwInfo = uni.getStorageSync('PW_USER_INFO') || {};
const uInfo = uni.getStorageSync('userInfo') || {};
const uid = Number(uni.getStorageSync('userId')) || Number(pwInfo.id) || Number(uInfo.id) || 1001;
const uid = normalizeUserId();
const rawName = pwInfo.nickname || uInfo.nickname || '';
const nickname = (rawName && !['点击登录 / 注册', '电竞玩家 (我)'].includes(rawName)) ? rawName : '';
const avatar = pwInfo.avatar || uInfo.avatar || '';
@@ -788,7 +788,7 @@ const sendComment = async () => {
const profile = currentUserProfile.value.nickname
? currentUserProfile.value
: await syncCurrentUserProfile();
const uid = Number(profile.id || uni.getStorageSync('userId')) || 1001;
const uid = normalizeUserId();
const authorName = profile.nickname || '同城用户';
const authorAvatar = profile.avatar || DEFAULT_USER_AVATAR;
@@ -824,7 +824,7 @@ const sendComment = async () => {
const isPostOwner = (post) => {
const cur = currentUserProfile.value.nickname ? currentUserProfile.value : readCachedUserInfo();
return post && (
Number(post.userId) === Number(cur.id || 1001) ||
Number(post.userId) === Number(cur.id || 0) ||
post.author === '电竞玩家 (我)' ||
(cur.nickname && post.author === cur.nickname) ||
post.isMine === true
@@ -932,7 +932,7 @@ const handleJoinParty = (post) => {
const profile = currentUserProfile.value.nickname
? currentUserProfile.value
: await syncCurrentUserProfile();
const uid = Number(profile.id || uni.getStorageSync('userId')) || 1001;
const uid = normalizeUserId();
const applicantName = profile.nickname || '同城用户';
const applicantAvatar = profile.avatar || DEFAULT_USER_AVATAR;
try {