From 56f3593998c3378184625735c3768f65e562b70b Mon Sep 17 00:00:00 2001 From: honkiko Date: Wed, 5 Apr 2023 21:06:28 +0800 Subject: [PATCH 1/2] add env_version to url_schema and url_link https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/qrcode-link/url-scheme/generateScheme.html --- url_link.go | 2 ++ url_scheme.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/url_link.go b/url_link.go index ffbec8d..9497be2 100644 --- a/url_link.go +++ b/url_link.go @@ -29,6 +29,8 @@ type URLLinkRequest struct { ExpireInterval int64 `json:"expire_interval"` // 非必填 云开发静态网站自定义 H5 配置参数,可配置中转的云开发 H5 页面。不填默认用官方 H5 页面 CloudBase *URLLinkCloudBase `json:"cloud_base"` + // 非必填 要打开的小程序版本。正式版为 "release",体验版为"trial",开发版为"develop"。默认值"release" + EnvVersion string `json:"env_version,omitempty"` } type URLLinkCloudBase struct { diff --git a/url_scheme.go b/url_scheme.go index 1b1aea4..5fdcefc 100644 --- a/url_scheme.go +++ b/url_scheme.go @@ -20,6 +20,8 @@ type SchemedInfo struct { Path string `json:"path"` // 通过scheme码进入小程序时的query,最大128个字符,只支持数字,大小写英文以及部分特殊字符:!#$&'()*+,/:;=?@-._~ Query string `json:"query"` + // 非必填 要打开的小程序版本。正式版为 "release",体验版为"trial",开发版为"develop"。默认值"release" + EnvVersion string `json:"env_version,omitempty"` } type URLSchemeResponse struct { From cb63d1830ab954154d90b496a8069a3f1f5f5b95 Mon Sep 17 00:00:00 2001 From: honkiko Date: Wed, 5 Apr 2023 21:57:56 +0800 Subject: [PATCH 2/2] remove dup logs dup in func PostWithBody --- request/request.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/request/request.go b/request/request.go index f003936..6d6bfde 100644 --- a/request/request.go +++ b/request/request.go @@ -61,9 +61,6 @@ func (cli *Request) GetWithBody(url string) (*http.Response, error) { } func (cli *Request) Post(url string, params interface{}, response interface{}) error { - cli.logger().Info(context.Background(), "request url: %s", url) - cli.logger().Info(context.Background(), "request params: %+v", params) - resp, err := cli.PostWithBody(url, params) if err != nil { cli.logger().Error(context.Background(), "post error: %s", err)