xctc-utils 1.5.0 → 1.5.2

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.
@@ -18,6 +18,7 @@ interface ShareConfig {
18
18
  appId: string;
19
19
  jsApiList?: string[];
20
20
  openTagList?: string[];
21
+ url?: string;
21
22
  }
22
23
  export declare function weixinShareConfig(config: ShareConfig): void;
23
24
  interface ShareOptions {
@@ -262,7 +262,10 @@ var defaultOpenTagList = [
262
262
  function weixinShareConfig(config) {
263
263
  if (!config['http'])
264
264
  return;
265
- var url = loc.href.split("#")[0];
265
+ var url = loc.origin;
266
+ if (config['url']) {
267
+ url = config['url'];
268
+ }
266
269
  var param = {
267
270
  url: url,
268
271
  appId: config.appId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xctc-utils",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
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",