flat: 演示版
This commit is contained in:
25
App.vue
25
App.vue
@@ -4,7 +4,7 @@ import { onLaunch, onShow, onHide } from '@dcloudio/uni-app';
|
||||
import useUserStore from './stores/useUserStore';
|
||||
import usePageAnimation from './hook/usePageAnimation';
|
||||
import useDictStore from './stores/useDictStore';
|
||||
const { $api, navTo, appendScriptTagElement, aes_Decrypt, sm2_Decrypt } = inject('globalFunction');
|
||||
const { $api, navTo, appendScriptTagElement, aes_Decrypt, sm2_Decrypt, safeReLaunch } = inject('globalFunction');
|
||||
import config from '@/config.js';
|
||||
usePageAnimation();
|
||||
const appword = 'aKd20dbGdFvmuwrt'; // 固定值
|
||||
@@ -27,9 +27,10 @@ onLaunch((options) => {
|
||||
$api.msg('登录成功');
|
||||
});
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/login/login',
|
||||
});
|
||||
safeReLaunch('/pages/login/login');
|
||||
// uni.redirectTo({
|
||||
// url: '/pages/login/login',
|
||||
// });
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -110,13 +111,15 @@ function loginCallback(userInfo) {
|
||||
.then((resume) => {
|
||||
if (resume.data.jobTitleId) {
|
||||
useUserStore().initSeesionId();
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
});
|
||||
// uni.reLaunch({
|
||||
// url: '/pages/index/index',
|
||||
// });
|
||||
safeReLaunch('/pages/index/index');
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/login/login',
|
||||
});
|
||||
safeReLaunch('/pages/login/login');
|
||||
// uni.redirectTo({
|
||||
// url: '/pages/login/login',
|
||||
// });
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -187,4 +190,4 @@ uni-modal,
|
||||
body {
|
||||
font-family: 'PingFangSC-Regular', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
Reference in New Issue
Block a user