flat: 微调
This commit is contained in:
12
App.vue
12
App.vue
@@ -6,6 +6,7 @@ import usePageAnimation from './hook/usePageAnimation';
|
||||
import useDictStore from './stores/useDictStore';
|
||||
const { $api, navTo, appendScriptTagElement, aes_Decrypt, sm2_Decrypt, safeReLaunch } = inject('globalFunction');
|
||||
import config from '@/config.js';
|
||||
import baseDB from '@/utils/db.js';
|
||||
usePageAnimation();
|
||||
const appword = 'aKd20dbGdFvmuwrt'; // 固定值
|
||||
|
||||
@@ -15,10 +16,12 @@ onLaunch((options) => {
|
||||
console.warn('爱山东环境');
|
||||
getUserInfo();
|
||||
useUserStore().changMiniProgramAppStatus(false);
|
||||
useUserStore().changMachineEnv(false);
|
||||
return;
|
||||
}
|
||||
if (window.hh) {
|
||||
if (isY9MachineType()) {
|
||||
console.warn('求职一体机环境');
|
||||
baseDB.resetAndReinit(); // 清空indexdb
|
||||
useUserStore().logOutApp();
|
||||
useUserStore().changMiniProgramAppStatus(true);
|
||||
useUserStore().changMachineEnv(true);
|
||||
@@ -27,6 +30,7 @@ onLaunch((options) => {
|
||||
// 正式上线去除此方法
|
||||
console.warn('浏览器环境');
|
||||
useUserStore().changMiniProgramAppStatus(true);
|
||||
useUserStore().changMachineEnv(false);
|
||||
useUserStore().initSeesionId(); //更新
|
||||
let token = uni.getStorageSync('token') || '';
|
||||
if (token) {
|
||||
@@ -50,6 +54,12 @@ onHide(() => {
|
||||
console.log('App Hide');
|
||||
});
|
||||
|
||||
function isY9MachineType() {
|
||||
const ua = navigator.userAgent;
|
||||
const isY9Machine = /Y9-ZYYH/i.test(ua); // 匹配机器型号
|
||||
return isY9Machine;
|
||||
}
|
||||
|
||||
function getUserInfo() {
|
||||
lightAppJssdk.user.getUserInfoWithEncryptedParamByAppId({
|
||||
appId: config.appInfo.loveShandong, // 接入方在成功创建应用后自动生成
|
||||
|
||||
Reference in New Issue
Block a user