Explorar o código

认证通默认模板修改

yuwenjun1997 %!s(int64=2) %!d(string=hai) anos
pai
achega
4bebefe79d
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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