<template>
	<view class="content">
		<u-parse :content="data"></u-parse>
	</view>
</template>

<script>
	import $api from '@/static/js/api.js'
	var that = ''
	export default {
		data() {
			return {
				data: '',
				index: ''
			}
		},
		onLoad(options) {
			that = this
			if(options.title) {
				uni.setNavigationBarTitle({
					title: options.title
				})
			}
			that.index = options.data
			that.getData()
		},
		methods: {
			getData() {
				$api.req({
					url: '/data/api.business.Login/getconfigset'
				}, function(res) {
					if (res.code == 1) {
						if(that.index == 0) {
							that.data = res.data.shop_service_agreement
						} else {
							that.data = res.data.shop_protection_policy
						}
					}
				})
			}
		},
	}
</script>

<style lang="scss" scoped>
	.content {
		padding: 20rpx;
	}
</style>