mini_program 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a7bb117a63d65d612d725937be8ab989a62a5441b23c1e07f89ab63da31c4677
4
- data.tar.gz: 4e6961e320b381fb963218607c0d214c2a994ed96605b6a0238b580fb86d63e8
3
+ metadata.gz: 296c4dddb41810576f1dd0cedbc9aae7f730b1cf50f52b99fea2bdcdac7b8ba1
4
+ data.tar.gz: 89873bf39d9be8ebdc9e33602b6a00773266ba0c15751ae113755e1275719a76
5
5
  SHA512:
6
- metadata.gz: e87486bee27415fb6c9dab4a4593525a279c7baf28d075486fd8231a207dd0ae78d47893d75518e611b66483159130a686537218515b86f1dba8320988c96376
7
- data.tar.gz: c2f5386a68c0057face8770cea17df8821ba1c4f5bccce7869739dbf63611bb48f2f1a635af5dca228769b39813b4b4bd296fa4a12dce2b2705b5c4681598b84
6
+ metadata.gz: 475db5f1df160f23df1e8b5adbfbe34b84033f86dc55eb44107c99d0167ef0e036d5a994b67bd47e981de8167deb7c0ecc1e82cb6446d01101ce2144e17d7496
7
+ data.tar.gz: faa337e8129bbce833f0f4ffd5dea933f30d402618892579de31481c100df7f53ecc2c3d5671b69bdf386c075e948bfd5e8ad3b705304c58d327825b6812d272
@@ -186,27 +186,26 @@ module MiniProgram
186
186
  end
187
187
 
188
188
  #获取小程序二维码
189
- def qrcode_unlimited(data)
189
+ def qrcode_unlimited(scene:, page:, width: 280, check_path: true, env_version: "release")
190
190
  get_token_result = get_access_token
191
191
  if get_access_token.failure?
192
192
  return get_token_result
193
193
  end
194
194
 
195
195
  api = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=#{get_token_result["access_token"]}"
196
+
196
197
  params = {
197
- scene: data[:scene],
198
- page: data[:page],
199
- width: data[:width].blank? ? 280 : data[:width],
200
- check_path: data[:check_path].blank? ? true : data[:check_path],
201
- env_version: data[:env_version].blank? ? "release" : data[:env_version]
198
+ scene:,
199
+ page:,
200
+ width:,
201
+ check_path:,
202
+ env_version:
202
203
  }
203
-
204
- payload = params.as_json
205
-
206
- result = post(api, payload)
204
+
205
+ result = post(api, params)
207
206
 
208
- if result["errcode"]
209
- msg_logger.error {"{params: #{payload}, response: #{result}}"}
207
+ if result["errcode"]
208
+ msg_logger.error {"{params: #{params}, response: #{result}}"}
210
209
  return MiniProgram::ServiceResult.new(success: false, error: result)
211
210
  end
212
211
 
@@ -1,3 +1,3 @@
1
1
  module MiniProgram
2
- VERSION = '1.1.2'
2
+ VERSION = '1.1.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_program
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ian