From 0edf94722a0dcc338567fec7df76b2e0acd39b92 Mon Sep 17 00:00:00 2001
From: YM <479443481@qq.com>
Date: 星期一, 27 五月 2024 15:30:48 +0800
Subject: [PATCH] 调整

---
 src/pages/Register/Register.vue |  110 ++++++++++++++++++++----------------------------------
 1 files changed, 41 insertions(+), 69 deletions(-)

diff --git a/src/pages/Register/Register.vue b/src/pages/Register/Register.vue
index 2466e6d..532fc67 100644
--- a/src/pages/Register/Register.vue
+++ b/src/pages/Register/Register.vue
@@ -5,8 +5,8 @@
         class="Ttop flex flex-center flex-wrap"
         style="flex-direction: column"
       >
-        <view class=""></view>
-        <view class="" ref="Rtop">
+        <view ></view>
+        <view  ref="Rtop">
           <text class="login"></text>
           <text
             style="
@@ -32,10 +32,10 @@
             align-items: center;
           "
         >
-          <!-- <view class="" style="color: #244A7B;padding-bottom: .47rem;font-size: .3rem;font-weight: bold;">鐢ㄦ埛娉ㄥ唽</view> -->
+          <!-- <view  style="color: #244A7B;padding-bottom: .47rem;font-size: .3rem;font-weight: bold;">鐢ㄦ埛娉ㄥ唽</view> -->
           <view class="LoginBg"></view>
           <view
-            class=""
+            
             @click="BacktoLogin"
             style="
               cursor: pointer;
@@ -159,7 +159,7 @@
 import Footer1 from "@/components/footer/footer.vue";
 export default {
   components: {
-    Footer1,
+    Footer1
   },
   data() {
     // 瀵嗙爜
@@ -202,55 +202,55 @@
           {
             required: true,
             message: "璇疯緭鍏ョ櫥褰曡处鍙�",
-            trigger: "blur",
+            trigger: "blur"
           },
           {
             pattern: /^[a-zA-Z0-9]{3,15}$/,
             message: "璇疯緭鍏�3-15涓瓧绗︾殑瀛楁瘝鎴栨暟瀛�",
-            trigger: "blur",
-          }, // 鑷畾涔夋牎楠岃鍒欙紝浣跨敤姝e垯琛ㄨ揪寮�
+            trigger: "blur"
+          } // 鑷畾涔夋牎楠岃鍒欙紝浣跨敤姝e垯琛ㄨ揪寮�
         ],
         pass: [
           {
             required: true,
             message: "璇疯緭鍏ュ瘑鐮�",
-            trigger: "blur",
+            trigger: "blur"
           },
           {
             min: 6,
             max: 10,
             message: "瀵嗙爜闀垮害鍦� 6 鍒� 12 涓瓧绗�",
-            trigger: "blur",
+            trigger: "blur"
           },
           {
             validator: validatePass,
-            trigger: "blur",
-          },
+            trigger: "blur"
+          }
         ],
         checkPass: [
           {
             validator: validatePass2,
-            trigger: "blur",
-          },
+            trigger: "blur"
+          }
         ],
         cellphoneORmailbox: [
           {
             required: true,
             message: "璇疯緭鍏ユ墜鏈�",
-            trigger: "blur",
+            trigger: "blur"
           },
           {
             validator: this.validateContact,
-            trigger: "blur",
-          },
+            trigger: "blur"
+          }
         ],
         verifyCode: [
           {
             required: true,
             message: "璇疯緭鍏ラ獙璇佺爜",
-            trigger: "blur",
-          },
-        ],
+            trigger: "blur"
+          }
+        ]
       },
       // 鐧诲綍娉ㄥ唽妗�
       loginTrue: true,
@@ -262,51 +262,51 @@
         pass: "",
         checkPass: "",
         cellphoneORmailbox: null,
-        verifyCode: "",
+        verifyCode: ""
       },
       // 鐧诲綍鐢ㄦ埛璐﹀彿
       loginData: {
         // 璐﹀彿
         loginID: "",
-        pass: "",
+        pass: ""
       },
       // 閲嶇疆瀵嗙爜
       resetDataPass: {
         cellphoneORmailbox: null,
         verifyCode: "",
         newPass: "",
-        checkPass: "",
+        checkPass: ""
       },
       // 淇敼瀵嗙爜
       amendDataPass: {
         loginID: "",
         originalPass: "",
         newPass: "",
-        checkPass: "",
+        checkPass: ""
       },
       // 涔︾睄鏁版嵁
       listData: [
         {
           name: "涓尰浜虹墿鏁版嵁搴�",
-          id: 1,
+          id: 1
         },
         {
           name: "涓栧尰鍖诲鏁版嵁搴�",
-          id: 2,
+          id: 2
         },
         {
           name: "涓尰瀛︽湳娴佹淳",
-          id: 3,
+          id: 3
         },
         {
           name: "涓尰鍦板煙鍖昏氨",
-          id: 4,
+          id: 4
         },
         {
           name: "涓尰鍖讳簨鍒跺害",
-          id: 5,
-        },
-      ],
+          id: 5
+        }
+      ]
     };
   },
   onLoad() {
@@ -314,7 +314,7 @@
       success: function (info) {
         // console.log('灞忓箷鐨勫搴︼細' + info.windowWidth);
         // console.log('灞忓箷鐨勯珮搴︼細' + info.windowHeight);
-      },
+      }
     });
   },
   mounted() {
@@ -323,22 +323,16 @@
   methods: {
     // 鏈嶅姟鏉℃
     termOfServiceClick(number) {
-      // console.log(number);
       if (number == 1) {
-        console.log("鏈嶅姟鏉℃");
         window.open(`#/pages/userAgreement/userAgreement`);
-        // uni.navigateTo({
-        // 	url: '/pages/userAgreement/userAgreement'
-        // })
       } else if (number == 2) {
         window.open(`#/pages/userAgreement/userAgreement`);
-        console.log("鐢ㄦ埛闅愮淇濇姢鍜屼釜浜轰俊鎭潯娆�");
       }
     },
     // 宸叉湁璐﹀彿锛熻繑鍥炵櫥褰�
     BacktoLogin() {
       uni.redirectTo({
-        url: "/pages/Login/Login",
+        url: "/pages/Login/Login"
       });
     },
     // 鑾峰彇楠岃瘉鐮�
@@ -346,7 +340,7 @@
       if (!this.registerData.cellphoneORmailbox) {
         this.$message({
           message: "璇疯緭鍏ユ墜鏈猴紒",
-          type: "warning",
+          type: "warning"
         });
 
         return false;
@@ -355,7 +349,7 @@
         return;
       }
       let Obj = {
-        communicateParam: this.registerData.cellphoneORmailbox,
+        communicateParam: this.registerData.cellphoneORmailbox
       };
       this.countdown = 60;
       const intervalId = setInterval(() => {
@@ -366,13 +360,11 @@
         }
       }, 1000);
       let code = await getverifyCode(Obj);
-
     },
     // 鎵嬫満鍙�/鎴栬�呴偖绠�
     validateContact(rule, value, callback) {
       const regPhone = /^1[0-9]{10}$/;
       const regEmail = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
-      console.log(value, regPhone.test(value), regEmail.test(value));
       if (regPhone.test(value) || regEmail.test(value)) {
         callback(); // 鏍¢獙閫氳繃
       } else {
@@ -383,55 +375,35 @@
       this.$nextTick(() => {
         var width = this.$refs.Rtop.$el.clientWidth;
         this.Rtop1 = width + 50;
-        console.log("Element width:", width);
       });
     },
     // 鐢ㄦ埛娉ㄥ唽
     async Login(formName) {
-      console.log(formName);
       let Obj = {
         username: this.registerData.loginID,
         password: encryptAES(this.registerData.pass),
         communicateParam: this.registerData.cellphoneORmailbox,
-        verifyCode: this.registerData.verifyCode,
+        verifyCode: this.registerData.verifyCode
       };
       this.$refs[formName].validate(async (valid) => {
         if (valid) {
-          // alert('submit!');
-          console.log("sdfds");
           await getaddLogin(Obj).then((res) => {
-            console.log(res, "娉ㄥ唽鎴愬姛");
             if (res.success == true) {
-              uni.showToast({
-                title: res.errorText,
-                icon: "success",
-              });
+              this.$message.success("娉ㄥ唽鎴愬姛");
               uni.navigateTo({
-                url: "/pages/Login/Login",
+                url: "/pages/Login/Login"
               });
             } else {
-              uni.showToast({
-                title: res.errorText,
-                icon: "error",
-              });
+              this.$message.error(res.errorText);
             }
           });
-          // encryptAES
-          // uni.navigateTo({
-          // 	url: '/pages/Login/Login'
-          // })
         } else {
           console.log("error submit!!");
           return false;
         }
       });
-
-      // console.log(Obj, '鐢ㄦ埛鐧诲綍鐨勭櫥褰曟寜閽�');
-
-      // let res = await getaddLogin(Obj)
-      // console.log('sdfdsfs', res);
-    },
-  },
+    }
+  }
 };
 </script>
 <style scoped>

--
Gitblit v1.9.1