Browse Source

登陆协议确认

chenjj 2 days ago
parent
commit
f031f4d6ea
2 changed files with 36 additions and 13 deletions
  1. 35 12
      pages/login.vue
  2. 1 1
      pages/mine.vue

+ 35 - 12
pages/login.vue

@@ -5,11 +5,7 @@
       <text class="title">金邻助家</text>
     </view>
 
-    <image
-      src="/static/13779@1x.png"
-      mode="widthFix"
-      class="house-illustration"
-    ></image>
+    <image src="/static/13779@1x.png" mode="widthFix" class="house-illustration"></image>
 
     <view class="slogan-content">
       <text class="slogan-text">着力打造全国居家服务行业标准</text>
@@ -25,12 +21,17 @@
     <view class="actions-container">
       <up-button
         custom-style="{ 'background-color': '#623F34', 'color': '#FFFFFF', 'border-radius': '25px', 'height': '50px', 'line-height': '50px', 'fontSize': '18px' }"
-        class="login-button"
-        @click="handleLogin"
-        >微信授权登录</up-button
-      >
+        class="login-button" @click="handleLogin">微信授权登录</up-button>
       <view class="xieyi text-center">
-        <text class="text-grey1">登录即代表同意</text>
+        <up-checkbox
+        label="我已认真阅读、理解并同意"
+        name="agree"
+        usedAlone
+        v-model:checked="checkboxValue"
+        class="text-grey1"
+    >
+    </up-checkbox>
+        <!-- <text class="text-grey1">我已认真阅读、理解并同意</text> -->
         <text @click="handleUserAgrement" class="text-blue">《用户协议》</text>
         <text @click="handlePrivacy" class="text-blue">《隐私协议》</text>
       </view>
@@ -55,6 +56,8 @@ const loginForm = reactive({
   uuid: '',
 })
 
+const checkboxValue = ref(false)
+
 // const codeUrl = ref(""); // Not used in the new design
 // const captchaEnabled = ref(true); // Not used in the new design
 
@@ -81,6 +84,16 @@ const handleUserAgrement = () => {
 
 // 登录方法
 const handleLogin = async () => {
+  console.log('checkboxValue',checkboxValue);
+  
+  if(!checkboxValue.value){
+    uni.showToast({
+      title: '请先阅读并同意相关协议',
+      icon: 'none',
+    })
+
+    return;
+  }
   uni.showLoading({
     title: '登录中,请耐心等待...',
   }) // 使用uni-app的loading方法替代$modal.loading
@@ -161,6 +174,13 @@ page {
   height: 100vh;
   width: 100%;
 }
+.radio-view{
+
+}
+
+.radio-active {
+
+}
 
 .normal-login-container {
   width: 100%;
@@ -214,7 +234,7 @@ page {
 
 .actions-container {
   width: 100%;
-  padding: 0 80rpx;
+  padding: 0 40rpx;
   position: absolute;
   bottom: 80rpx;
   left: 0;
@@ -234,7 +254,10 @@ page {
   .xieyi {
     margin-top: 24rpx;
     text-align: center;
-    
+    display: flex;
+    flex-wrap: wrap;
+    align-items: center;
+    justify-content: center;
     .text-grey1 {
       font-size: 24rpx;
       color: #333333;

+ 1 - 1
pages/mine.vue

@@ -100,7 +100,7 @@ const data = ref({
 	orderCount: 0,
 	orderFrozenBalance: 0
 });
-const rateValue = ref(3)
+const rateValue = ref(5)
 const priceList = [{
 	name: '账户余额',
 	key: 'balance',