客户领取页 ui与逻辑优化
This commit is contained in:
@@ -11,7 +11,9 @@ import {
|
||||
redeemClaimTask,
|
||||
} from '../services/claim/claim-session-service.js'
|
||||
import {
|
||||
confirmKuaishouCloudClaimRole,
|
||||
getKuaishouCloudClaimGuideAssetPath,
|
||||
redeemKuaishouCloudClaim,
|
||||
verifyKuaishouCloudClaimTicket,
|
||||
} from '../services/claim/kuaishou-cloud-claim-service.js'
|
||||
import { buildNotFoundPayload, buildSuccessPayload, sendRouteError } from '../utils/http.js'
|
||||
@@ -90,6 +92,24 @@ router.post('/:token/kuaishou-cloud/verify-ticket', async (req, res) => {
|
||||
}
|
||||
})
|
||||
|
||||
router.post('/:token/kuaishou-cloud/confirm-role', async (req, res) => {
|
||||
try {
|
||||
const data = await confirmKuaishouCloudClaimRole(req.params.token)
|
||||
res.json(buildSuccessPayload(data, '角色已确认'))
|
||||
} catch (error) {
|
||||
sendRouteError(res, error, '确认角色失败', '[claims/:token/kuaishou-cloud/confirm-role]')
|
||||
}
|
||||
})
|
||||
|
||||
router.post('/:token/kuaishou-cloud/redeem', async (req, res) => {
|
||||
try {
|
||||
const data = await redeemKuaishouCloudClaim(req.params.token)
|
||||
res.json(buildSuccessPayload(data, '兑换请求已提交'))
|
||||
} catch (error) {
|
||||
sendRouteError(res, error, '兑换失败', '[claims/:token/kuaishou-cloud/redeem]')
|
||||
}
|
||||
})
|
||||
|
||||
router.get('/:token/screenshot', async (req, res) => {
|
||||
try {
|
||||
const screenshotPath = await getClaimScreenshotPath(req.params.token)
|
||||
|
||||
Reference in New Issue
Block a user