Procházet zdrojové kódy

Merge branch 'base'

Burt před 1 rokem
rodič
revize
28a7f26bd3
3 změnil soubory, kde provedl 4 přidání a 3 odebrání
  1. 3 1
      src/interceptors/route.ts
  2. 0 1
      tsconfig.json
  3. 1 1
      vite-plugins/copyNativeRes.ts

+ 3 - 1
src/interceptors/route.ts

@@ -5,7 +5,7 @@
  * 我这里应为大部分都可以随便进入,所以使用黑名单
  */
 import { useUserStore } from '@/store'
-import { getNeedLoginPages, needLoginPages as _needLoginPages } from '@/utils'
+import { needLoginPages as _needLoginPages, getNeedLoginPages } from '@/utils'
 
 // TODO Check
 const loginRoute = '/pages/login/index'
@@ -49,5 +49,7 @@ export const routeInterceptor = {
     uni.addInterceptor('navigateTo', navigateToInterceptor)
     uni.addInterceptor('reLaunch', navigateToInterceptor)
     uni.addInterceptor('redirectTo', navigateToInterceptor)
+    uni.addInterceptor('navigateBack', navigateToInterceptor)
+    uni.addInterceptor('switchTab', navigateToInterceptor)
   },
 }

+ 0 - 1
tsconfig.json

@@ -24,7 +24,6 @@
     ]
   },
   "vueCompilerOptions": {
-    "target": 3,
     "plugins": ["@uni-helper/uni-types/volar-plugin"]
   },
   "exclude": ["node_modules"],

+ 1 - 1
vite-plugins/copyNativeRes.ts

@@ -7,7 +7,7 @@ export function copyNativeRes() {
     __dirname,
     '../dist',
     process.env.NODE_ENV === 'production' ? 'build' : 'dev',
-    process.env.UNI_PLATFORM,
+    process.env.UNI_PLATFORM!,
     'nativeResources',
   )