wl-design-mobile 0.6.4 → 0.6.6

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/util/jssdk.js +11 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wl-design-mobile",
3
- "version": "0.6.4",
3
+ "version": "0.6.6",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "finch",
package/util/jssdk.js CHANGED
@@ -40,19 +40,24 @@ function getAppType() {
40
40
  let ua = navigator.userAgent.toLowerCase();
41
41
  let isWxWork = ua.match(/WxWork/i) == 'wxwork';
42
42
  if (isWxWork) {
43
- return '20'
43
+ console.log('当前是企业微信环境')
44
+ return '20'
44
45
  }
45
46
 
46
47
  let isWx = ua.match(/MicroMessenger/i) == 'micromessenger';
47
48
  if (isWx) {
48
49
  if(agentId){//如果有agentId认为是企业微信
49
- return '20'
50
+ console.log('当前是企业微信环境')
51
+ return '20'
50
52
  }
51
- return '10'
53
+ console.log('当前是服务号环境')
54
+ return '10'
52
55
  }
53
56
 
57
+
54
58
  if (dd.env.platform != 'notInDingTalk') {
55
- return '30'
59
+ console.log('当前是钉钉环境')
60
+ return '30'
56
61
  }
57
62
 
58
63
  return ''
@@ -119,7 +124,7 @@ function configWx(){
119
124
  });
120
125
  wx.error(res => {
121
126
  console.log('微信初始化js-sdk失败' + res.errMsg);
122
- console.log('友情提示:若想成功,则需通过params传参(而不是query)!!!');
127
+ console.log('友情提示:当前页面URL中不能有转义后的字符!(右上角复制链接查看)');
123
128
  reject('微信初始化js-sdk失败' + res.errMsg)
124
129
  });
125
130
  }).catch((error)=>{
@@ -194,7 +199,7 @@ function configDd(){
194
199
  });
195
200
  dd.error(res => {
196
201
  console.log('初始化钉钉 js-sdk失败' + JSON.stringify(res));
197
- console.log('友情提示:若想成功,则需通过params传参(而不是query)!!!');
202
+ console.log('友情提示:当前页面URL中不能有转义后的字符!(右上角复制链接查看)!');
198
203
  reject('初始化钉钉 js-sdk失败' + JSON.stringify(res))
199
204
  });
200
205
  }).catch((error)=>{