<template>
	<view class="container">
		<u-navbar title="入会协议" placeholder="true" :auto-back="true" bg-color="#F1F3F9" left-icon-size="24"></u-navbar>
		<view class="title">
			{{xydata.title}}
		</view>
		<rich-text :nodes="xydata.content"></rich-text>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue'

	import {
		agreement
	} from '@/api/memberCenter'
import { onShow } from '@dcloudio/uni-app'

	const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/')
	const xydata = ref({})

	onShow(async () => {
		agreement().then(res => {
			console.log(res);
			xydata.value = res.data
		})
	})
</script>

<style scoped lang="scss">
	.container {
		height: 100vh;
		width: 100%;
		display: grid;
		align-content: flex-start;
		justify-items: center;

		.title {
			margin-top: 40rpx;
			margin-bottom: 20rpx;
		}
	}
</style>