Pārlūkot izejas kodu

认证通默认模板修改

yuwenjun1997 2 gadi atpakaļ
vecāks
revīzija
4bebefe79d
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      middleware/intercept.js

+ 2 - 2
middleware/intercept.js

@@ -34,7 +34,7 @@ function isFixedTemplate(authUserId) {
 
 
 // 修改路由
 // 修改路由
 function replaceFullPath(fullPath) {
 function replaceFullPath(fullPath) {
-  return fullPath.replace(/^(\/\d+\/)([a-z]+)(.*)/gi, (match, $1, $2, $3) => {
+  return fullPath.replace(/^(\/\d+\/)([a-z\d]+)(.*)/gi, (match, $1, $2, $3) => {
     return $1 + 'app' + $3
     return $1 + 'app' + $3
   })
   })
 }
 }
@@ -61,7 +61,7 @@ async function initTemplateEntry(context) {
     const prefix = route.name.split('-')[1]
     const prefix = route.name.split('-')[1]
 
 
     // 未匹配模板
     // 未匹配模板
-    if (prefix === 'mode') {
+    if (prefix === 'mode' || prefix === 'all') {
       const redirectPath = replaceFullPath(route.fullPath)
       const redirectPath = replaceFullPath(route.fullPath)
       redirect(redirectPath)
       redirect(redirectPath)
       return
       return