index.vue 3.2 KB
Newer Older
芊里 已提交
1
<template>
L
213  
linju 已提交
2 3
	<view class="flex flex-column flex-1 w-750 bg-white" :class="{'hidden':!isShow}">
		<view v-if="isShow" class="flex-1 flex flex-column justify-start align-center">
L
linju 已提交
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
			<view class="w-630 flex flex-column">
				<!-- 顶部文字 -->
				<text class="font-32 font-blod pt-5">登陆后即可展示自己</text>
				<login-ikonw class="lgnin-iknow" :link="link" text="登录即表示同意用户协议和隐私政策"></login-ikonw>

				<!-- 登录框 (选择手机号所属国家和地区需要另行实现) -->
				<view class="phone-input-box round flex flex-row flex-nowrap align-center justify-center">
					<picker mode="selector" :range="phoneArea" @change="selectPhoneArea">
						<text class="px-2 font-30">{{currenPhoneArea}}</text>
					</picker>
					<input type="number" class="flex-1 phone-input px-2 font-30" placeholder="请输入手机号"
						v-model="phoneNumber" />
				</view>

				<!-- tip -->
				<text class="text-sub font-26 tip-text">未注册的手机号验证通过后蒋自动注册</text>

				<!-- 发送按钮 -->
				<view class="send-btn-box flex w-630 justify-center align-center round" hover-class="hover"
					@click="sendShortMsg" :class="canGetShortMsg?'send-btn-active':''">
					<text class="text-white">获取短信验证码</text>
				</view>

				<!-- 其他登录方式 -->
				<view class="w-630 flex flex-row align-center justify-between">
					<text class="font-26 login-text" hover-class="hover" @click="toPwdLogin">密码登录</text>
					<text class="font-26 login-text" hover-class="hover" @click="openLoginList">其他登录方式</text>
				</view>
			</view>
芊里 已提交
33
		</view>
L
linju 已提交
34 35
		<!-- 登录按钮弹窗 -->
		<login-action-sheet ref="loginActionSheet"></login-action-sheet>
L
213  
linju 已提交
36
		<uni-quick-login @univerifyEnd="isShow = 1"></uni-quick-login>
芊里 已提交
37 38 39 40 41 42
	</view>
</template>

<script>
	export default {
		data() {
L
213  
linju 已提交
43 44
			return {
				isShow:false,
L
linju 已提交
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
				link: [{
					text: '用户协议',
					to: '/baidu.com'
				}, {
					text: '隐私政策',
					to: 'baidu'
				}],
				phoneArea: ['+86', '+87'],
				currenPhoneArea: '+86',
				phoneNumber: ''
			}
		},
		computed: {
			canGetShortMsg() {
				let reg = /^1\d{10}$/;
				return reg.test(this.phoneNumber);
芊里 已提交
61 62
			}
		},
L
linju 已提交
63 64 65 66 67 68 69 70 71 72 73 74
		methods: {
			selectPhoneArea(event) {
				this.currenPhoneArea = this.phoneArea[event.detail.value];
			},
			sendShortMsg() {
				if (!this.canGetShortMsg) return;
				/**
				 * 发送验证吗
				 */
			},
			/**
			 * 去密码登录页
芊里 已提交
75
			 */
L
linju 已提交
76 77 78 79 80 81 82
			toPwdLogin() {
				uni.navigateTo({
					url: './pwd-login'
				})
			},
			openLoginList() {
				this.$refs.loginActionSheet.open();
芊里 已提交
83 84 85 86 87
			}
		}
	}
</script>

L
213  
linju 已提交
88 89 90 91
<style>
	.hidden,page{
		background-color: transparent;
	}
L
linju 已提交
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
	@import url("../../common/myStyle.css");

	.lgnin-iknow {
		padding-top: 24rpx;
		padding-bottom: 48rpx;
	}

	.phone-input-box {
		height: 85rpx;
		background-color: #f9f9f9;
	}

	.phone-input {
		border-left-width: 1px;
		border-left-color: #d7d9d8;
	}

	.tip-text {
		padding-top: 20rpx;
		padding-bottom: 36rpx;
	}

	.send-btn-box {
		height: 85rpx;
		background-color: #d8d8da;
		margin-bottom: 50rpx;
	}

	.send-btn-active {
		background-color: #007aff;
	}

	.login-text {
		color: #1c436e;
芊里 已提交
126
	}
L
linju 已提交
127
</style>