wl-design-mobile 0.6.4 → 0.6.5
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.
- package/package.json +1 -1
- package/util/jssdk.js +21 -6
package/package.json
CHANGED
package/util/jssdk.js
CHANGED
|
@@ -40,19 +40,34 @@ function getAppType() {
|
|
|
40
40
|
let ua = navigator.userAgent.toLowerCase();
|
|
41
41
|
let isWxWork = ua.match(/WxWork/i) == 'wxwork';
|
|
42
42
|
if (isWxWork) {
|
|
43
|
-
|
|
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
|
-
|
|
50
|
+
console.log('当前是企业微信环境')
|
|
51
|
+
return '20'
|
|
50
52
|
}
|
|
51
|
-
|
|
53
|
+
console.log('当前是服务号环境')
|
|
54
|
+
return '10'
|
|
52
55
|
}
|
|
53
56
|
|
|
57
|
+
// 中科朗智
|
|
58
|
+
try {
|
|
59
|
+
if(window.sinoware.device.base.getUUID){
|
|
60
|
+
console.log('当前是中科朗智钉钉环境')
|
|
61
|
+
return '31'
|
|
62
|
+
}
|
|
63
|
+
}catch(err){
|
|
64
|
+
console.log(err)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
54
68
|
if (dd.env.platform != 'notInDingTalk') {
|
|
55
|
-
|
|
69
|
+
console.log('当前是钉钉环境')
|
|
70
|
+
return '30'
|
|
56
71
|
}
|
|
57
72
|
|
|
58
73
|
return ''
|
|
@@ -119,7 +134,7 @@ function configWx(){
|
|
|
119
134
|
});
|
|
120
135
|
wx.error(res => {
|
|
121
136
|
console.log('微信初始化js-sdk失败' + res.errMsg);
|
|
122
|
-
console.log('
|
|
137
|
+
console.log('友情提示:当前页面URL中不能有转义后的字符!(右上角复制链接查看)');
|
|
123
138
|
reject('微信初始化js-sdk失败' + res.errMsg)
|
|
124
139
|
});
|
|
125
140
|
}).catch((error)=>{
|
|
@@ -194,7 +209,7 @@ function configDd(){
|
|
|
194
209
|
});
|
|
195
210
|
dd.error(res => {
|
|
196
211
|
console.log('初始化钉钉 js-sdk失败' + JSON.stringify(res));
|
|
197
|
-
console.log('
|
|
212
|
+
console.log('友情提示:当前页面URL中不能有转义后的字符!(右上角复制链接查看)!');
|
|
198
213
|
reject('初始化钉钉 js-sdk失败' + JSON.stringify(res))
|
|
199
214
|
});
|
|
200
215
|
}).catch((error)=>{
|