|
@@ -8,16 +8,23 @@ import routesManage from './routes-manage'
|
|
|
|
|
|
const paymentType = (window as any).paymentType
|
|
|
let routes: any = []
|
|
|
+let baseUrl = null as any
|
|
|
if (paymentType === 'STUDENT') {
|
|
|
routes = routesStudent
|
|
|
} else if (paymentType === 'TEACHER') {
|
|
|
routes = routesTeacher
|
|
|
+ baseUrl = '/teacher.html'
|
|
|
} else if (paymentType === 'SCHOOL') {
|
|
|
routes = routesManage
|
|
|
+ baseUrl = '/school.html'
|
|
|
+}
|
|
|
+
|
|
|
+if (location.origin.indexOf('location') <= -1 || location.origin.indexOf('192.168.3') <= -1) {
|
|
|
+ baseUrl = ''
|
|
|
}
|
|
|
|
|
|
const router: Router = createRouter({
|
|
|
- history: createWebHistory(),
|
|
|
+ history: createWebHistory(baseUrl),
|
|
|
routes,
|
|
|
scrollBehavior(to, from, savedPosition) {
|
|
|
if (to.hash) {
|