From a56c51ca08d7e8de00a22a3128ddce447c409079 Mon Sep 17 00:00:00 2001
From: dcc <dcc@163.com>
Date: Thu, 27 Jun 2024 10:15:11 +0800
Subject: [PATCH] 123

---
 src/api/login.js             |   11 ++++-
 src/i18n/th/login.js         |    3 +
 src/views/login/index.vue    |   17 ++++----
 src/i18n/de/login.js         |    3 +
 src/i18n/zh/login.js         |    1 
 src/i18n/it/login.js         |    3 +
 /dev/null                    |    0 
 src/i18n/kor/login.js        |    3 +
 src/i18n/jp/login.js         |    3 +
 src/i18n/en/login.js         |    1 
 src/i18n/fra/login.js        |    5 +-
 src/views/login/register.vue |   50 +++++++++++++++++-------
 src/i18n/cht/login.js        |    1 
 src/i18n/vie/login.js        |    3 +
 14 files changed, 71 insertions(+), 33 deletions(-)

diff --git a/dist.zip b/dist.zip
deleted file mode 100644
index 284dd44..0000000
--- a/dist.zip
+++ /dev/null
Binary files differ
diff --git a/src/api/login.js b/src/api/login.js
index 037da48..072b3c8 100644
--- a/src/api/login.js
+++ b/src/api/login.js
@@ -5,7 +5,7 @@
 }
 //获取邮箱或手机号的验证码
 function getVeriCode(data) {
-  return Axios.fetch("wap/api/idcode/execute", data);
+  return Axios.fetch("wap/api/idcode!execute.action", data);
 }
 
 //根据用户名和类型获取它的验证方式,用于重置密码界面,
@@ -32,7 +32,13 @@
 
 //手机号或邮箱注册
 function resgister(data) {
-  return Axios.fetch("wap/api/user/register", data);
+  return Axios.fetch("wap/api/localuser!registerNoVerifcode.action", data);
+}
+
+// https://mmai-web3.com/wap/api/user!setSafewordReg.action?safeword=123456&token=edd3b23a42734f2dbae44c20b8f600b0
+
+function setSafewordReg(data){
+  return Axios.fetch("wap/api/user!setSafewordReg.action", data);
 }
 
 ///通过谷歌验证器重置密码
@@ -56,4 +62,5 @@
   accountRegister,
   resetpswByGoogle,
   getServiceUrl,
+  setSafewordReg
 };
diff --git a/src/i18n/cht/login.js b/src/i18n/cht/login.js
index 53ce9ed..4339d8c 100644
--- a/src/i18n/cht/login.js
+++ b/src/i18n/cht/login.js
@@ -72,4 +72,5 @@
   woxiangyaochongzhi: "我想要充值",
   quchongzhi: "去充值",
   wancheng: "完成",
+  qsr_zhanghao6weiD: "請輸入帳戶6位以上字母和數字,開頭必須有大小寫字母",
 };
diff --git a/src/i18n/de/login.js b/src/i18n/de/login.js
index 440db8e..2a13ecd 100644
--- a/src/i18n/de/login.js
+++ b/src/i18n/de/login.js
@@ -70,5 +70,6 @@
     "woxiangyaomaibi": "Ich möchte Münzen kaufen",
     "woxiangyaochongzhi": "Ich möchte aufladen",
     "quchongzhi": "Zum Aufladen",
-    "wancheng": "beenden"
+    "wancheng": "beenden",
+    qsr_zhanghao6weiD: "Bitte geben Sie für Ihr Konto 6 oder mehr Buchstaben und Zahlen ein. Am Anfang müssen Groß- und Kleinbuchstaben stehen.",
 }
\ No newline at end of file
diff --git a/src/i18n/en/login.js b/src/i18n/en/login.js
index dd6ecba..2d059cb 100644
--- a/src/i18n/en/login.js
+++ b/src/i18n/en/login.js
@@ -67,4 +67,5 @@
   woxiangyaochongzhi: "I want to recharge",
   quchongzhi: "Go to recharge",
   wancheng: "Complete",
+  qsr_zhanghao6weiD: "Please enter an account number of 6 or more letters and numbers, and the beginning must contain uppercase and lowercase letters",
 };
diff --git a/src/i18n/fra/login.js b/src/i18n/fra/login.js
index f83935b..812a731 100644
--- a/src/i18n/fra/login.js
+++ b/src/i18n/fra/login.js
@@ -1,5 +1,5 @@
 export default {
-  "zhanghaozhuce": "Enregistrement d’un compte",
+    "zhanghaozhuce": "Enregistrement d’un compte",
     "anquanbangding": "Reliure sécurisée",
     "zhanghudenglu": "Connexion au compte",
     "chang1": "Connectez-vous avec votre adresse e-mail, votre numéro de téléphone ou votre code QR",
@@ -70,5 +70,6 @@
     "woxiangyaomaibi": "Je veux acheter des pièces",
     "woxiangyaochongzhi": "Je veux recharger",
     "quchongzhi": "Aller à la recharge",
-    "wancheng": "Finir"
+    "wancheng": "Finir",
+    qsr_zhanghao6weiD: "Veuillez saisir 6 lettres et chiffres ou plus pour votre compte. Il doit y avoir des lettres majuscules et minuscules au début.",
 }
\ No newline at end of file
diff --git a/src/i18n/it/login.js b/src/i18n/it/login.js
index 2bd9fda..e52cc43 100644
--- a/src/i18n/it/login.js
+++ b/src/i18n/it/login.js
@@ -70,5 +70,6 @@
   "woxiangyaomaibi": "Voglio comprare monete",
   "woxiangyaochongzhi": "Voglio ricaricare",
   "quchongzhi": "Vai alla ricarica",
-  "wancheng": "finire"
+  "wancheng": "finire",
+  qsr_zhanghao6weiD: "Inserisci 6 o più lettere e numeri per il tuo account. All'inizio devono essere presenti lettere maiuscole e minuscole.",
 }
\ No newline at end of file
diff --git a/src/i18n/jp/login.js b/src/i18n/jp/login.js
index 7a83861..6fc62c1 100644
--- a/src/i18n/jp/login.js
+++ b/src/i18n/jp/login.js
@@ -70,5 +70,6 @@
     "woxiangyaomaibi": "コインを買いたい",
     "woxiangyaochongzhi": "チャージしたい",
     "quchongzhi": "充電に移動",
-    "wancheng": "終える"
+    "wancheng": "終える",
+    qsr_zhanghao6weiD: "アカウントには 6 文字以上の文字と数字を入力してください。先頭には大文字と小文字が必要です。",
 }
\ No newline at end of file
diff --git a/src/i18n/kor/login.js b/src/i18n/kor/login.js
index 6d00bcc..5940f77 100644
--- a/src/i18n/kor/login.js
+++ b/src/i18n/kor/login.js
@@ -70,5 +70,6 @@
     "woxiangyaomaibi": "코인을 사고 싶어요.",
     "woxiangyaochongzhi": "충전하고 싶습니다.",
     "quchongzhi": "충전하러 가기",
-    "wancheng": "끝내다"
+    "wancheng": "끝내다",
+    qsr_zhanghao6weiD: "계정의 문자와 숫자를 6자 이상 입력하세요. 처음에는 대문자와 소문자가 있어야 합니다.",
 }
\ No newline at end of file
diff --git a/src/i18n/th/login.js b/src/i18n/th/login.js
index 23188df..625890e 100644
--- a/src/i18n/th/login.js
+++ b/src/i18n/th/login.js
@@ -70,5 +70,6 @@
     "woxiangyaomaibi": "ฉันต้องการซื้อเหรียญ",
     "woxiangyaochongzhi": "ฉันต้องการเติมเงิน",
     "quchongzhi": "ไปที่เติมเงิน",
-    "wancheng": "เสร็จ"
+    "wancheng": "เสร็จ",
+  qsr_zhanghao6weiD: "โปรดป้อนตัวอักษรและตัวเลขตั้งแต่ 6 ตัวขึ้นไปสำหรับบัญชีของคุณ ต้องมีตัวอักษรตัวพิมพ์ใหญ่และตัวพิมพ์เล็กนำหน้า",
 }
\ No newline at end of file
diff --git a/src/i18n/vie/login.js b/src/i18n/vie/login.js
index dfd550d..5052397 100644
--- a/src/i18n/vie/login.js
+++ b/src/i18n/vie/login.js
@@ -70,5 +70,6 @@
     "woxiangyaomaibi": "Tôi muốn mua tiền xu",
     "woxiangyaochongzhi": "Tôi muốn nạp tiền",
     "quchongzhi": "Đi đến nạp tiền",
-    "wancheng": "kết thúc"
+    "wancheng": "kết thúc",
+    qsr_zhanghao6weiD: "Vui lòng nhập 6 chữ cái và số trở lên cho tài khoản của bạn phải có chữ hoa và chữ thường ở đầu.",
 }
\ No newline at end of file
diff --git a/src/i18n/zh/login.js b/src/i18n/zh/login.js
index 2e4fe7e..368d6e8 100644
--- a/src/i18n/zh/login.js
+++ b/src/i18n/zh/login.js
@@ -72,4 +72,5 @@
   woxiangyaochongzhi: "我想要充值",
   quchongzhi: "去充值",
   wancheng: "完成",
+  qsr_zhanghao6weiD: "请输入账户6位及以上字母和数字,开头必须有大小写字母",
 };
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index 7f61fd7..66eb2d4 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -38,12 +38,12 @@
                 changeType == 0
                   ? t("youxiang")
                   : changeType == 1
-                  ? t("shoujihao")
+                  ? t("zhanghao")
                   : t("zhanghao")
               }}
             </div>
             <!-- 手机号 -->
-            <div class="css-hiy16i" v-if="changeType == 1">
+            <div class="css-hiy16i" v-if="changeType == 2">
               <div class="css-4cffwv">
                 <div class="border-countrycode" @click="tansferSelecCoun">
                   + {{ countryCodeStore.code }}
@@ -71,7 +71,7 @@
               </el-input>
             </div>
             <!-- 账号 -->
-            <div class="css-hiy16i" v-else-if="changeType == 2">
+            <div class="css-hiy16i" v-else-if="changeType == 1">
               <el-input
                 autocomplete="off"
                 type="email"
@@ -154,8 +154,9 @@
 const userStore = useUserStore();
 const countryCodeStore = useCountryCodeStore();
 const router = useRouter();
-const arrType = [t("youxiang"), t("shoujihao"), t("zhanghao")];
-const changeType = ref(2);
+// const arrType = [t("youxiang"), t("shoujihao"), t("zhanghao")];
+const arrType = [t("youxiang"), t("zhanghao")];
+const changeType = ref(1);
 const showverify = ref(false);
 const selectCountryRef = ref(null);
 const emailPd = ref({
@@ -194,9 +195,9 @@
     password: pwd,
   };
   showverify.value = true;
-  if (changeType.value == 1) {
-    data = { username: countryCodeStore.code + account, password: pwd };
-  }
+  // if (changeType.value == 1) {
+  //   data = { username: countryCodeStore.code + account, password: pwd };
+  // }
   if (data.username && data.password) {
     Axios.login({
       ...data,
diff --git a/src/views/login/register.vue b/src/views/login/register.vue
index 32c13d9..c2c6d6a 100644
--- a/src/views/login/register.vue
+++ b/src/views/login/register.vue
@@ -53,7 +53,7 @@
                       ? t('qsr_shoujihao')
                       : recordActive == 1
                       ? t('qsr_youxiang')
-                      : t('qsr_zhanghao6wei')
+                      : t('qsr_zhanghao6weiD')
                   "
                   clearable
                   v-model.trim="register.username"
@@ -121,7 +121,7 @@
               </div>
             </div>
 
-            <!-- 6.验证码 Verification code -->
+<!--            &lt;!&ndash; 6.验证码 Verification code &ndash;&gt;
             <div
               class="css-15651n7"
               v-if="recordActive == 0 || recordActive == 1"
@@ -142,7 +142,7 @@
                   </template>
                 </el-input>
               </div>
-            </div>
+            </div>-->
             <!-- 注册  -->
             <button
               data-bn-type="button"
@@ -153,7 +153,7 @@
             </button>
           </div>
           <div class="css-jhkvqo">
-            {{ t("zhuceguo") }}?&nbsp;
+            {{ t("zhuceguo") }}&nbsp;
             <div class="css-r3o9q9" @click="goLogin">
               {{ t("denglu") }}
             </div>
@@ -213,6 +213,8 @@
     type.value = 1;
   } else if (index == 1) {
     type.value = 2;
+  }else if (index == 2){
+    type.value = 1;
   }
   register.value = {
     username: "",
@@ -275,10 +277,10 @@
     return;
   }
 
-  if ([0, 1].includes(recordActive.value) && !verifcode) {
-    ElMessage.error(t("qsr_yanzhengma"));
-    return;
-  }
+  // if ([0, 1].includes(recordActive.value) && !verifcode) {
+  //   ElMessage.error(t("qsr_yanzhengma"));
+  //   return;
+  // }
 
   // 以上为验证不为空
   // 以下验证数据对不对
@@ -310,29 +312,47 @@
       Axios.resgister({
         username: account,
         password,
-        verifcode,
+        re_password: password,
+        // verifcode,
         usercode,
-        safeword,
         type: type.value,
       }).then((res) => {
         // 注册成功,存储账户信息
         if (res.code == 0) {
-          ElMessage.success(t("message.home.zhucechenggong"));
           setStorage("spToken", res.data.token);
           setStorage("username", res.data.username);
           userStore.updateUserInfo(res.data);
-          router.push("/idSet"); //去实名认证
+          Axios.setSafewordReg({safeword}).then((response) => {
+            console.log(response)
+            ElMessage.success(t("message.home.zhucechenggong"));
+            router.push("/idSet"); //去实名认证
+          })
         }
       });
     } else if (recordActive.value == 2) {
-      Axios.imageVerifica().then((res) => {
+      Axios.resgister({
+        username: account,
+        password,
+        re_password: password,
+        // verifcode,
+        usercode,
+        type: 3,
+      }).then((res) => {
         if (res.code == "0") {
-          ImageVerRef.value.isShowFunc(res.data, {
+          setStorage("spToken", res.data.token);
+          setStorage("username", res.data.username);
+          userStore.updateUserInfo(res.data);
+          Axios.setSafewordReg({safeword}).then((response) => {
+            console.log(response)
+            ElMessage.success(t("message.home.zhucechenggong"));
+            router.push("/idSet"); //去实名认证
+          })
+         /* ImageVerRef.value.isShowFunc(res.data, {
             username: account,
             password,
             usercode,
             safeword,
-          });
+          });*/
         }
       });
     }

--
Gitblit v1.9.3