feat: 公众号服务新增 GetJSSDKConfig 方法及 JSSDK 配置 DTO

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-04-16 18:37:59 +08:00
parent 0cba6fd6d5
commit ed1facc1b8
3 changed files with 57 additions and 0 deletions

View File

@@ -54,3 +54,17 @@ type WechatPayH5Params struct {
ID uint `path:"id" description:"订单ID" required:"true"`
WechatPayH5Request
}
// JSSDKConfigRequest 获取 JSSDK 签名配置请求
type JSSDKConfigRequest struct {
URL string `query:"url" validate:"required" required:"true" description:"当前页面完整 URL含协议和路径不含 # 及其后内容)"`
}
// JSSDKConfigResponse JSSDK 签名配置响应
// 前端使用这些字段调用 wx.config() 初始化微信 JS-SDK
type JSSDKConfigResponse struct {
AppID string `json:"app_id" description:"公众号 AppID"`
Timestamp int64 `json:"timestamp" description:"时间戳(秒)"`
NonceStr string `json:"nonce_str" description:"随机字符串"`
Signature string `json:"signature" description:"签名SHA1"`
}