Merge remote-tracking branch 'origin/main' into lichang

This commit is contained in:
TsMask
2024-05-11 16:42:13 +08:00
7 changed files with 8 additions and 5745 deletions

View File

@@ -14,10 +14,6 @@ const appStore = useAppStore();
const router = useRouter();
const route = useRoute();
/**登录后重定向页面 */
const redirectPath =
(route.query && (route.query.redirect as string)) || '/index';
let state = reactive({
/**表单属性 */
from: {
@@ -52,7 +48,9 @@ function fnFinish() {
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success(t('views.login.loginSuccess'), 3);
router.push({ path: redirectPath });
/**登录后重定向页面 */
const redirectPath = route.query?.redirect || '/index';
router.push({ path: redirectPath as string });
} else {
message.error(`${res.msg}`, 3);
}