- 增加移动端路由判断条件,当路径以/mobile开头时加载移动端页面 - 优化路由判断逻辑的格式,添加适当的空格和缩进
@@ -1,6 +1,8 @@
// 如果当前是在 /big 下
if (window.location.pathname.startsWith('/admin')) {
- import('./admin/index')
- }else{
- import('./home/index')
- }
+ import('./admin/index')
+} else if (window.location.pathname.startsWith('/mobile')) {
+ import('./mobile/index')
+} else {
+ import('./home/index')
+}