From 679c8279ab2bfb1c87bab80126274a0aeaeb10e6 Mon Sep 17 00:00:00 2001
From: dcc <dcc@163.com>
Date: Mon, 13 May 2024 15:42:28 +0800
Subject: [PATCH] 注册增加个邮箱

---
 src/locales/taiyu.json      |    5 ++
 src/page/login/register.vue |   56 +++++++++++++++++++++++++++-
 src/locales/zh.json         |    5 ++
 src/locales/india.json      |    5 ++
 config/index.js             |    2 
 src/components/elalert.vue  |   12 +++---
 src/locales/tw.json         |    5 ++
 src/page/user/recharge.vue  |    2 
 src/axios/api.js            |    5 ++
 src/locales/en.json         |    5 ++
 src/locales/index.js        |    4 +-
 src/locales/hanyu.json      |    5 ++
 src/axios/api.url.js        |    2 
 src/locales/riyu.json       |    5 ++
 14 files changed, 98 insertions(+), 20 deletions(-)

diff --git a/config/index.js b/config/index.js
index 0cff526..56cdcb9 100644
--- a/config/index.js
+++ b/config/index.js
@@ -40,7 +40,7 @@
     },
 
     // Various Dev Server settings
-    host: "localhost", // can be overwritten by process.env.HOST
+    host: "192.168.0.103", // can be overwritten by process.env.HOST
     port: 80, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
     autoOpenBrowser: true,
     errorOverlay: true,
diff --git a/src/axios/api.js b/src/axios/api.js
index 0f99dcb..76ead32 100644
--- a/src/axios/api.js
+++ b/src/axios/api.js
@@ -66,6 +66,11 @@
   return post("/api/user/reg.do", options);
 }
 
+// 获取邮箱验证码
+export function sendMailCode(options) {
+  return post("/api/user/sendMailCode.do", options);
+}
+
 // 注销登录
 export function logout(options) {
   return post("/api/user/logout.do", options);
diff --git a/src/axios/api.url.js b/src/axios/api.url.js
index 8cc4fb5..1f2f38a 100644
--- a/src/axios/api.url.js
+++ b/src/axios/api.url.js
@@ -7,7 +7,7 @@
   // baseURL: '/',
   // baseURL: 'http://www.jumptalk.net:8091',
   // 0311
-  // baseURL: "http://192.168.0.105:8091/",
+  // baseURL: "http://192.168.0.111:8091/",
   baseURL: "https://brac.barcblays.com/",
   // 本地
   // baseURL: "http://192.168.0.102:8091/",
diff --git a/src/components/elalert.vue b/src/components/elalert.vue
index 275f6df..0a3c6f5 100644
--- a/src/components/elalert.vue
+++ b/src/components/elalert.vue
@@ -1,10 +1,10 @@
 <!--  -->
 <template>
     <div v-if="$store.state.elAlertShow">
-        <el-alert  :closable="closable" :title="$store.state.elAlertText" :type="$store.state.elAlertType" center style="z-index:99999999999999999;position: fixed;top: 0;bottom: 0;margin: auto;">
+        <el-alert  :closable="closable" :title="$t($store.state.elAlertText)" :type="$store.state.elAlertType" center style="z-index:99999999999999999;position: fixed;top: 0;bottom: 0;margin: auto;">
     </el-alert>
     </div>
-    
+
 </template>
 
 <script>
@@ -45,11 +45,11 @@
     },
     //生命周期 - 创建完成(访问当前this实例)
     created() {
-        
+
     },
     //生命周期 - 挂载完成(访问DOM元素)
     mounted() {
-        
+
     },
     methods:{
         //定时调用父组件方法关闭弹窗
@@ -59,7 +59,7 @@
                 this.$emit('closeAlert')
             },2000)
         },
-        
+
     }
 }
 </script>
@@ -73,4 +73,4 @@
     position: absolute;
     top: 50%;
 }
-</style>
\ No newline at end of file
+</style>
diff --git a/src/locales/en.json b/src/locales/en.json
index da6f692..329bdc1 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -551,5 +551,8 @@
   "申请杠杠成功,请联系客服!": "Successfully applied for leverage, please contact customer service!",
   "认缴成功": "Subscription successful",
   "印股冻结": "Print stock freeze",
-  "最低取款金额": "Minimum withdrawal amount"
+  "最低取款金额": "Minimum withdrawal amount",
+  "请登录": "please sign in",
+  "请输入邮箱号": "Please enter your email number",
+  "获取验证码": "get verification code"
 }
diff --git a/src/locales/hanyu.json b/src/locales/hanyu.json
index 7f9cdb6..cb9f45a 100644
--- a/src/locales/hanyu.json
+++ b/src/locales/hanyu.json
@@ -540,5 +540,8 @@
   "申请杠杠成功,请联系客服!": "바통 신청에 성공하였으니 고객센터에 연락 주세요!",
   "认缴成功": "구독 성공",
   "印股冻结": "인도주식동결",
-  "最低取款金额": "최소 출금 금액"
+  "最低取款金额": "최소 출금 금액",
+  "请登录": "로그인 해주세요",
+  "请输入邮箱号": "이메일 번호를 입력해주세요",
+  "获取验证码": "인증 코드 받기"
 }
diff --git a/src/locales/index.js b/src/locales/index.js
index a398b15..c341a9e 100644
--- a/src/locales/index.js
+++ b/src/locales/index.js
@@ -9,7 +9,7 @@
 
 Vue.use(VueI18n);
 
-const DEFAULT_LANG = "zh-TW";
+const DEFAULT_LANG = "en";
 const LOCALE_KEY = "language";
 
 const locales = {
@@ -39,7 +39,7 @@
 }
 let langLocale = window.localStorage.getItem(LOCALE_KEY)
   ? window.localStorage.getItem(LOCALE_KEY)
-  : "zh-TW";
+  : "en";
 console.log(langLocale)
 const i18n = new VueI18n({
   locale: langLocale,
diff --git a/src/locales/india.json b/src/locales/india.json
index 742589d..6533faf 100644
--- a/src/locales/india.json
+++ b/src/locales/india.json
@@ -551,5 +551,8 @@
   "申请杠杠成功,请联系客服!": "यदि आवेदन सफल होता है, तो कृपया ग्राहक सेवा से संपर्क करें!",
   "认缴成功": "सदस्यता सफल",
   "印股冻结": "भारतीय शेयर जम गए",
-  "最低取款金额": "न्यूनतम निकासी राशि"
+  "最低取款金额": "न्यूनतम निकासी राशि",
+  "请登录": "साइन इन करें",
+  "请输入邮箱号": "कृपया अपना ईमेल नंबर दर्ज करें",
+  "获取验证码": "सत्यापन कोड प्राप्त करें"
 }
diff --git a/src/locales/riyu.json b/src/locales/riyu.json
index 3430f29..94bba87 100644
--- a/src/locales/riyu.json
+++ b/src/locales/riyu.json
@@ -540,5 +540,8 @@
   "申请杠杠成功,请联系客服!": "鉄棒の申し込みに成功しました。カスタマーサービスに連絡してください。",
   "认缴成功": "購読が成功しました",
   "印股冻结": "インド株は凍結される",
-  "最低取款金额": "最低出金額"
+  "最低取款金额": "最低出金額",
+  "请登录": "サインインしてください",
+  "请输入邮箱号": "メール番号を入力してください",
+  "获取验证码": "確認コードを取得する"
 }
diff --git a/src/locales/taiyu.json b/src/locales/taiyu.json
index fa95d4a..10b4912 100644
--- a/src/locales/taiyu.json
+++ b/src/locales/taiyu.json
@@ -540,5 +540,8 @@
   "申请杠杠成功,请联系客服!": "สมัครบาร์สำเร็จโปรดติดต่อฝ่ายบริการลูกค้า!",
   "认缴成功": "สมัครสมาชิกสำเร็จ",
   "印股冻结": "หุ้นอินเดียถูกแช่แข็ง",
-  "最低取款金额": "จำนวนถอนขั้นต่ำ"
+  "最低取款金额": "จำนวนถอนขั้นต่ำ",
+  "请登录": "กรุณาเข้าสู่ระบบ",
+  "请输入邮箱号": "กรุณากรอกหมายเลขอีเมล์ของคุณ",
+  "获取验证码": "รับรหัสยืนยัน"
 }
diff --git a/src/locales/tw.json b/src/locales/tw.json
index 47826c0..df4db09 100644
--- a/src/locales/tw.json
+++ b/src/locales/tw.json
@@ -545,5 +545,8 @@
   "申请杠杠成功,请联系客服!": "申請槓槓成功,請聯繫客服!",
   "认缴成功": "認繳成功",
   "印股冻结": "印股凍結",
-  "最低取款金额": "最低提款金額"
+  "最低取款金额": "最低提款金額",
+  "请登录": "請登入",
+  "请输入邮箱号": "請輸入郵件號碼",
+  "获取验证码": "取得驗證碼"
 }
diff --git a/src/locales/zh.json b/src/locales/zh.json
index 2c71abc..5c13e0d 100644
--- a/src/locales/zh.json
+++ b/src/locales/zh.json
@@ -540,5 +540,8 @@
   "申请杠杠成功,请联系客服!": "申请杠杠成功,请联系客服!",
   "认缴成功": "认缴成功",
   "印股冻结": "印股冻结",
-  "最低取款金额": "Minimum withdrawal amount"
+  "最低取款金额": "Minimum withdrawal amount",
+  "请登录": "请登录",
+  "请输入邮箱号": "请输入邮箱号",
+  "获取验证码": "获取验证码"
 }
diff --git a/src/page/login/register.vue b/src/page/login/register.vue
index 52bd8b9..c3a164c 100644
--- a/src/page/login/register.vue
+++ b/src/page/login/register.vue
@@ -44,6 +44,31 @@
             @input="handleInput()"
           >
           </el-input>
+          <div>
+            <el-input
+              style="margin-top: 0.46rem"
+              :placeholder="$t('请输入邮箱号')"
+              size="medium"
+              v-model="email"
+              @input="handleInput()"
+            >
+            </el-input>
+            <van-button
+              :disabled="(email&&!countdown)?false:true"
+              type="info"
+              class="sendMailCode"
+              @click="sendCode"
+            >{{ $t("获取验证码") }}</van-button>
+          </div>
+
+          <el-input
+            style="margin-top: 0.46rem"
+            :placeholder="$t('hj25')"
+            size="medium"
+            v-model="mailCode"
+            @input="handleInput()"
+          >
+          </el-input>
         </div>
         <div
           class="radio-con"
@@ -92,7 +117,6 @@
       checked: false,
       verification: this.$t("hj25"),
       loginWay: this.$t("hj26"),
-      loginWay: this.$t("hj26"),
       placeholder: this.$t("hj27"),
       phone: "",
       userName: "",
@@ -100,6 +124,9 @@
       userPassword: "",
       btnClass: false,
       rePassword: "",
+      mailCode:"",
+      email: '',
+      countdown: 0
     };
   },
   mounted() {
@@ -108,6 +135,26 @@
       : "";
   },
   methods: {
+    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(() => {
+        if (this.countdown > 0) {
+          this.countdown -= 1;
+        } else {
+          clearInterval(intervalId);
+        }
+      }, 1000);
+    },
     handleInput() {
       if (
         this.userPassword !== "" &&
@@ -141,9 +188,10 @@
           let opts = {
             // agentCode:'4023', // SR330001
             phone: this.phone,
-            yzmCode: "6666",
+            yzmCode: this.mailCode,
             userPwd: this.userPassword,
             agentCode: this.userName,
+            email: this.email
           };
           let data = await api.register(opts);
           if (data.status === 0) {
@@ -443,4 +491,8 @@
 .agree-model {
   margin-top: 0.2rem;
 }
+
+.sendMailCode{
+  margin-top: 0.2rem;
+}
 </style>
diff --git a/src/page/user/recharge.vue b/src/page/user/recharge.vue
index 6f0c940..b657502 100644
--- a/src/page/user/recharge.vue
+++ b/src/page/user/recharge.vue
@@ -29,7 +29,7 @@
             :cancel-text="$t('qx')"
           />
         </template>
-        <div class="main-title">{{ $t("支持得支付渠道") }}</div>
+        <div class="main-title">IFSC</div>
         <van-cell
           is-link
           :title="paymentSelectData.channelAccount || $t('請選擇')"

--
Gitblit v1.9.3