|
@@ -0,0 +1,81 @@
|
|
|
+<template>
|
|
|
+ <div class="activity-terms">
|
|
|
+ <ol class="activity-terms-content">
|
|
|
+ <li v-for="(item, index) in contentList" :key="index" v-html="item.text"></li>
|
|
|
+ </ol>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { mixinHeader } from '@/utils/mixins/header'
|
|
|
+import { getActivityConfig } from '@/api/modules'
|
|
|
+export default {
|
|
|
+ name: 'activity-terms',
|
|
|
+ mixins: [mixinHeader],
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ pageLayoutConf: {},
|
|
|
+ query: {},
|
|
|
+ contentList: [
|
|
|
+ // {
|
|
|
+ // text: '本活动最终解释权归剑鱼标讯所有。'
|
|
|
+ // }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created () {
|
|
|
+ this.getQuery()
|
|
|
+ this.getConfig()
|
|
|
+ this.refreshTitle()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getQuery () {
|
|
|
+ const query = this.$route.query
|
|
|
+ this.query = query
|
|
|
+ },
|
|
|
+ refreshTitle () {
|
|
|
+ if (!this.query.title) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.pageLayoutConf.title = decodeURIComponent(this.query.title)
|
|
|
+ this.mergePageConf()
|
|
|
+ },
|
|
|
+ async getConfig () {
|
|
|
+ // ?id=Rw==
|
|
|
+ const id = this.query.id
|
|
|
+ if (!id) {
|
|
|
+ return this.$toast('缺少活动id')
|
|
|
+ }
|
|
|
+ const { error_code: code, error_msg: msg, data } = await getActivityConfig({ id })
|
|
|
+ if (code === 0 && data) {
|
|
|
+ if (Array.isArray(data.rule)) {
|
|
|
+ this.contentList = data.rule
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$toast(msg || '请求失败')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped lang="scss">
|
|
|
+::v-deep {
|
|
|
+ a,
|
|
|
+ .terms-link {
|
|
|
+ color: blue;
|
|
|
+ }
|
|
|
+}
|
|
|
+ol {
|
|
|
+ padding-left: 20px;
|
|
|
+}
|
|
|
+ol, li {
|
|
|
+ list-style-type: decimal;
|
|
|
+}
|
|
|
+.activity-terms {
|
|
|
+ padding: 16px;
|
|
|
+ color: #5F5E64;
|
|
|
+ font-size: 12px;
|
|
|
+ line-height: 24px;
|
|
|
+}
|
|
|
+</style>
|