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 次删除

查看文件

@@ -285,7 +285,7 @@ import { getCurrentThemeKey, applyThemeToNativeUI } from '@/common/theme.js';
import { ensureLoginOrRedirect } from '@/common/role.js';
const currentThemeKey = ref(getCurrentThemeKey());
const currentUserId = ref(Number(uni.getStorageSync('userId') || 1001));
const currentUserId = ref(normalizeUserId());
const currentUserName = ref((uni.getStorageSync('userInfo') && uni.getStorageSync('userInfo').nickname) || '同城用户');
const userBalance = ref('0.00');
const payMethod = ref('WECHAT'); // 'WECHAT' | 'BALANCE'
@@ -324,7 +324,7 @@ const stopPropagation = (e) => {
const loadUserWallet = async () => {
try {
const uid = Number(uni.getStorageSync('userId') || 1001);
const uid = normalizeUserId();
currentUserId.value = uid;
const cachedInfo = uni.getStorageSync('userInfo');
if (cachedInfo && cachedInfo.nickname) {
@@ -567,6 +567,10 @@ const handlePay = async () => {
uni.showToast({ title: '该大神暂未配置服务包,无法下单', icon: 'none' });
return;
}
if (isOffline.value && !String(meetVenue.value || '').trim()) {
uni.showToast({ title: '请填写或选择碰面地点', icon: 'none' });
return;
}
// 平台派单校验:品类预算与碰面地点
if (isPlatformMode.value) {
if (!(Number(platformBudget.value) > 0)) {

查看文件

@@ -86,14 +86,19 @@
<button class="action-btn primary-btn btn-active" :disabled="getOrderCountdown(order) === '已超时'" @click="payOrder(order.id)">立即付款</button>
</template>
<template v-else-if="order.status === 'PENDING_ACCEPT'">
<button class="action-btn cancel-btn btn-active" @click="cancelOrder(order.id)">取消订单</button>
<button class="action-btn chat-btn btn-active" @click="contactExpert(order)">联系客服</button>
</template>
<template v-else-if="order.status === 'IN_SERVICE'">
<button class="action-btn chat-btn btn-active" @click="contactExpert(order)">联系大神</button>
<button class="action-btn chat-btn btn-active" @click="contactExpert(order)">联系客服</button>
<button class="action-btn refund-btn btn-active" @click="openRefundModal(order)">申请退款</button>
<button class="action-btn success-btn btn-active" @click="confirmComplete(order.id)">确认验收</button>
</template>
<template v-else-if="order.status === 'COMPLETED'">
<button class="action-btn chat-btn btn-active" @click="reBook(order.expert ? order.expert.id : (order.expertId || 101))">再次预约</button>
<button class="action-btn chat-btn btn-active" @click="reBook(order.expert ? order.expert.id : (order.expertId || 0))">再次预约</button>
<button class="action-btn rate-btn btn-active" :class="{ 'rated-btn': order.isReviewed }" @click="openReviewModal(order)">
{{ order.isReviewed ? '已评价' : '评价大神' }}
</button>
@@ -450,6 +455,7 @@ onUnmounted(() => {
const tabs = [
{ key: 'ALL', name: '全部' },
{ key: 'IN_SERVICE', name: '进行中' },
{ key: 'PENDING_ACCEPT', name: '待接单' },
{ key: 'PENDING_PAY', name: '待付款' },
{ key: 'COMPLETED', name: '已完成' },
{ key: 'REFUNDING', name: '退款/售后' },
@@ -480,6 +486,7 @@ const getStatusText = (status, order) => {
if (order && order.rawStatus === '待确认') return '待确认验收';
const map = {
PENDING_PAY: '待付款',
PENDING_ACCEPT: '等待大神接单',
IN_SERVICE: '服务中',
COMPLETED: '已完成',
REFUNDING: '售后处理中',
@@ -515,7 +522,7 @@ const payOrder = async (id) => {
const o = orders.value.find(item => item.id === id);
const amount = o ? Number(o.totalAmount || o.amount || 0) : 0;
const title = o ? (o.gameName || o.skillName || '陪玩订单支付') : '陪玩订单支付';
const uid = Number(uni.getStorageSync('userId') || 1001);
const uid = normalizeUserId();
uni.showLoading({ title: '正在拉起微信支付...' });
try {
@@ -791,8 +798,13 @@ const confirmComplete = (id) => {
};
const reBook = (expertId) => {
const id = Number(expertId) || 0;
if (!id) {
uni.showToast({ title: '该订单未绑定大神,请前往发现大厅', icon: 'none' });
return;
}
uni.navigateTo({
url: `/pages/expert/detail?id=${expertId}`
url: `/pages/expert/detail?id=${id}`
});
};
@@ -803,7 +815,7 @@ const submittingReview = ref(false);
const presetTags = ['技术过硬', '声音甜美', '准时守约', '态度温柔', '带飞吃鸡', '幽默风趣'];
const reviewForm = ref({
rating: 5,
selectedTags: ['技术过硬', '准时守约'],
selectedTags: [],
content: ''
});
@@ -1059,6 +1071,10 @@ const submitReview = async () => {
background: rgba(245, 158, 11, 0.15);
color: #F59E0B;
}
&.PENDING_ACCEPT {
background: rgba(99, 102, 241, 0.16);
color: #818CF8;
}
&.IN_SERVICE {
background: rgba(16, 185, 129, 0.15);
color: #10B981;