From c69ff22bf0f30cf0421e1a38c8619c520861564c Mon Sep 17 00:00:00 2001
From: PC-20250623MANY\Administrator <344137771@qq.com>
Date: Tue, 16 Sep 2025 17:29:03 +0800
Subject: [PATCH] 1

---
 src/page/login/register.vue |   96 ++++++++++++++++++++++++-----------------------
 1 files changed, 49 insertions(+), 47 deletions(-)

diff --git a/src/page/login/register.vue b/src/page/login/register.vue
index 9aa5d01..a3f4077 100644
--- a/src/page/login/register.vue
+++ b/src/page/login/register.vue
@@ -2,55 +2,37 @@
   <div class="login_page">
     <headers />
     <div class="login_title animated slideInDown">
-      <span>{{ $t("hj18") }}</span>
+      <span>{{ $t("hj15") }}</span>
     </div>
     <div class="logins_content">
       <div class="login_forms">
         <div class="top_forms">
           <div class="forms_title">{{ placeholder }}</div>
-          <el-input
-            :placeholder="$t('请输入')"
-            :size="medium"
-            v-model="phone"
-            clearable
-            @input="handleInput()"
-          >
+          <el-input :placeholder="$t('请输入')" :size="medium" v-model="phone" clearable @input="handleInput()">
+          </el-input>
+
+          <div class="forms_title">{{ $t("hj25") }}</div>
+          <el-input :placeholder="$t('请输入')" :size="medium" v-model="yzmCode" clearable @input="handleInput()">
+            <template slot="append">
+              <van-button type="info" size="small" @click="getYzm" :loading="djs > 0" :loading-text="djs + ''">
+                <span style="font-size: 14px;">{{ $t('获取验证码') }}</span>
+              </van-button>
+            </template>
           </el-input>
 
           <div class="forms_title">{{ $t("Password") }}</div>
-          <el-input
-            :placeholder="$t('hj19')"
-            :size="medium"
-            v-model="userPassword"
-            clearable
-            @input="handleInput()"
-          >
+          <el-input :placeholder="$t('hj19')" :size="medium" v-model="userPassword" clearable @input="handleInput()">
           </el-input>
 
           <div class="forms_title">{{ $t("hj20") }}</div>
-          <el-input
-            :placeholder="$t('请输入')"
-            :size="medium"
-            v-model="rePassword"
-            clearable
-            @input="handleInput()"
-          >
+          <el-input :placeholder="$t('请输入')" :size="medium" v-model="rePassword" clearable @input="handleInput()">
           </el-input>
 
           <div class="forms_title">{{ $t("hj21") }}</div>
-          <el-input
-            :placeholder="$t('请输入')"
-            :size="medium"
-            v-model="userName"
-            clearable
-            @input="handleInput()"
-          >
+          <el-input :placeholder="$t('请输入')" :size="medium" v-model="userName" clearable @input="handleInput()">
           </el-input>
         </div>
-        <div
-          class="radio-con"
-          style="display: flex; align-items: center; font-size: 14px"
-        >
+        <div class="radio-con" style="display: flex; align-items: center; font-size: 14px">
           <van-checkbox v-model="checked" @change="handleInput()">
             {{ $t("我已閱讀並同意") }}
           </van-checkbox>
@@ -59,13 +41,7 @@
           </span>
         </div>
         <div class="bottom_btns" :class="btnClass ? 'on' : 'off'">
-          <van-button
-            type="info"
-            :disabled="!btnClass"
-            class="butn"
-            @click="gook"
-            >{{ $t("立即注册") }}</van-button
-          >
+          <van-button type="info" :disabled="!btnClass" class="butn" @click="gook">{{ $t("立即注册") }}</van-button>
 
           <!-- <van-button
             type="info"
@@ -87,7 +63,7 @@
 import * as api from "@/axios/api";
 import { Notify } from "vant";
 import { mapMutations } from "vuex";
-
+import deTh from "@/utils/deTh";
 export default {
   components: {
     headers
@@ -99,14 +75,16 @@
       verification: this.$t("hj25"),
       loginWay: this.$t("hj26"),
       loginWay: this.$t("hj26"),
-      placeholder: this.$t("hj27"),
+      placeholder: this.$t("hj16"),
       phone: "",
       userName: "",
+      yzmCode: '',
       code: "",
       userPassword: "",
       btnClass: false,
       rePassword: "",
       medium: "medium",
+      djs: 0,
     };
   },
   mounted() {
@@ -121,6 +99,7 @@
     handleInput() {
       if (
         this.userPassword !== "" &&
+        this.yzmCode !== "" &&
         this.phone !== "" &&
         this.userPassword == this.rePassword &&
         this.userName != "" &&
@@ -129,6 +108,23 @@
         this.btnClass = true;
       } else {
         this.btnClass = false;
+      }
+    },
+    async getYzm() {
+
+      let data = await api.getsendmail({ email: this.phone });
+      if (data.status == 0) {
+        Notify({ type: 'primary', message: data.msg });
+
+        this.djs = 60;
+        let time = setInterval(() => {
+          this.djs--;
+          if (this.djs <= 0) {
+            clearInterval(time);
+          }
+        }, 1000);
+      } else {
+        Notify({ type: "warning", message: data.msg });
       }
     },
     async gook() {
@@ -151,7 +147,7 @@
           let opts = {
             // agentCode:'4023', // SR330001
             phone: this.phone,
-            yzmCode: "6666",
+            yzmCode: this.yzmCode,
             userPwd: this.userPassword,
             agentCode: this.userName
           };
@@ -190,6 +186,12 @@
 
 .radio-con {
   margin-top: 0.32rem;
+}
+
+/deep/ .el-input-group__append {
+  background: #13161e;
+  border: none !important;
+  size: .3rem;
 }
 
 /deep/ .van-checkbox__icon--checked .van-icon {
@@ -250,7 +252,7 @@
     color: #000;
     font-weight: 600 !important;
 
-    > span {
+    >span {
       font-weight: 600 !important;
     }
   }
@@ -287,7 +289,7 @@
         // background: #1e1e1e;
         border-radius: 0.3564rem;
 
-        > input {
+        >input {
           width: 100%;
           height: 100%;
           padding-left: 0.3564rem;
@@ -374,7 +376,7 @@
     align-items: center;
     justify-content: center;
 
-    > span {
+    >span {
       font-size: 0.3046rem;
       color: #000;
       background-color: #fff;
@@ -435,7 +437,7 @@
     width: 3rem;
     height: 3.5769rem;
 
-    > img {
+    >img {
       width: 100%;
       height: 100%;
     }

--
Gitblit v1.9.3