fix(claim): 统一所有买家领取链接为 H5 订单号格式

This commit is contained in:
yml2213
2026-11-02 22:11:22 +08:00
parent 3989b0a649
commit 4dc2f5ca90
38 changed files with 298 additions and 362 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ export function createDefaultRuntimeConfig(projectRoot: string): RuntimeConfig {
},
orders: {
claimBaseUrl: 'http://127.0.0.1:5173/#/claim',
claimBaseUrl: 'http://127.0.0.1:5173/h5',
// 0 表示长期有效;后台手动关闭任务后领取链接仍会立即失效。
tokenTtlHours: 0,
},
@@ -41,7 +41,7 @@ test('applyEnvOverrides derives claim base url from app base url when explicit c
APP_BASE_URL: 'https://example.test///',
})
assert.equal(config.orders.claimBaseUrl, 'https://example.test/#/claim')
assert.equal(config.orders.claimBaseUrl, 'https://example.test/h5')
})
test('CLAIM_TOKEN_TTL_HOURS=0 表示领取链接长期有效', () => {
+1 -1
View File
@@ -158,7 +158,7 @@ function applyClaimBaseUrlOverride(config: RuntimeConfig, env: RuntimeEnv): void
const appBaseUrl = parseString(env.APP_BASE_URL)
if (appBaseUrl !== null) {
config.orders.claimBaseUrl = `${appBaseUrl.replace(/\/+$/, '')}/#/claim`
config.orders.claimBaseUrl = `${appBaseUrl.replace(/\/+$/, '')}/h5`
}
}