@smart100/spu-web-plugin 1.0.21 → 1.0.22
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/dist/index.d.ts +2 -0
- package/dist/spu-web-plugin.mjs +14 -2
- package/package.json +1 -1
- package/src/index.ts +3 -0
- package/src/types/index.d.ts +2 -0
package/dist/index.d.ts
CHANGED
|
@@ -128,6 +128,8 @@ export const getUniqueid: () => string
|
|
|
128
128
|
export const getUuid: () => string
|
|
129
129
|
export const functionCheck: (functioncode?: string) => boolean
|
|
130
130
|
export const getServerTime: () => Promise<string>
|
|
131
|
+
export const encrypt: (str: string) => string
|
|
132
|
+
export const decrypt: (str: string) => string
|
|
131
133
|
export const setTitle: (pagetitle?: string) => void
|
|
132
134
|
export const isInApp: () => boolean
|
|
133
135
|
export const AMapLoader: IAMapLoader
|
package/dist/spu-web-plugin.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var version = "1.0.
|
|
1
|
+
var version = "1.0.22";
|
|
2
2
|
|
|
3
3
|
/** Detect free variable `global` from Node.js. */
|
|
4
4
|
var freeGlobal$2 = typeof global == 'object' && global && global.Object === Object && global;
|
|
@@ -15845,6 +15845,18 @@ function byteToString(arr) {
|
|
|
15845
15845
|
return str;
|
|
15846
15846
|
}
|
|
15847
15847
|
var key = byteToString([0x36, 0x31, 0x33, 0x30, 0x32, 0x32, 0x32, 0x32, 0x32]);
|
|
15848
|
+
// 加密算法
|
|
15849
|
+
function encrypt(dataString) {
|
|
15850
|
+
// ENC加密
|
|
15851
|
+
var keyHex = CryptoJS.enc.Utf8.parse(key);
|
|
15852
|
+
var encrypted = CryptoJS.DES.encrypt(dataString, keyHex, {
|
|
15853
|
+
mode: CryptoJS.mode.ECB,
|
|
15854
|
+
padding: CryptoJS.pad.Pkcs7
|
|
15855
|
+
});
|
|
15856
|
+
// base64加密
|
|
15857
|
+
var base64 = encrypted.ciphertext.toString(CryptoJS.enc.Base64);
|
|
15858
|
+
return base64;
|
|
15859
|
+
}
|
|
15848
15860
|
// 解密算法
|
|
15849
15861
|
function decrypt(base64) {
|
|
15850
15862
|
// base64解密
|
|
@@ -70465,4 +70477,4 @@ var SPUWebPlugin = {
|
|
|
70465
70477
|
version: version
|
|
70466
70478
|
};
|
|
70467
70479
|
|
|
70468
|
-
export { AMapLoader, Module, normalAxios$1 as apaasAxios, normalAxios$1 as axios, checkLogin, index as components, SPUWebPlugin as default, downloadService, expandexp, functionCheck, getAddress, getCloudServ, getDistance, getLocation, getRefreshToken, getServToken, getServerTime, getToken, getTokenExpires, getUniqueid, getUser, v4 as getUuid, globalConfig, globalOptions, isInApp, isdebugger, isvirtuallocation, lsProxy, mapService, setRefreshToken, setTitle, setToken, setTokenExpires, singleLogin, spuAxios, spuConfig, ssProxy, updateToken, uploadService, wxworkSuite };
|
|
70480
|
+
export { AMapLoader, Module, normalAxios$1 as apaasAxios, normalAxios$1 as axios, checkLogin, index as components, decrypt, SPUWebPlugin as default, downloadService, encrypt, expandexp, functionCheck, getAddress, getCloudServ, getDistance, getLocation, getRefreshToken, getServToken, getServerTime, getToken, getTokenExpires, getUniqueid, getUser, v4 as getUuid, globalConfig, globalOptions, isInApp, isdebugger, isvirtuallocation, lsProxy, mapService, setRefreshToken, setTitle, setToken, setTokenExpires, singleLogin, spuAxios, spuConfig, ssProxy, updateToken, uploadService, wxworkSuite };
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
isvirtuallocation,
|
|
19
19
|
getServerTime
|
|
20
20
|
} from './utils'
|
|
21
|
+
import { encrypt, decrypt } from './crypt'
|
|
21
22
|
import { installUrlquery } from './urlquery'
|
|
22
23
|
import { mapService } from './map/MapService'
|
|
23
24
|
import AMapLoader from './map/AMapLoader'
|
|
@@ -129,6 +130,8 @@ export {
|
|
|
129
130
|
getUuid,
|
|
130
131
|
functionCheck,
|
|
131
132
|
getServerTime,
|
|
133
|
+
encrypt,
|
|
134
|
+
decrypt,
|
|
132
135
|
setTitle,
|
|
133
136
|
isInApp,
|
|
134
137
|
AMapLoader,
|
package/src/types/index.d.ts
CHANGED
|
@@ -128,6 +128,8 @@ export const getUniqueid: () => string
|
|
|
128
128
|
export const getUuid: () => string
|
|
129
129
|
export const functionCheck: (functioncode?: string) => boolean
|
|
130
130
|
export const getServerTime: () => Promise<string>
|
|
131
|
+
export const encrypt: (str: string) => string
|
|
132
|
+
export const decrypt: (str: string) => string
|
|
131
133
|
export const setTitle: (pagetitle?: string) => void
|
|
132
134
|
export const isInApp: () => boolean
|
|
133
135
|
export const AMapLoader: IAMapLoader
|