<template>
	<view class="container login">
		<view class="login-main">
			<text class="logo-titl">本页面协销人员不用填写！</text>
			<text class="logo-text">点击右上方<text class="sp">···</text>，选择“发送给朋友”，把该页面发送给该机构人员填写，填写好之后对方就能成为该机构的运营人员</text>
		</view>
		<view class="login-form clearfix">
			<view class="login-input">
				<input type="text" 
					   v-model="bindLinkName"  
					   maxlength="30" 
					   class="input" 
					   disabled="true"
					   placeholder="请输入姓名"
				/>
			</view>
		</view>
		<view class="login-form clearfix">
			<view class="login-input">
				<input type="number" 
					   v-model="bindLinkPhone"  
					   maxlength="11" 
					   class="input" 
					   disabled="true"
					   placeholder="请输入手机号"
				/>
			</view>
		</view>
		<view class="login-form clearfix">
			<view class="login-input code">
				<input type="text" 
					   v-model="imageCode"  
					   maxlength="4" 
					   class="input" 
					   disabled="true"
					   placeholder="请输入右侧图形验证码"
				/>
			</view>
			<view class="login-input img-btn">
				<view class="vscodeimg">
					<image :src="imageCodeUrl" mode=""></image>
				</view>
				<view class="vscod-refresh">
					<text class="iconfont"></text>
					<text class="ref-text"></text>
				</view>
			</view>
		</view>
		<view class="login-form clearfix">
			<view class="login-input code">
				<input type="number" 
					   v-model="mobildeCode"  
					   maxlength="6" 
					   class="input" 
					   disabled="true"
					   placeholder="请输入短信验证码"
				/>
			</view>
			<view class="login-input btn disabled">
				<button type="button"
						disabled="true"
					    class="input">
						{{ mobileCodeText }}
				</button>
			</view>
		</view>
		<view class="login-form clearfix">
			<view class="login-btn"  @click="bindWechatInfo">确定</view>
		</view>
	</view>
</template>

<script>
	import { mapState,mapMutations } from 'vuex'
	import authorize from '@/common/config/authorize.js' 
	import { bindingWechat } from "@/api/use.js"
	import { getImageCode, getbindWechatCode } from "@/api/utils.js"
	export default{
		data() {
			return{
				userID:'',
				imageCodeUrl:'',
				mobileCodeText:'获取验证码'
			}
		},
		onLoad(option) {
			console.log(option)
			this.getVerificationCode()
		},
		methods:{
			getVerificationCode(){//图形验证
				getImageCode().then(res => {
					this.imageCodeUrl = res.data.baseImage
				})
			},
		},
		onShareAppMessage(res){//分享转发
			if (res.from === 'button') {
		      // 来自页面内转发按钮
		      console.log(res.target)
		    }
			return {
			  title: '快来成为机构运营人员吧~',
			  path: 'pages/login/bindOperator',
			  imageUrl:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/%E5%BF%AB%E6%9D%A5%E6%88%90%E4%B8%BA%E6%9C%BA%E6%9E%84%E8%BF%90%E8%90%A5%E4%BA%BA%E5%91%98%403x.png'
			}
		},
		onShow() {
			
		}
	}
</script>

<style lang="scss">
	.login{
		width: 100%;
		height: auto;
		border-top: 1px solid #F7F7F7;
		.model-warp.none{
			display: none;			
		}
		.model-warp.show{
			display: block;
		}
		.login-main{
			width: 702rpx;
			background: rgba(225, 86, 22, 0.1);
			display: flex;
			flex-direction: column;
			height: 142rpx;
			padding: 20rpx 24rpx;
			margin: 24rpx 0 118rpx 0;
			.logo-titl{
				font-size: 24rpx;
				line-height: 34rpx;
				color:$text-color;
				margin-bottom: 40rpx;
			}
			.logo-text{
				font-size: 24rpx;
				line-height: 34rpx;
				color: $color-system;
				.sp{
					color: #000000;
					font-weight: bold;
				}
			}
		}
		.login-form{
			width: 702rpx;
			height: auto;
			padding: 0 24rpx;
			.login-input{
				width: 654rpx;
				height: 40rpx;
				padding: 24rpx;
				margin-bottom: 20rpx;
				background: #F7F7F7;
				border-radius: 14rpx;
				display: flex;
				flex-direction: column;
				align-items: center;
				&.code{
					width: 370rpx;
					float: left;
					margin-right: 20rpx;
				}
				&.btn{
					width: 258rpx;
					height: 88rpx;
					padding: 0;
					float: left;
					background: $btn-confirm;
					.input{
						width: 258rpx;
						height: 88rpx;
						line-height: 88rpx;
						padding: 0;
						border-radius: 14rpx;
						color: #FFFFFF;
						background: $btn-confirm;
					}
					&.disabled{
						background: #F7F7F7;
						.input{
							background: #F7F7F7;
							color: #999999;
						}
					}
				}
				&.img-btn{
					width: 250rpx;
					height: 88rpx;
					padding: 0;
					float: left;
					background: #FFFFFF;
					display: block;
					.vscodeimg{
						width: 180rpx;
						height: 88rpx;
						float: left;
						display: flex;
						flex-direction: column;
						align-items: center;
						border-radius: 14rpx;
						image{
							width: 180rpx;
							height: 88rpx;
							border-radius: 14rpx;
						}
					}
					.vscod-refresh{
						width: 70rpx;
						float: right;
						display: flex;
						flex-direction: column;
						align-items: center;
						.icon-shuaxin{
							font-size: 48rpx;
							color: #333333;
						}
						.ref-text{
							font-size: 24rpx;
							color: #333333;
						}
					}
				}
				.input{
					width: 100%;
					height: 100%;
					background: #F7F7F7;
					font-size: $font-size-28;
					line-height: 40rpx;
					color: #333333;
					border-radius: 14rpx;
				}
			}
		}
		.login-btn{
			width: 702rpx;
			height: 88rpx;
			border-radius: 14rpx;
			font-size: $font-size-28;
			line-height: 88rpx;
			color: #FFFFFF;
			margin: 0 auto;
			text-align: center;
			background: $btn-confirm;
			margin-top: 100rpx;
		}
		.model-authorization{
			width: 100%;
			height: 100%;
			position: fixed;
			top: 0;
			left: 0;
			z-index: 999;
			.authorization{
				width: 518rpx;
				height: 320rpx;
				position: absolute;
				background: rgba(255,255,255,.7);
				left: 0;
				right: 0;
				bottom: 0;
				top: 0;
				margin: auto;
				.to-btn{
					position: absolute;
					top: 0;
					left: 0;
					right: 0;
					bottom: 0;
					margin: auto;
					width: 70%;
					height: 88rpx;
					font-size: $font-size-28;
					line-height: 88rpx;
					color: #FFFFFF;
					text-align: center;
					border-radius: 44rpx;
				}
			}
		}
	}
</style>
