From 3df460667d74868d0a54fce12d5e881bbd6c0c1a Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期四, 17 九月 2026 17:11:18 +0800
Subject: [PATCH] 青岛维护统计
---
src/layout/components/AppMain.vue | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue
index 0c6f4b7..72d9569 100644
--- a/src/layout/components/AppMain.vue
+++ b/src/layout/components/AppMain.vue
@@ -1,5 +1,5 @@
<template>
- <section class="app-main">
+ <section class="app-main" :class="{ 'business-mode': isBusiness }">
<transition name="fade-transform" mode="out-in">
<keep-alive :include="cachedViews">
<router-view :key="key" />
@@ -17,6 +17,15 @@
},
key() {
return this.$route.path
+ },
+ isBusiness() {
+ return (this.$route.matched || []).some((r) => {
+ const cp = r.meta && r.meta.componentPath;
+ if (typeof cp !== 'string' || cp.indexOf('business/') !== 0) return false;
+ // 涓氬姟妯″潡鐨� index 鍒楄〃椤典笉闇�瑕侀檺瀹斤紱course/index 鏄鎯呴〉锛屼繚鐣欓檺瀹�
+ if (/^business\/[^/]+\/index$/.test(cp) && cp !== 'business/course/index') return false;
+ return true;
+ });
}
}
}
--
Gitblit v1.9.3