<template>
	<view>
		<uni-popup ref="lending" type="center">
			<view class="lending_content">
				 <view class="lending_info">
					<rich-text :nodes="leviteInfo"></rich-text>
				 </view>
				 <view class="lending_btns">
					 <view @click="$refs.lending.close()">关闭</view>
				 </view>
			</view>
		</uni-popup>
	</view>
</template>

<script>
	export default {
		name:'userAgreement',
		data() {
			return {
				leviteInfo:''
			}
		},
		created() {
			this.getLeviteData()
		},
		onshow(){
			this.getLeviteData()
		},
		methods: {
			getLeviteData () {
				let that = this
				that.$request.get('/app-api/system/need-know/getByKey',{key:'5'}).then(res => {
					if(res.code == 0 && res.data){
						if(that.$lang.locale=='zh'){
							that.leviteInfo = res.data.contentZh
						}else{
							that.leviteInfo = res.data.contentEn
						}
					}
				})
			},
			open() {
				this.$refs.lending.open()
			}
		}
	}
</script>

<style scoped>
	
.lending_content{
	width: 520upx;
	padding: 40upx;
	margin: 0 auto;
	background-color: #fff;
	border-radius: 12upx;
}
.lending_info{
	font-size: 26upx;
	line-height: 46upx;
	color: #666;
	width: 100%;
	height: 720upx;
	overflow: auto;
}
.lending_btns{
	width: 100%;
	display: flex;
	margin-top: 20upx;
	align-items: center;
	font-size: 28upx;
	justify-content: space-around;
}
.lending_btns view{
	color: #fff;
	padding: 12upx 0;
	text-align: center;
	background-color: #3699FF;
	border-radius: 30upx;
	width: 200upx;
}

</style>
