1
This commit is contained in:
235
nx/utils/base64.js
Normal file
235
nx/utils/base64.js
Normal file
File diff suppressed because it is too large
Load Diff
62
nx/utils/call-check-version.js
Normal file
62
nx/utils/call-check-version.js
Normal file
@@ -0,0 +1,62 @@
|
||||
import { getUpgradeBaseUrl, getTenantId, clientId } from '@/defaultBaseUrl'
|
||||
|
||||
export default function () {
|
||||
// #ifdef APP-PLUS
|
||||
return new Promise((resolve, reject) => {
|
||||
plus.runtime.getProperty(plus.runtime.appid, function (widgetInfo) {
|
||||
const osName = plus.os.name
|
||||
let appId = plus.runtime.appid
|
||||
appId = clientId
|
||||
uni.request({
|
||||
url:
|
||||
getUpgradeBaseUrl() +
|
||||
'/api/sys/app-client-version/latestVersionUniapp?clientId=' +
|
||||
appId +
|
||||
'&platform=' +
|
||||
osName +
|
||||
'&tenantId=' +
|
||||
getTenantId(),
|
||||
method: 'GET',
|
||||
success: res => {
|
||||
if (res.data && res.data.result) {
|
||||
res.data.result.localVersion = plus.runtime.version
|
||||
res.data.result.localWgtVersion = widgetInfo.version
|
||||
res.data.result.url = getUpgradeBaseUrl() + res.data.result.url
|
||||
}
|
||||
console.log('更新信息:', res.data)
|
||||
resolve(res.data)
|
||||
},
|
||||
fail: err => {
|
||||
reject(error)
|
||||
}
|
||||
})
|
||||
// uni.request(options).then(res => {
|
||||
// resolve(res)
|
||||
// }).catch(err => {
|
||||
// reject(error)
|
||||
// });
|
||||
// uniCloud.callFunction({
|
||||
// name: 'check-version',
|
||||
// data: {
|
||||
// appid: plus.runtime.appid,
|
||||
// appVersion: plus.runtime.version,
|
||||
// wgtVersion: widgetInfo.version
|
||||
// },
|
||||
// success: (e) => {
|
||||
// resolve(e)
|
||||
// },
|
||||
// fail: (error) => {
|
||||
// reject(error)
|
||||
// }
|
||||
// })
|
||||
})
|
||||
})
|
||||
// #endif
|
||||
// #ifndef APP-PLUS
|
||||
return new Promise((resolve, reject) => {
|
||||
reject({
|
||||
message: '请在App中使用'
|
||||
})
|
||||
})
|
||||
// #endif
|
||||
}
|
||||
244
nx/utils/check-update.js
Normal file
244
nx/utils/check-update.js
Normal file
File diff suppressed because it is too large
Load Diff
234
nx/utils/crypto-js/aes.js
Normal file
234
nx/utils/crypto-js/aes.js
Normal file
File diff suppressed because it is too large
Load Diff
39
nx/utils/crypto-js/bower.json
Normal file
39
nx/utils/crypto-js/bower.json
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"name": "crypto-js",
|
||||
"version": "4.1.1",
|
||||
"description": "JavaScript library of crypto standards.",
|
||||
"license": "MIT",
|
||||
"homepage": "http://github.com/brix/crypto-js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "http://github.com/brix/crypto-js.git"
|
||||
},
|
||||
"keywords": [
|
||||
"security",
|
||||
"crypto",
|
||||
"Hash",
|
||||
"MD5",
|
||||
"SHA1",
|
||||
"SHA-1",
|
||||
"SHA256",
|
||||
"SHA-256",
|
||||
"RC4",
|
||||
"Rabbit",
|
||||
"AES",
|
||||
"DES",
|
||||
"PBKDF2",
|
||||
"HMAC",
|
||||
"OFB",
|
||||
"CFB",
|
||||
"CTR",
|
||||
"CBC",
|
||||
"Base64",
|
||||
"Base64url"
|
||||
],
|
||||
"main": "index.js",
|
||||
"dependencies": {},
|
||||
"browser": {
|
||||
"crypto": false
|
||||
},
|
||||
"ignore": []
|
||||
}
|
||||
890
nx/utils/crypto-js/cipher-core.js
Normal file
890
nx/utils/crypto-js/cipher-core.js
Normal file
File diff suppressed because it is too large
Load Diff
807
nx/utils/crypto-js/core.js
Normal file
807
nx/utils/crypto-js/core.js
Normal file
File diff suppressed because it is too large
Load Diff
6191
nx/utils/crypto-js/crypto-js.js
Normal file
6191
nx/utils/crypto-js/crypto-js.js
Normal file
File diff suppressed because it is too large
Load Diff
136
nx/utils/crypto-js/enc-base64.js
Normal file
136
nx/utils/crypto-js/enc-base64.js
Normal file
File diff suppressed because it is too large
Load Diff
140
nx/utils/crypto-js/enc-base64url.js
Normal file
140
nx/utils/crypto-js/enc-base64url.js
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user