feat(miniapp): migrate C-group pages to TypeScript, update contracts

This commit is contained in:
Codex
2026-09-14 10:14:05 +08:00
parent e59038790c
commit 93fc9b0d88
6 changed files with 233 additions and 7 deletions
+3 -3
View File
@@ -104,7 +104,7 @@ assert.match(premaritalTemplate, /预约辅导/, '婚前辅导页缺少预约按
assert.match(premaritalTemplate, /服务状态/, '婚前辅导页缺少服务状态')
const contentTemplate = read('miniapp/pages/content/content.wxml')
const contentLogic = read('miniapp/pages/content/content.js')
const contentLogic = read('miniapp/pages/content/content.ts')
assert.match(contentTemplate, /content-categories/, '婚恋课堂缺少分类导航')
assert.match(contentTemplate, /content-list/, '婚恋课堂缺少内容列表')
assert.match(contentTemplate, /viewCount/, '婚恋课堂缺少真实浏览量')
@@ -120,13 +120,13 @@ assert.match(antiFraudTemplate, /举报可疑行为/, '婚恋反诈缺少举报
assert.match(antiFraudTemplate, /安全求助/, '婚恋反诈缺少求助入口')
const stationTemplate = read('miniapp/pages/service-station/service-station.wxml')
const stationLogic = read('miniapp/pages/service-station/service-station.js')
const stationLogic = read('miniapp/pages/service-station/service-station.ts')
for (const label of ['地址', '联系电话', '开放时间', '服务项目', '地图定位', '预约到站服务']) {
assert.ok(stationTemplate.includes(label), `服务站缺少 ${label}`)
}
assert.match(stationLogic, /wx\.makePhoneCall/, '服务站电话必须使用微信原生拨号')
assert.match(stationLogic, /wx\.openLocation/, '服务站定位必须使用微信原生地图')
assert.match(stationLogic, /api\.get\(['"]\/home['"]\)/, '服务站必须读取真实首页服务站数据')
assert.match(stationLogic, /api\.get.*['"]\/home['"]/, '服务站必须读取真实首页服务站数据')
assert.doesNotMatch(stationLogic, /00000000/, '服务站不得保留演示电话')
for (const envFile of ['miniapp/env.js', 'miniapp/env.ts']) {