<template>
	<view class="body">
		<view class="item" style="border-bottom: 1rpx solid #545454;">
			<view class="item-content">
				<image src="../../static/353.png" mode=""></image>
				<view class="text">
					{{name}}
				</view>
			</view>
			<image src="../../static/207.png" mode="" @click="contactUa()"></image>
		</view>
		<view class="item">
			<view class="item-content">
				<image src="../../static/355.png" mode=""></image>
				<view class="text">
					{{Regulation}}
				</view>
			</view>
			<image src="../../static/207.png" mode="" @click="Regulationa()"></image>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				name:"",
				Regulation:"",
			}
		},
		onLoad() {
			this.contactUs();
			this.Regulations();
			
		},
		methods: {
			//跳转页面
			contactUa(){
				uni.navigateTo({
					url:"./text?type=1"
				})
			},
			//跳转页面
			Regulationa(){
				uni.navigateTo({
					url:"./text?type=2"
				})
			},
			//联系我们(国外)
			async contactUs() {
				const res = await this.$myRequest({
					url: '/open/foreignHomePage/contactUs',
					header: {
						token: uni.getStorageSync("token"),
					},
				})
				if(res.data.code==200){
					if(res.data.data.length>0){
						this.name=res.data.data[0].name
					}
				}
				
			},
			//使用条例（国外）
			async Regulations() {
				const res = await this.$myRequest({
					url: '/open/foreignHomePage/Regulations',
					header: {
						token: uni.getStorageSync("token"),
					},
				})
				if(res.data.code==200){
					if(res.data.data.length>0){
						this.Regulation=res.data.data[0].name
					}
				}
				
			},
		}
	}
</script>

<style lang="scss">
    .body{
		padding-top: 80rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		background-color: #000000;
		min-height: 1340rpx;
		font-family: Arial-Regular;
		color: #FFFFFF;
		font-size: 28rpx;
		.item{
			display: flex;
			justify-content: space-between;
			width: 678rpx;
			height: 70rpx;
			margin-top: 30rpx;
			image{
				margin-left: 20rpx;
				margin-right: 24rpx;
				width: 48rpx;
				height: 48rpx;
			}
			.item-content{
				display: flex;
			}
		}
	}
</style>
