1405/05/15-change redirect route
This commit is contained in:
+2
-1
@@ -1,4 +1,5 @@
|
||||
import {createRouter, createWebHistory} from 'vue-router'
|
||||
import {isToken} from "@/utils";
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
@@ -17,7 +18,7 @@ const router = createRouter({
|
||||
{
|
||||
path: `/`,
|
||||
name: 'main',
|
||||
redirect: {name: 'buyProduct'},
|
||||
redirect: {name: isToken()?'home':'buyProduct'},
|
||||
component: () => import('../views/base/index.vue'),
|
||||
children: [
|
||||
{
|
||||
|
||||
@@ -198,7 +198,7 @@ async function enterFingerPrint() {
|
||||
const fingerPrint = await authenticateWithFingerprint()
|
||||
if (fingerPrint) {
|
||||
setTruth()
|
||||
await router.push({ name: 'buyProduct' })
|
||||
await router.push({ name: 'home' })
|
||||
} else {
|
||||
message.error('خطا در اعتبارسنجی')
|
||||
}
|
||||
@@ -229,7 +229,7 @@ async function login(accessToken: string | undefined) {
|
||||
/* if (userStore.userInfo?.type === (URLUserType() === 'customer' ? 1 : 2)) {*/
|
||||
await walletStore.getMyWallet()
|
||||
setTruth()
|
||||
await router.push({ name: 'buyProduct' })
|
||||
await router.push({ name: 'home' })
|
||||
/* } else {
|
||||
removeToken()
|
||||
userStore.removeInformation()
|
||||
|
||||
@@ -43,7 +43,7 @@ const userFormState = ref<UserMobile>({
|
||||
})
|
||||
|
||||
function phoneVerification() {
|
||||
router.push({name: 'buyProduct' })
|
||||
router.push({name: 'home' })
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user