From a4945c89ee72aa8b6f2c0a75653a3256a2b30b4f Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 16 五月 2024 19:02:57 +0800
Subject: [PATCH] 提交一把

---
 wx/pages/login/login.vue |   60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 59 insertions(+), 1 deletions(-)

diff --git a/wx/pages/login/login.vue b/wx/pages/login/login.vue
index f978d4a..820a1cb 100644
--- a/wx/pages/login/login.vue
+++ b/wx/pages/login/login.vue
@@ -25,6 +25,16 @@
 				<u-button text="绔嬪嵆鐧诲綍" shape="circle" color="#437CB3" size="large" @click="login"></u-button>
 			</view>
 		</view>
+		<view class="a">
+			<view style=" display: inline-flex;align-items: center;">
+				<checkbox-group  @change="onCheckboxChange" >
+					<checkbox    > </checkbox> 
+				</checkbox-group>
+			 鎴戝凡闃呰鍜屽悓鎰忋��
+			 <view class="c" @click="goAgreement(0)" style="color: dodgerblue;cursor: pointer">鏈嶅姟鍗忚</view>銆嬪拰銆�
+			 <view class="c"   @click="goAgreement(1)" style="color: dodgerblue;cursor: pointer">闅愮鍗忚</view>銆�
+			 </view>
+		</view>
 	</view>
 </template>
 
@@ -35,11 +45,26 @@
 				backgroundImg: require('@/static/background/login_bg@2x.png'),
 				from: {
 					username: '',
-					password: ''
+					password: '',
+					readed:false
 				}
 			};
 		},
 		methods: {
+			onCheckboxChange(e){
+				 let val = e.detail.value
+				    if(val.length>0){
+				      this.from.readed =true
+				    }else{
+				      this.from.readed =false
+				    } 
+				console.log(this.from.readed)
+			},
+			goAgreement(type){
+				uni.navigateTo({
+					url: `/pages/login/agreement?type=${type}`
+				})
+			},
 			login() {
 				var that = this;
 				if (!that.from.username) return uni.showToast({
@@ -48,6 +73,10 @@
 				})
 				if (!that.from.password) return uni.showToast({
 					title: '璇疯緭鍏ュ瘑鐮�',
+					icon: 'none'
+				})
+				if (!that.from.readed  ) return uni.showToast({
+					title: '璇峰厛闃呰鍜屽悓鎰忕敤鎴锋湇鍔¢殣绉佸崗璁�',
 					icon: 'none'
 				})
 				uni.login({
@@ -76,6 +105,35 @@
 </script>
 
 <style lang="scss" scoped>
+	.a{
+		font-size:12px;
+		bottom: 10px;
+		position: absolute;
+		width: 100%;
+		display: block;
+		text-align: center;
+	}
+	 .b{width: 12px;height: 12px;display: inline; }
+	 /* #ifdef MP-WEIXIN */
+	 checkbox {
+	 	transform: scale(0.67);
+	 	border-radius: 50rpx;
+	 }
+	 
+	 checkbox .wx-checkbox-input {
+	 	border-radius: 50%;
+	 	border-color: #AAAAAA !important;
+	 }
+	 
+	 checkbox .wx-checkbox-input.wx-checkbox-input-checked {
+	 	background: #f50;
+	 	border-color: #f50 !important;
+	 	color: #fff;
+	 }
+	 /* #endif */
+	 
+  
+	.c{font-size: 12px;color:darkblue; display: inline;}
 	.login {
 		width: 100vw;
 		height: 100vh;

--
Gitblit v1.9.3