fix(home): 即时匹配改为真实在线大神实时匹配,优化弹窗按钮与暖色主题对比度
- 每次匹配重新拉取 /api/companions,只匹配 user_id>0(真实注册)、接单中、排除当前用户的大神 - 换一位优先避开上一位,解决长期固定命中种子大神(林深见鹿 userId=0)的问题 - 弹窗更名为「在线大神即时匹配」,按钮改为「换一位 / 查看资料并预约」,补充图标、尺寸与暖色主题对比 - 关闭弹窗取消未完成匹配;117 套件/765 用例全绿
这个提交包含在:
@@ -128,7 +128,7 @@ import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import { getActivityDetail, getMyActivities, leaveActivity, normalizeUserId } from '@/common/api.js';
|
||||
import { encodeCode128B } from '@/common/barcode.js';
|
||||
import { generateQRCodeMatrix } from '@/common/qrcode.js';
|
||||
import { getCurrentThemeKey } from '@/common/theme.js';
|
||||
import { getCurrentThemeKey, applyThemeToNativeUI } from '@/common/theme.js';
|
||||
|
||||
const currentThemeKey = ref(getCurrentThemeKey());
|
||||
|
||||
@@ -231,22 +231,34 @@ const loadTicketData = async (query = savedQuery) => {
|
||||
}
|
||||
};
|
||||
|
||||
const onThemeChanged = (key) => {
|
||||
currentThemeKey.value = key;
|
||||
applyThemeToNativeUI(key);
|
||||
};
|
||||
|
||||
onLoad(async (query) => {
|
||||
currentThemeKey.value = getCurrentThemeKey();
|
||||
applyThemeToNativeUI(currentThemeKey.value);
|
||||
savedQuery = query;
|
||||
await loadTicketData(query);
|
||||
});
|
||||
|
||||
onShow(async () => {
|
||||
currentThemeKey.value = getCurrentThemeKey();
|
||||
applyThemeToNativeUI(currentThemeKey.value);
|
||||
await loadTicketData();
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
currentThemeKey.value = getCurrentThemeKey();
|
||||
applyThemeToNativeUI(currentThemeKey.value);
|
||||
uni.$on('theme-change', onThemeChanged);
|
||||
updateTime();
|
||||
timer = setInterval(updateTime, 1000);
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
uni.$off('theme-change', onThemeChanged);
|
||||
if (timer) clearInterval(timer);
|
||||
});
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户