refactor(data): 全面移除小程序写死的演示/兜底数据,测试数据统一落库
- 删除无引用的 common/mock.js;登录页与个人中心的演示账号改为 DB 配置 demo_accounts + /api/auth/demo-accounts、/api/auth/demo-login(签发真实 token) - 移除订单/活动/大神/动态/推广/工作台/门票/充值/举报等页面的演示列表与假兜底;新增真实空态 - 修复伪造成功:活动调价、评价回复、核销、海报保存、图片上传失败、提现/核销固定 1001、随机开黑房号、随机即时匹配、假语音播放等 - 服务端移除 101/2006 合成用户与合成大神兜底、移除默认服务包虚构价格;演示账号清单可在后台关闭 - 111 套件/733 用例全绿;已部署 20261021_162041,demo-accounts/demo-login 实测通过
这个提交包含在:
@@ -429,7 +429,7 @@ const loadCouponUsable = async () => {
|
||||
couponUsable.value = 0;
|
||||
}
|
||||
};
|
||||
const cacheSizeText = ref('1.25 MB');
|
||||
const cacheSizeText = ref('0 KB');
|
||||
|
||||
// 分销推广管理
|
||||
const showDistributionModal = ref(false);
|
||||
@@ -446,32 +446,7 @@ const distributionRecords = ref([]);
|
||||
const distWithdrawAmount = ref('');
|
||||
const submittingDistWithdraw = ref(false);
|
||||
|
||||
const DEMO_ACCOUNTS = [
|
||||
{
|
||||
id: 1001,
|
||||
nickname: '同城局长',
|
||||
roleTag: 'host',
|
||||
roleDesc: '房主/局长',
|
||||
desc: '余额充足 · 组局发单',
|
||||
avatar: 'https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=200'
|
||||
},
|
||||
{
|
||||
id: 2001,
|
||||
nickname: '超能电竞玩家',
|
||||
roleTag: 'buyer',
|
||||
roleDesc: '普通买家',
|
||||
desc: '搭子报名 · 预约下单',
|
||||
avatar: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=200'
|
||||
},
|
||||
{
|
||||
id: 2006,
|
||||
nickname: '苏苏学姐',
|
||||
roleTag: 'expert',
|
||||
roleDesc: '金牌陪伴师',
|
||||
desc: '接单工作台 · 4位核销',
|
||||
avatar: 'https://images.unsplash.com/photo-1524504388940-b1c1722653e1?w=200'
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
const user = ref({
|
||||
id: initialUserId || '',
|
||||
@@ -1075,7 +1050,7 @@ const updateCacheSize = () => {
|
||||
cacheSizeText.value = `${kb} KB`;
|
||||
}
|
||||
} catch (_) {
|
||||
cacheSizeText.value = '1.25 MB';
|
||||
cacheSizeText.value = '0 KB';
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1150,7 +1125,18 @@ const copyInviteLink = () => {
|
||||
};
|
||||
|
||||
const savePosterImage = () => {
|
||||
uni.showToast({ title: '海报已保存至相册', icon: 'success' });
|
||||
const uid = normalizeUserId();
|
||||
if (!uid) {
|
||||
uni.showToast({ title: '请先登录后再分享', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
const link = `https://peiww.gynhc.com/invite?code=PW${uid}`;
|
||||
uni.setClipboardData({
|
||||
data: link,
|
||||
success: () => {
|
||||
uni.showToast({ title: '邀请链接已复制,可粘贴到微信分享', icon: 'none', duration: 2200 });
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const submitDistWithdraw = async () => {
|
||||
|
||||
在新工单中引用
屏蔽一个用户