|
@@ -5,16 +5,19 @@
|
|
|
<div>
|
|
|
<div class="header">
|
|
|
<ul>
|
|
|
- <li class="active">新闻中心<i class="corner">4</i></li>
|
|
|
- <li>通知公告</li>
|
|
|
- <li>学习中心</li>
|
|
|
+ <li :class="{ active: sevenType === 0 }" @click="switchSevenType(0)">
|
|
|
+ 新闻中心<i class="corner">4</i>
|
|
|
+ </li>
|
|
|
+ <li :class="{ active: sevenType === 1 }" @click="switchSevenType(1)">通知公告</li>
|
|
|
+ <li :class="{ active: sevenType === 2 }" @click="switchSevenType(2)">学习中心</li>
|
|
|
</ul>
|
|
|
<span class="subTitle" @click="moreHandle">
|
|
|
<span>更多</span>
|
|
|
<i class="arrowRight"><ArrowRightBold /> </i>
|
|
|
</span>
|
|
|
</div>
|
|
|
- <div class="content"> <CardItemOne /></div>
|
|
|
+ <div class="content" v-if="sevenType === 0"> <CardItemOne /></div>
|
|
|
+ <div class="content" v-else> <CardItemSeven3 :type="sevenType" /></div>
|
|
|
</div>
|
|
|
<div>
|
|
|
<div class="header">
|
|
@@ -112,11 +115,26 @@ import CardItemFour from './components/CardItemFour2.vue'
|
|
|
import CardItemFive from './components/CardItemFive2.vue'
|
|
|
import CardItemSix from './components/CardItemSix.vue'
|
|
|
import CardItemSeven from './components/CardItemSeven.vue'
|
|
|
+import CardItemSeven3 from './components/CardItemSeven3.vue'
|
|
|
|
|
|
defineOptions({ name: 'Home' })
|
|
|
+const sevenType = ref<number>(0)
|
|
|
+const switchSevenType = (type: number): void => {
|
|
|
+ sevenType.value = type
|
|
|
+}
|
|
|
const router = useRouter()
|
|
|
const moreHandle = () => {
|
|
|
- router.push({ path: '/newsLook' })
|
|
|
+ if (sevenType.value === 0) {
|
|
|
+ router.push({ path: '/newsLook' })
|
|
|
+ } else if (sevenType.value === 1) {
|
|
|
+ router.push({
|
|
|
+ name: 'notice'
|
|
|
+ })
|
|
|
+ } else if (sevenType.value === 2) {
|
|
|
+ router.push({
|
|
|
+ name: 'learnCenter'
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
const operateClick = () => {
|
|
|
router.push({
|