feat: 完善双端演示注册与红娘服务闭环

This commit is contained in:
WorkBuddy
2026-10-21 23:41:47 +08:00
parent afee993626
commit 39a18a50ee
63 changed files with 1298 additions and 217 deletions
+26 -1
View File
@@ -6,10 +6,35 @@ const root = path.resolve(__dirname, '..')
const tabLayout = fs.readFileSync(path.join(root, 'src/layouts/TabLayout.vue'), 'utf8')
const pageLayout = fs.readFileSync(path.join(root, 'src/layouts/PageLayout.vue'), 'utf8')
const home = fs.readFileSync(path.join(root, 'src/pages/home/HomePage.vue'), 'utf8')
const workbench = fs.readFileSync(path.join(root, 'src/pages/operator/OperatorWorkbenchPage.vue'), 'utf8')
const serviceDetail = fs.readFileSync(path.join(root, 'src/pages/operator/OperatorServiceDetailPage.vue'), 'utf8')
const matchmakerApi = fs.readFileSync(path.join(root, 'src/api/services/matchmaker.ts'), 'utf8')
const discover = fs.readFileSync(path.join(root, 'src/pages/discover/DiscoverPage.vue'), 'utf8')
const userCard = fs.readFileSync(path.join(root, 'src/components/UiUserCard.vue'), 'utf8')
const routes = fs.readFileSync(path.join(root, 'src/router/routes.ts'), 'utf8')
assert.match(tabLayout, /to="\/messages"[^>]*>消息<\/van-tabbar-item>/)
assert.doesNotMatch(tabLayout, /to="\/messages"[^>]*>消息<\/van-tabbar-item>/)
assert.match(tabLayout, /to="\/notifications"[^>]*>通知<\/van-tabbar-item>/)
assert.match(pageLayout, /class="page-layout__nav"/)
assert.match(home, /home-hero-v2\.jpg/)
assert.match(home, /home__notice[^\n]*notifications/)
assert.doesNotMatch(home, /home__banner-cover[^\n]*\{\{ \(b\.title \|\| '善'\)\.slice\(0, 1\) \}\}/)
assert.match(workbench, /服务工作台/)
assert.match(workbench, /v-for="item in filteredServices"/)
assert.match(workbench, /activeServiceTab/)
assert.match(workbench, /createDemoUser/)
assert.match(workbench, /assignToSelf/)
assert.match(workbench, /query: \{ id: serviceId, source \}/)
assert.match(serviceDetail, /route\.query\.source === 'management'[\s\S]*?managementServiceDetail\(serviceId\)/)
assert.match(matchmakerApi, /managementServiceDetail\(id: string\)[\s\S]*?\/operator\/matchmaker\/management\/services\//)
assert.match(discover, /class="discover__hero"/)
assert.match(discover, /placeholder="姓名、职业或地区"/)
assert.match(discover, />推荐<|>年龄<|>学历<|>婚姻</)
assert.match(discover, /van-slider/)
assert.match(discover, /:show-pass="false"/)
assert.match(userCard, /occupationLabel\(user\.occupationCode\)/)
assert.match(userCard, /maritalLabel\(user\.maritalStatus\)/)
assert.doesNotMatch(routes, /path: ['"]messages['"]|name: ['"]MessagesPage['"]|MessagesPage/)
assert.doesNotMatch(routes, /path: ['"]chat['"]|name: ['"]Chat/)
console.log('PASS: H5 UI contract')