feat: 公众号服务新增 GetJSSDKConfig 方法及 JSSDK 配置 DTO
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -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)"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user