@vtx/ol-map-mobile
Advanced tools
@@ -10,3 +10,3 @@ import CryptoJS from 'crypto-js'; | ||
| export const encrypt = (data, options) => { | ||
| let {key: AES_KEY, iv: IV, mode} = (options && typeof options === 'object') ? options : {}; | ||
| let { key: AES_KEY, iv: IV, mode } = options && typeof options === 'object' ? options : {}; | ||
| const key = CryptoJS.enc.Utf8.parse(AES_KEY || keyHex); | ||
@@ -17,6 +17,6 @@ const iv = CryptoJS.enc.Utf8.parse(IV || ivHex); | ||
| iv, | ||
| mode: CryptoJS.mode[mode ||'CBC'], | ||
| padding: CryptoJS.pad.Pkcs7 | ||
| }).toString() | ||
| } | ||
| mode: CryptoJS.mode[mode || 'CBC'], | ||
| padding: CryptoJS.pad.Pkcs7, | ||
| }).toString(); | ||
| }; | ||
@@ -34,7 +34,7 @@ /** | ||
| delete params.cql_filter | ||
| delete params.cql_filter; | ||
| } | ||
| return params | ||
| } | ||
| return params; | ||
| }; | ||
@@ -54,5 +54,5 @@ /** | ||
| return params | ||
| } | ||
| return params; | ||
| }; | ||
| export default encryptParams; |
@@ -1,8 +0,15 @@ | ||
| import qs from 'querystring'; | ||
| const getUrlParam = (key, href = window.location.href) => { | ||
| const params = qs.parse(href.split('?')[1]); | ||
| return key ? params[key] : params; | ||
| const paramObj = {}; | ||
| const matchList = href.match(/([^\?&]+)=([^\?&#]+)/g) || []; | ||
| for (let i = 0, len = matchList.length; i < len; i++) { | ||
| const r = matchList[i].match(/([^\?&]+)=([^\?&]+)/); | ||
| paramObj[r[1]] = decodeURIComponent(r[2]); | ||
| } | ||
| if (key) { | ||
| return paramObj[key]; | ||
| } else { | ||
| return paramObj; | ||
| } | ||
| }; | ||
| export default getUrlParam; |
+1
-1
| { | ||
| "name": "@vtx/ol-map-mobile", | ||
| "version": "2.0.2", | ||
| "version": "2.0.3", | ||
| "description": "uni-app组件库", | ||
@@ -5,0 +5,0 @@ "scripts": { |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
793108
0.02%9948
0.08%