6 changed files with 163 additions and 60 deletions
-
69src/assets/styles/index.scss
-
8src/assets/styles/style.scss
-
8src/router/index.js
-
58src/views/activityDetail.vue
-
67src/views/activityFeed.vue
-
13src/views/libraryIntroduction.vue
@ -0,0 +1,58 @@ |
|||
<template> |
|||
<!-- 活动咨询 --> |
|||
<div class="content-main introduction-main"> |
|||
<div class="nav-menu"> |
|||
<ul> |
|||
<li :class="{ 'is-active': selectMenuIndex === 0 }" @click="selectMenuChange(0)">活动资讯</li> |
|||
<li :class="{ 'is-active': selectMenuIndex === 1 }" @click="selectMenuChange(1)">活动预告</li> |
|||
</ul> |
|||
</div> |
|||
<div class="introduction-info" v-html="rawHtml" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { libraryIntro } from '@/api/inquiryMachine' |
|||
|
|||
export default { |
|||
name: 'ActivityFeed', |
|||
data() { |
|||
return { |
|||
selectMenuIndex: 0, |
|||
itemParams: null, |
|||
rawHtml: '' |
|||
} |
|||
}, |
|||
created() { |
|||
this.itemParams = JSON.parse(localStorage.getItem('activityDetail')) |
|||
if (JSON.parse(localStorage.getItem('selectIndex')) === 1) { |
|||
this.selectMenuIndex = 1 |
|||
} else { |
|||
this.selectMenuIndex = 0 |
|||
} |
|||
this.getIntroductionInfo() |
|||
}, |
|||
mounted() { |
|||
}, |
|||
methods: { |
|||
selectMenuChange(index) { |
|||
this.selectMenuIndex = index |
|||
this.$router.push('/ActivityFeed') |
|||
localStorage.setItem('selectMenuIndex', JSON.stringify(this.selectMenuIndex)) |
|||
}, |
|||
getIntroductionInfo() { |
|||
const introType = this.itemParams.overType |
|||
const libcode = this.itemParams.libcode |
|||
const overId = this.itemParams.overId |
|||
libraryIntro({ introType: introType, libcode: libcode, overId: overId }).then(res => { |
|||
this.rawHtml = res |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
@import "~@/assets/styles/index.scss"; |
|||
|
|||
</style> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue