<template>
	<view class="whole">
		<view class="box" v-html="content"></view>
	</view>
</template>

<script>
	import { ref, reactive, toRefs } from 'vue'
	import { get } from '@/api/request.js'
	export default {
		setup() {
			const data = reactive({
				content: ''
			})
			const getInfo = (type) => {
				get('/api/app/shop/aboutUs', { type: type }).then((res) => {
					data.content = res.data.content
				})
			}
			
			return {
				...toRefs(data),
				getInfo
			}
		},
		onLoad(options) {
			this.getInfo(options.type)
			uni.setNavigationBarTitle({
				title: options.text
			})
		}
	}
</script>

<style lang="scss" scoped>
	.whole{
		width: 100%;
		height: 100vh;
		background: #fff;
		overflow: auto;
	}
	.box{
		font-size: 28rpx;
		color: #333;
		padding: 30rpx;
		line-height: 52rpx;
	}
	
</style>