fix(claim): 统一所有买家领取链接为 H5 订单号格式
This commit is contained in:
@@ -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 表示领取链接长期有效', () => {
|
||||
|
||||
@@ -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`
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user