feat(pay): switch checkout counter to SPA redirect + JSON API

- redirect `/pay/checkout-counter/:trade_id` to `/cashier/:trade_id`
- add `/pay/checkout-counter-resp/:trade_id` for checkout JSON payload
- remove embedded `static` release and keep `www` as the web bundle source
- regenerate PWA/www assets and move chain icons to `/www/images/chains`
This commit is contained in:
line-6000
2026-04-29 00:34:58 +08:00
parent 785a162f88
commit 9c533a7ff8
199 changed files with 242 additions and 1810 deletions
+9 -1
View File
@@ -27,7 +27,15 @@ func RegisterRoute(e *echo.Echo) {
})
payRoute := e.Group("/pay")
payRoute.GET("/checkout-counter/:trade_id", comm.Ctrl.CheckoutCounter)
payRoute.GET("/checkout-counter/:trade_id", func(ctx echo.Context) error {
tradeId := ctx.Param("trade_id")
targetURL := fmt.Sprintf("/cashier/%s", tradeId)
return ctx.Redirect(http.StatusMovedPermanently, targetURL)
})
payRoute.GET("/checkout-counter-resp/:trade_id", comm.Ctrl.CheckoutCounter)
payRoute.GET("/check-status/:trade_id", comm.Ctrl.CheckStatus)
payRoute.POST("/switch-network", comm.Ctrl.SwitchNetwork)