<template>
	<view class="content">
		<view class="title">{{ info.title }}</view>
		<view class="main" v-html="info.content"></view>
	</view>
</template>

<script>
import { gginfo } from '@/api/index.js';
import { mapState, mapMutations } from 'vuex';
export default {
	data() {
		return {
			id: '',
			info: ''
		};
	},
	computed: {
		...mapState(['baseURL'])
	},
	onLoad(opt) {
		this.id = opt.id;
	},
	onShow() {
		this.loadData();
	},
	methods: {
		loadData() {
			gginfo({ id: this.id }).then(({ data }) => {
				this.info = data;
			});
		}
	}
};
</script>

<style lang="scss">
page,
.content {
	min-height: 100%;
	height: auto;
	background: #fff;
}
.title {
	padding: 0 40rpx;
	font-size: 40rpx;
	font-weight: bold;
	color: #fcd535;
}
.main {
	padding: 20rpx 40rpx;
}
</style>
