|
@@ -262,10 +262,22 @@ func GetMerchantCanvasCard(c *gin.Context) {
|
|
|
}
|
|
|
url := "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=" + outQRData.AccessToken
|
|
|
|
|
|
+ //1.原始码 不需要购买直接分享 ==原生码直接分享
|
|
|
+ //2.code 需要购买才能分享
|
|
|
+ //3.空的
|
|
|
+
|
|
|
+ if inData.Code == "原始码" { //可以分享
|
|
|
+ outData.IsShare = true
|
|
|
+ } else { //查询购买记录,没有购买过不让分享
|
|
|
+ outData.IsShare = false
|
|
|
+ }
|
|
|
+
|
|
|
+ //点击购买的时候把code给进去把 原始码购买属于平台
|
|
|
+
|
|
|
qr.CheckPath = true
|
|
|
- qr.Page = "pages/home/home"
|
|
|
+ qr.Page = "pages/canvas/canvas"
|
|
|
qr.EnvVersion = "release"
|
|
|
- qr.Scene = strconv.FormatInt(inData.MerchantId, 10)
|
|
|
+ qr.Scene = "id=" + strconv.FormatInt(inData.MerchantId, 10) + "&code=" + inData.Code
|
|
|
|
|
|
data, err := json.Marshal(&qr)
|
|
|
if err != nil {
|