xctc-utils 1.4.1 → 1.4.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.
@@ -213,8 +213,8 @@ function weixinCode(appId, scope) {
213
213
  scopeVal = scope;
214
214
  }
215
215
  var base = "https://open.weixin.qq.com/connect/oauth2/authorize?";
216
- var uri = encodeURIComponent(loc.href.split("?")[0]);
217
- var config = "appid=".concat(weixinConfig.appId, "&redirect_uri=").concat(uri, "&response_type=code&scope=").concat(scopeVal, "&state=state#wechat_redirect");
216
+ var uri = encodeURIComponent(loc.origin);
217
+ var config = "appid=".concat(id, "&redirect_uri=").concat(uri, "&response_type=code&scope=").concat(scopeVal, "&state=state#wechat_redirect");
218
218
  var wxJumpURL = base + config;
219
219
  loc.replace(wxJumpURL);
220
220
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xctc-utils",
3
- "version": "1.4.1",
3
+ "version": "1.4.3",
4
4
  "description": "localStorage存储\r ```\r sessionStorage存储\r ```\r crypto-js加密、解密\r ```\r 微信授权登录、微信分享\r ```\r 设备环境获取\r ```\r 是否是微信浏览器\r ```\r 时间戳转时间,字符串转时间戳",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",