|
@@ -138,3 +138,26 @@ func GetEncryptInfo(c *gin.Context) {
|
|
|
Mobile: newUserInfo.Mobile,
|
|
|
}, c)
|
|
|
}
|
|
|
+
|
|
|
+// GetWxJsConf
|
|
|
+// @Title 微信获取签名接口
|
|
|
+// @Description 微信获取签名接口
|
|
|
+// @Param Url query string true "url地址"
|
|
|
+// @Success 200 {object} models.WechatSign
|
|
|
+// @router /getWxJsConf [get]
|
|
|
+func GetWxJsConf(c *gin.Context) {
|
|
|
+ getUrl := c.DefaultQuery("Url", "")
|
|
|
+ jsConf, err := wechat.GetJsConfig(getUrl)
|
|
|
+ if err != nil {
|
|
|
+ response.Fail("获取失败,Err:"+err.Error(), c)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ //resp := new(models.WechatSign)
|
|
|
+ //resp.AppId = utils.WxAppId
|
|
|
+ //resp.NonceStr = nonceString
|
|
|
+ //resp.Timestamp = timestamp
|
|
|
+ //resp.Url = getUrl
|
|
|
+ //resp.Signature = signature
|
|
|
+ //jsConf.AppID
|
|
|
+ response.OkData("获取成功", jsConf, c)
|
|
|
+}
|