chore(douyin-mashida): 联调脚本支持皮肤领取链接
- `set-public-url`:切公网地址时**同时**写 `certLink` 与新的 `claimLinkBase`
(只切前者会让皮肤订单仍指向旧域名的领取页),并打印两者
- `preflight`:新增领取链接自检 —— 未填给 ⚠️(皮肤订单会退回固定兑换链接、
买家又要手输订单号);带 `#` 直接判为阻塞(会把人带到打手领取页);非 https 阻塞
This commit is contained in:
@@ -99,6 +99,8 @@ function step1Config(config: JsonObject): void {
|
||||
const enabled = config.enabled !== false
|
||||
const uid = String(config.uid || '')
|
||||
const certLink = String(config.certLink || '')
|
||||
// 皮肤订单的领取页基址(路径式,不带 #);留空时皮肤订单会退回固定兑换链接
|
||||
const claimLinkBase = String(config.claimLinkBase || '')
|
||||
const baseUrl = String(config.baseUrl || '')
|
||||
const hasSecret = Boolean(config.hasSecret)
|
||||
const ready = Boolean(config.ready)
|
||||
@@ -109,6 +111,9 @@ function step1Config(config: JsonObject): void {
|
||||
` secret ${hasSecret ? `✅ 已配置(${String(config.secretMasked || '')})` : '❌ 未配置'}`,
|
||||
)
|
||||
console.log(` certLink ${certLink ? `✅ ${certLink}` : '❌ 未填'}`)
|
||||
console.log(
|
||||
` 领取链接 ${claimLinkBase ? `✅ ${claimLinkBase}` : '⚠️ 未填(皮肤订单会退回 certLink,买家要手输订单号)'}`,
|
||||
)
|
||||
console.log(` baseUrl ${baseUrl || '❌ 未填'}`)
|
||||
console.log(` ready ${ready ? '✅ true' : '❌ false'}`)
|
||||
|
||||
@@ -132,6 +137,18 @@ function step1Config(config: JsonObject): void {
|
||||
if (certLink && !/^https:/i.test(certLink)) {
|
||||
problems.push(`certLink 不是 https(${certLink})——买家手机多半打不开,平台也可能不认`)
|
||||
}
|
||||
|
||||
if (claimLinkBase) {
|
||||
if (claimLinkBase.includes('#')) {
|
||||
problems.push(
|
||||
`领取链接基址带了 #(${claimLinkBase})——\`#/claim\` 是**打手**领取页,` +
|
||||
'皮肤买家会被带进绑定游戏 UID 的流程;请改成路径式,例如 https://<域名>/claim',
|
||||
)
|
||||
}
|
||||
if (!/^https:/i.test(claimLinkBase)) {
|
||||
problems.push(`领取链接基址不是 https(${claimLinkBase})——买家手机多半打不开`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------- 2) 网关
|
||||
|
||||
Reference in New Issue
Block a user