fix(home): 即时匹配改为真实在线大神实时匹配,优化弹窗按钮与暖色主题对比度
- 每次匹配重新拉取 /api/companions,只匹配 user_id>0(真实注册)、接单中、排除当前用户的大神 - 换一位优先避开上一位,解决长期固定命中种子大神(林深见鹿 userId=0)的问题 - 弹窗更名为「在线大神即时匹配」,按钮改为「换一位 / 查看资料并预约」,补充图标、尺寸与暖色主题对比 - 关闭弹窗取消未完成匹配;117 套件/765 用例全绿
这个提交包含在:
@@ -343,6 +343,21 @@ describe('ClientFeatures (TDD 测试套件: 用户端功能闭环)', () => {
|
||||
expect(content).toContain('empty-search-box');
|
||||
expect(content).toContain('resetAllFilters');
|
||||
});
|
||||
|
||||
it('即时匹配必须实时拉取大神、只匹配真实注册且接单中的大神,并支持换一位', () => {
|
||||
const indexVuePath = path.join(uniPagesDir, 'index', 'index.vue');
|
||||
const content = fs.readFileSync(indexVuePath, 'utf-8');
|
||||
const apiContent = fs.readFileSync(path.join(rootDir, 'pwuniapp', 'common', 'api.js'), 'utf-8');
|
||||
|
||||
expect(content).toContain('await getCompanions()');
|
||||
expect(content).toContain('Number(e.userId) > 0');
|
||||
expect(content).toContain('Number(e.userId) !== uid');
|
||||
expect(content).toContain('lastMatchedId');
|
||||
expect(content).toContain('换一位');
|
||||
expect(content).toContain('在线大神即时匹配');
|
||||
expect(content).not.toContain('首位接单大神命中');
|
||||
expect(apiContent).toContain('userId: Number(c.userId) || 0');
|
||||
});
|
||||
});
|
||||
|
||||
describe('9. 大神认证审核双向联动、服务评价监管与友圈搭子上车业务完整闭环', () => {
|
||||
|
||||
在新工单中引用
屏蔽一个用户