<template>
    <view class="container">
       <view class="logo">
		   <view class="" style="width: 120rpx;">
		   		   <image src="../../static/cffp_logo.jpg" alt="" mode="widthFix"></image>
		   </view>
		   <text>欢迎使用CFFP</text>
	   </view>
	   <view class="inviteInfo">
		   <text>{{invitationName}}邀请您申请为</text>
		   <text>{{areaName}}{{levelaName}}</text>
	   </view>
	   <view class="register" @click="ckregister()">
		   <text>点击注册</text>
	   </view>
    </view>
</template>
<script>
	import api from "@/api/api"
    export default {
        data() {
            return {
				areaName:'',
				invitationName:'',
				shareId:'',
				levelaName:'',
				mobileNumber:'',
				name:''
            }
        },
		onLoad(options) {
			this.shareId = options.shareId
			this.getqueryById()
		},
		methods:{
			getqueryById(){
				api.queryById({id:this.shareId}).then(res =>{
					this.areaName = res.data.data.areaName
					this.invitationName = res.data.data.invitationName
					this.name = res.data.data.name
					this.mobileNumber = res.data.data.mobileNumber
					this.levelaName = res.data.data.partnerLevel == 'B1' ?'工作室': '事业合作伙伴'
				})
			},
			ckregister(){
		// '		let dataForm = {
		// 			name: this.name,
		// 			mobile: this.mobileNumber,
		// 			id:this.shareId
		// 		};'
				uni.navigateTo({
					// url:'/pages/invitationRegister/invitationlogin?name=' +  this.name+'&mobile=' +this.mobileNumber + '&id=' + this.shareId
					url:`/pages/invitationRegister/invitationlogin?name=${this.name}&mobile=${this.mobileNumber}`
					
				})
			}
		}
    }
</script> 

<style lang="scss">
	.container{
		height: 100%;
		background: url('../../static/app-plus/registerBg.png') 100% 100%; 
		background-size: contain;
		color: #fff;
		.logo{
			padding-top: 100rpx;
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;
			border-radius: 30rpx;
			overflow: hidden;
			font-size: 40rpx;
			image{
				margin-bottom: 20rpx;
				width: 160rpx;
				height: 160rpx;
				border-radius: 30rpx;
				overflow: hidden;
			}
		}
		.inviteInfo{
			position: absolute;
			bottom: 60%;
			left: 0;
			right: 0;
			width: 100%;
			text-align: center;
			font-size: 40rpx;
			display: flex;
			flex-direction: column;
		}
	}
	.register{
		position: absolute;
		bottom: 20%;
		left: 0;
		right: 0;
		margin: 0 auto;
		width: 60%;
		height: 100rpx;
		border-radius: 80rpx;
		background-color: #20269B;
		color: #fff;
		font-size: 36rpx;
		display: flex;
		justify-content: center;
		align-items: center;
	}
</style>