<template>
	<view class="box">
		<!-- <image src="https://testy.hschool.com.cn//uploads/20241128/50fba75792a2d6478eeedcd0e2373772.png" mode="widthFix"
			class="backImg"></image> -->
			<rich-text :nodes="Negotiate"></rich-text>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				Negotiate:''
			};
		},
		onLoad() {
			this.getAgreement()
		},
		methods:{
			// 获取入驻协议文章
			getAgreement() {
				uni.$u.http.get('/api/index/agreement', {
					params: {}
				}).then(res => {
					if (res.code == 1) {
			
						this.Negotiate = (res.data.about_us).replace(/\<img/gi,
							'<img style="max-width:100%;height:auto" ');
					} else {
						uni.showToast({
							title: res.msg,
							icon: 'none',
							duration: 2000
						});
					}
				}).catch(error => {
					uni.showToast({
						title: '请求失败，请稍后再试',
						icon: 'none',
						duration: 2000
					});
				});
			},
		}
	}
</script>

<style lang="scss">
	.box {
		width: 750rpx;
		overflow-y: auto;
		/* 允许垂直滚动 */

		.backImg {
			width: 100%;
			/* 图片宽度占满容器 */
			height: auto;
			/* 图片高度自适应 */
		}
	}
</style>