<template>
    <view class="container">
       <view class="logo">
		   <view class="" style="width: 120rpx;">
				<image :src="imgSrc" alt="" mode="widthFix"></image>
		   </view>
		   <text>欢迎使用{{areaName}}</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"
	import {companyInfo} from "@/environments/environment";
    export default {
        data() {
            return {
				areaName: companyInfo.companyName,
				imgSrc:'../../static/logo2.png',
				//imgSrc: '../../static/cffp_logo.png',
				invitationName:'',
				shareId:'',
				levelaName:'',
				mobileNumber:'',
				name:'',
				companyType:'',
            }
        },
		onLoad(options) {
			this.shareId = options.shareId
			this.invitationCode = options.invitationCode
			this.companyType = options.companyType;
			if(this.companyType == '1'){
				this.imgSrc = '../../static/cffp_logo.png';
				this.areaName = '赢盾财务顾问';
			}
			this.getqueryById()
		},
		methods:{
			getqueryById(){
				api.queryById({id:this.shareId}).then(res =>{
					//this.areaName = res.data.data.areaName
					this.areaId = res.data.data.areaId
					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' ?'工作室': '合伙人'
					this.partnerLevel = res.data.data.partnerLevel
				})
			},
			ckregister(){
				uni.navigateTo({
					url:`/pages/invitationRegister/invitationlogin?companyType=${this.companyType}&name=${this.name}&mobile=${this.mobileNumber}&shareId=${this.shareId}`
				})
			}
		}
    }
</script> 

<style lang="scss" scoped>
	.container{
		height: 100vh;
		background: url('../../static/app-plus/registerBg.png') 30% 30% no-repeat; 
		background-size: cover;
		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>
