Преглед на файлове

认证通默认模板修改

yuwenjun1997 преди 2 години
родител
ревизия
4bebefe79d
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      middleware/intercept.js

+ 2 - 2
middleware/intercept.js

@@ -34,7 +34,7 @@ function isFixedTemplate(authUserId) {
 
 // 修改路由
 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
   })
 }
@@ -61,7 +61,7 @@ async function initTemplateEntry(context) {
     const prefix = route.name.split('-')[1]
 
     // 未匹配模板
-    if (prefix === 'mode') {
+    if (prefix === 'mode' || prefix === 'all') {
       const redirectPath = replaceFullPath(route.fullPath)
       redirect(redirectPath)
       return