wl-design-mobile 0.5.6 → 0.5.8
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 +31 -33
- package/util/jssdk.js +22 -13
package/package.json
CHANGED
|
@@ -1,33 +1,31 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "wl-design-mobile",
|
|
3
|
-
"version": "0.5.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
},
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "wl-design-mobile",
|
|
3
|
+
"version": "0.5.8",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"author": "finch",
|
|
7
|
+
"license": "ISC",
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public",
|
|
10
|
+
"registry": "https://registry.npmjs.org/",
|
|
11
|
+
"files": [
|
|
12
|
+
"!**/.*",
|
|
13
|
+
"!**/CHANGELOG.md",
|
|
14
|
+
"**/*"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"core-js": "^3.8.3",
|
|
19
|
+
"vant": "^2.13.2",
|
|
20
|
+
"vue-router": "^3.0.5",
|
|
21
|
+
"moment": "^2.30.1",
|
|
22
|
+
"axios": "1.6.7",
|
|
23
|
+
"dingtalk-jsapi": "^3.0.12",
|
|
24
|
+
"weixin-js-sdk": "^1.6.5",
|
|
25
|
+
"@wecom/jssdk": "^1.4.5"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"vue": "^2.6.14"
|
|
29
|
+
},
|
|
30
|
+
"scripts": {}
|
|
31
|
+
}
|
package/util/jssdk.js
CHANGED
|
@@ -58,23 +58,32 @@ function getAppType() {
|
|
|
58
58
|
return ''
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
61
|
+
/**
|
|
62
|
+
* 判断ios系统版本号是否大于14
|
|
63
|
+
* @returns {boolean}
|
|
64
|
+
*/
|
|
65
|
+
const isIos14AndMore = () =>{
|
|
66
|
+
// 判断ios手机版本号是否大于14,大于14就拿App.vue存储的url,否则拿当前页面的url
|
|
67
|
+
try {
|
|
68
|
+
const str = navigator.userAgent.toLowerCase()
|
|
69
|
+
const ver = str.match(/cpu iphone os (.*?) like mac os/)
|
|
70
|
+
if (!ver) {
|
|
71
|
+
return false
|
|
72
|
+
} else {
|
|
73
|
+
return Number(ver[1].split('_')[0]) >= 14
|
|
74
|
+
}
|
|
75
|
+
} catch (e) {
|
|
76
|
+
console.log('isIos14AndMore', e)
|
|
77
|
+
return false
|
|
67
78
|
}
|
|
68
|
-
return window.location.href.split('#')[0]
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function isIOS14Plus() {
|
|
72
|
-
const os = navigator.userAgent
|
|
73
|
-
return /iPhone OS 1[4-9]/.test(os) || /iPhone OS [2-9]\d/.test(os)
|
|
74
79
|
}
|
|
75
80
|
|
|
76
81
|
function getJsConfig(){
|
|
77
|
-
let url =
|
|
82
|
+
let url = window.location.href.split('#')[0].toString();
|
|
83
|
+
if (isIos14AndMore()) {
|
|
84
|
+
console.log('isIos14AndMore true')
|
|
85
|
+
url = sessionStorage.getItem('ios14ConfigUrl')
|
|
86
|
+
}
|
|
78
87
|
return new Promise((resolve, reject)=>{
|
|
79
88
|
axios.post(config.platformServerContext + '/api/weixin/getJsConfig', {
|
|
80
89
|
appType: getAppType(),
|