From fb74850a21ec54c3c67fceb31d038b2cf402c6c6 Mon Sep 17 00:00:00 2001
From: jhzh <1628036192@qq.com>
Date: Sun, 26 May 2024 10:36:40 +0800
Subject: [PATCH] 修改:客户反馈文档 5.24

---
 src/page/login/register.vue |   34 +++++++++++++++++++++++++++-------
 1 files changed, 27 insertions(+), 7 deletions(-)

diff --git a/src/page/login/register.vue b/src/page/login/register.vue
index c3a164c..fd7a863 100644
--- a/src/page/login/register.vue
+++ b/src/page/login/register.vue
@@ -8,6 +8,7 @@
       <div class="login_forms">
         <div class="top_forms">
           <el-input
+          style="width: 80%;"
             :placeholder="placeholder"
             size="medium"
             v-model="phone"
@@ -15,6 +16,12 @@
             @input="handleInput()"
           >
           </el-input>
+          <van-button
+            :disabled="(phone&&!countdown)?false:true"
+            type="info"
+            class="sendMailCode"
+            @click="sendCode"
+          >{{ $t("获取验证码") }}</van-button>
           <!-- <el-input style="margin-top: 0.46rem;" :placeholder="verification" :size="medium" v-model="code" clearable>
           </el-input> -->
           <el-input
@@ -44,7 +51,7 @@
             @input="handleInput()"
           >
           </el-input>
-          <div>
+         <!-- <div>
             <el-input
               style="margin-top: 0.46rem"
               :placeholder="$t('请输入邮箱号')"
@@ -59,7 +66,7 @@
               class="sendMailCode"
               @click="sendCode"
             >{{ $t("获取验证码") }}</van-button>
-          </div>
+          </div> -->
 
           <el-input
             style="margin-top: 0.46rem"
@@ -117,7 +124,8 @@
       checked: false,
       verification: this.$t("hj25"),
       loginWay: this.$t("hj26"),
-      placeholder: this.$t("hj27"),
+      placeholder: this.$t("regPhone2"),
+      // placeholder: 'phone',
       phone: "",
       userName: "",
       code: "",
@@ -135,16 +143,27 @@
       : "";
   },
   methods: {
+
     async sendCode(){
-      if (!this.email){
-        Notify({ type: "warning", message: this.$t("请输入邮箱号") })
+      if (!this.phone){
+        Notify({ type: "warning", message: this.$t("hj25") })
       }else {
         // 启动计时器
         this.startCountdown();
-        let data = await api.sendMailCode({email: this.email});
+        let data = await api.getyzmCode({phone: this.phone});
         console.log(data)
       }
     },
+    // async sendCode(){
+    //   if (!this.email){
+    //     Notify({ type: "warning", message: this.$t("请输入邮箱号") })
+    //   }else {
+    //     // 启动计时器
+    //     this.startCountdown();
+    //     let data = await api.sendMailCode({email: this.email});
+    //     console.log(data)
+    //   }
+    // },
     startCountdown() {
       this.countdown = 30; // 设置倒计时时间
       const intervalId = setInterval(() => {
@@ -191,7 +210,8 @@
             yzmCode: this.mailCode,
             userPwd: this.userPassword,
             agentCode: this.userName,
-            email: this.email
+            email: this.email,
+            phoneCode:this.mailCode,
           };
           let data = await api.register(opts);
           if (data.status === 0) {

--
Gitblit v1.9.3