暂存
This commit is contained in:
@@ -1,4 +1,12 @@
|
||||
// #ifdef H5
|
||||
import '@/lib/encryption/sm4.min.js'
|
||||
// #endif
|
||||
|
||||
// #ifndef H5
|
||||
import { sm4 } from 'sm-crypto';
|
||||
// #endif
|
||||
|
||||
|
||||
import useUserStore from "../stores/useUserStore";
|
||||
import {
|
||||
createRequestWithCache,
|
||||
@@ -601,7 +609,6 @@ export function sm4Decrypt(key, value, mode = "hex") {
|
||||
cipherType: mode === 'hex' ? 'hex' : 'base64',
|
||||
padding: 'pkcs#5'
|
||||
});
|
||||
|
||||
return decrypted
|
||||
|
||||
} catch (e) {
|
||||
@@ -638,9 +645,13 @@ export function reloadBrowser() {
|
||||
export function isY9MachineType() {
|
||||
|
||||
try {
|
||||
const ua = navigator.userAgent;
|
||||
const isY9Machine = /Y9-ZYYH/i.test(ua); // 匹配机器型号
|
||||
return isY9Machine;
|
||||
const ua = navigator.userAgent;
|
||||
const isY9Machine = /Y9-ZYYH/i.test(ua); // 匹配机器型号
|
||||
return isY9Machine;
|
||||
} catch (error) {
|
||||
return false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 一体机环境判断
|
||||
@@ -648,10 +659,16 @@ export function isAsdMachineType() {
|
||||
// const ua = navigator.userAgent;
|
||||
// const isY9Machine = /asd_hanweb/i.test(ua); // 匹配机器型号
|
||||
// return isY9Machine;
|
||||
return !!lightAppJssdk.user
|
||||
try {
|
||||
return !!lightAppJssdk.user
|
||||
} catch (error) {
|
||||
false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
export const $api = {
|
||||
msg,
|
||||
prePage,
|
||||
|
||||
Reference in New Issue
Block a user