chore(douyin-mashida): 联调脚本支持皮肤领取链接
- `set-public-url`:切公网地址时**同时**写 `certLink` 与新的 `claimLinkBase`
(只切前者会让皮肤订单仍指向旧域名的领取页),并打印两者
- `preflight`:新增领取链接自检 —— 未填给 ⚠️(皮肤订单会退回固定兑换链接、
买家又要手输订单号);带 `#` 直接判为阻塞(会把人带到打手领取页);非 https 阻塞
This commit is contained in:
@@ -74,13 +74,17 @@ main().catch((error) => {
|
||||
|
||||
async function main(): Promise<void> {
|
||||
const certLink = `${publicUrl}/redeem`
|
||||
// 皮肤订单用「路径式」领取页(不带 #):买家从卡券/消息点进来直接领,不用输订单号。
|
||||
// 注意不能沿用 orders.claimBaseUrl(那是 hash 的打手领取页)。
|
||||
const claimLinkBase = `${publicUrl}/claim`
|
||||
const messageUrl = `${publicUrl}${MESSAGE_PATH}`
|
||||
|
||||
console.log('抖音码速达 · 公网联调地址切换')
|
||||
console.log('─'.repeat(72))
|
||||
console.log(`后台地址 ${apiBase}`)
|
||||
console.log(`公网地址 ${publicUrl}`)
|
||||
console.log(`certLink ${certLink}`)
|
||||
console.log(`certLink ${certLink} (通用兜底兑换链接,非皮肤订单用)`)
|
||||
console.log(`claimLinkBase ${claimLinkBase} (皮肤订单领取页基址)`)
|
||||
|
||||
const token = String(args.token || '') || (await login())
|
||||
|
||||
@@ -92,12 +96,14 @@ async function main(): Promise<void> {
|
||||
...stripReadonly(data),
|
||||
certLink,
|
||||
afterVerifyLink: certLink,
|
||||
claimLinkBase,
|
||||
}
|
||||
|
||||
const saved = await api<JsonObject>(token, 'POST', CONFIG_PATH, payload)
|
||||
const savedData = (saved.data ?? {}) as JsonObject
|
||||
console.log(
|
||||
`\n✅ 已保存:certLink = ${String(savedData.certLink || '')},ready = ${String(savedData.ready)}`,
|
||||
`\n✅ 已保存:certLink = ${String(savedData.certLink || '')},` +
|
||||
`claimLinkBase = ${String(savedData.claimLinkBase || '')},ready = ${String(savedData.ready)}`,
|
||||
)
|
||||
|
||||
printPlatformChecklist(messageUrl, certLink)
|
||||
|
||||
Reference in New Issue
Block a user