Bladeren bron

bug 修复

lilei 1 jaar geleden
bovenliggende
commit
4d24c38261
2 gewijzigde bestanden met toevoegingen van 38 en 15 verwijderingen
  1. 19 6
      pages/login/login.vue
  2. 19 9
      pages/login/phoneLogin.vue

+ 19 - 6
pages/login/login.vue

@@ -13,8 +13,9 @@
 				</u-button>
 		    </view>
 		</view>
-		<view class="xieyi" @click="gotoXieyi()">
-			登录即代表您已阅读并同意 <text>《用户协议》和《隐私政策》</text>
+		<view class="xieyi" style="display: flex;align-items: center;padding:50upx 0;justify-content: center;font-size: 24rpx;">
+			<u-checkbox v-model="tyYd" shape="circle" style="width:25px;"></u-checkbox>
+			登录代表您已同意<text @click="gotoXieyi()">隐私政策、服务条款</text>
 		</view>
 	</view>
     
@@ -34,6 +35,7 @@
             return {
 				path: '/pages/index/index',
 				lanuch: false,
+				tyYd: false,
 				mobile: '',
 				code: '',
 				codeText: '获取验证码',
@@ -83,9 +85,20 @@
 		},
         methods: {
 			...mapMutations(['login']),
+			changeYd(v){
+				this.tyYd = v
+			},
 			// 微信授权登录
 			getPhoneNumber(e) {
 				let _this = this
+				if(!this.tyYd){
+					uni.showToast({
+						title: "请阅读并同意隐私政策、服务条款",
+						icon: "none"
+					})
+					return
+				}
+				
 				uni.showLoading({
 					mask: true,
 					title: '加载中'
@@ -179,12 +192,14 @@
 	.content{
 		width: 100%;
 		height: 100vh;
-		padding:0 125upx;
+		padding:0 25upx;
 		display: flex;
 		flex-direction: column;
 		text-align: center;
 		.content-body{
-			flex: 1;
+			padding:0 100upx;
+			flex-grow: 1;
+			height: 80%;
 			.logo{
 				display: inline-block;
 				margin:250upx 0 120upx;
@@ -195,8 +210,6 @@
 			}
 		}
 		.xieyi{
-			font-size: 24upx;
-			padding-bottom: 60upx;
 			text{
 				color:#1283d4
 			}

+ 19 - 9
pages/login/phoneLogin.vue

@@ -19,9 +19,10 @@
 				</u-form-item>
 			</u-form>
 		</view>
- 
-		<view class="xieyi" @click="gotoXieyi()">
-			登录即代表您已阅读并同意 <text>《用户协议》和《隐私政策》</text>
+  
+		<view class="xieyi" style="display: flex;align-items: center;padding:50upx 0;justify-content: center;font-size: 24rpx;">
+			<u-checkbox v-model="tyYd" shape="circle" style="width:25px;"></u-checkbox>
+			登录代表您已同意<text @click="gotoXieyi()">隐私政策、服务条款</text>
 		</view>
 		<!-- 图文验证码 -->
 		<uni-popup @change="changeModal" ref="imageTxtPopup" type="center">
@@ -60,6 +61,7 @@
 				codeText: '获取验证码',
 				getCodeing: false,
 				totalTime: 60,
+				tyYd: false,
 				yzmBtn: {
 					background: "#ffffff"
 				},
@@ -80,6 +82,9 @@
 		},
 		methods: {
 			...mapMutations(['login']),
+			changeYd(v){
+				this.tyYd = v
+			},
 			// 获取验证码
 			getCode() {
 				let sid = null
@@ -169,6 +174,13 @@
 			},
 			// 登录
 			bindLogin() {
+				if(!this.tyYd){
+					uni.showToast({
+						title: "请阅读并同意隐私政策、服务条款",
+						icon: "none"
+					})
+					return
+				}
 				let mobile = this.mobile
 				let openid = this.$store.state.vuex_openid
 				let code = this.code
@@ -217,10 +229,12 @@
 		flex-direction: column;
 		width: 100%;
 		height: 100vh;
-		padding: 0 125upx;
+		padding: 0 25upx;
 
 		.login-content {
-			flex: 1;
+			padding:0 100upx;
+			flex-grow: 1;
+			height: 80%;
 
 			.login-logo {
 				text-align: center;
@@ -233,10 +247,6 @@
 		}
 
 		.xieyi {
-			font-size: 24upx;
-			text-align: center;
-			padding-bottom: 60upx;
-
 			text {
 				color: #1283d4
 			}