回溯点:保存注册预约客户流程修复进度

This commit is contained in:
2026-10-30 13:02:38 +08:00
parent 7b40ee1650
commit 53b6fcaa11
45 changed files with 960 additions and 132 deletions
@@ -13,6 +13,7 @@ global.getApp = () => ({ setSession: () => {} })
const profileCache = require('../../utils/profile-cache')
profileCache.getProfile = async () => currentProfile
const userApi = require('../../api/user')
require('./index')
async function loadProfile(profile) {
@@ -47,6 +48,18 @@ async function run() {
shopBusinessRemainingDays: 66
})
assert.strictEqual(active.profile.shopBusinessExpireTime, '2026-12-31T23:59:59')
userApi.getAccountClosure = async () => { throw new Error('注销状态暂时无法读取') }
const closurePage = {
data: { ...pageDefinition.data },
setData(values) { Object.assign(this.data, values) }
}
await pageDefinition.loadClosureRequest.call(closurePage)
assert.strictEqual(closurePage.data.closureError, '注销状态暂时无法读取')
assert.strictEqual(closurePage.data.closureLoading, false)
const accountWxml = require('fs').readFileSync(require('path').join(__dirname, 'index.wxml'), 'utf8')
assert(accountWxml.includes('closureError'))
assert(accountWxml.includes('bindtap="loadClosureRequest"'))
}
run().catch(error => {