|
@ -10,7 +10,7 @@ import ( |
|
|
"github.com/golang/protobuf/proto" |
|
|
"github.com/golang/protobuf/proto" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
func GetMiniAppQrcode(appId, appSecret, page,scene string, url ...string) (string, error) { |
|
|
|
|
|
|
|
|
func GetMiniAppQrcode(appId, appSecret string, qrcodeParams map[string]interface{}, url ...string) (string, error) { |
|
|
|
|
|
|
|
|
conn, err := rpc_server_conn(url...) |
|
|
conn, err := rpc_server_conn(url...) |
|
|
if err != nil { |
|
|
if err != nil { |
|
@ -18,11 +18,10 @@ func GetMiniAppQrcode(appId, appSecret, page,scene string, url ...string) (strin |
|
|
} |
|
|
} |
|
|
defer conn.Close() |
|
|
defer conn.Close() |
|
|
|
|
|
|
|
|
data := map[string]string{} |
|
|
|
|
|
|
|
|
data := map[string]interface{}{} |
|
|
data["app_id"] = appId |
|
|
data["app_id"] = appId |
|
|
data["app_secret"] = appSecret |
|
|
data["app_secret"] = appSecret |
|
|
data["page"] = page |
|
|
|
|
|
data["scene"] = scene |
|
|
|
|
|
|
|
|
data["qrcode"] = qrcodeParams |
|
|
|
|
|
|
|
|
data_json, err := json.Marshal(data) |
|
|
data_json, err := json.Marshal(data) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|