From 83c81464327e274acb9d0694536a88d9aa74be30 Mon Sep 17 00:00:00 2001
From: DESKTOP-NC155IP\vm <tomuhu>
Date: Tue, 15 Nov 2022 09:51:11 +0800
Subject: [PATCH] 意思意思

---
 src/page/authentication/index.vue |   54 ++++++++++++++++++++++--------------------------------
 1 files changed, 22 insertions(+), 32 deletions(-)

diff --git a/src/page/authentication/index.vue b/src/page/authentication/index.vue
index f9ec095..89fe41d 100644
--- a/src/page/authentication/index.vue
+++ b/src/page/authentication/index.vue
@@ -7,11 +7,11 @@
         </div>
       </div>
       <div class="titles">
-        <span>{{ '实名认证' }}</span>
+        <span>{{ $t('hj146') }}</span>
       </div>
       <div class="bank_name">
         <div class="lefts">
-          <span>{{ '真实姓名:' }}</span>
+          <span>{{ $t('hj195') + ':' }}</span>
         </div>
         <div class="rights">
           <input v-if="showBtn" type="text" v-model="form.name" />
@@ -21,7 +21,7 @@
       </div>
       <div class="bank_name">
         <div class="lefts">
-          <span>{{ '身份证号:' }}</span>
+          <span>{{ $t('hj196') + ':' }}</span>
         </div>
         <div class="rights">
           <input v-if="showBtn" type="text" v-model="form.idCard" />
@@ -35,8 +35,8 @@
             :on-error="handleError" :before-upload="beforeAvatarUpload" :disabled="!showBtn">
             <img v-if="form.img1key" :src="form.img1key" class="id-img avatar" />
             <i v-else class="iconfont icon-zhaopian"></i>
-            <span v-if="!form.img1key && !imgStatus" class="btn-title">身份证正面</span>
-            <span v-if="imgStatus" class="btn-title">正在上传中...</span>
+            <span v-if="!form.img1key && !imgStatus" class="btn-title">{{$t('hj197')}}</span>
+            <span v-if="imgStatus" class="btn-title">{{$t('hj198')}}</span>
           </el-upload>
         </div>
         <div class="rights">
@@ -45,30 +45,30 @@
             :on-error="handleError2" :before-upload="beforeAvatarUpload2" :disabled="!showBtn">
             <img v-if="form.img2key" :src="form.img2key" class="id-img avatar" />
             <i v-else class="iconfont icon-zhaopian"></i>
-            <span v-if="!form.img2key && !imgStatus2" class="btn-title">身份证背面</span>
-            <span v-if="imgStatus2" class="btn-title">正在上传中...</span>
+            <span v-if="!form.img2key && !imgStatus2" class="btn-title">{{$t('hj199')}}</span>
+            <span v-if="imgStatus2" class="btn-title">{{$t('hj198')}}</span>
           </el-upload>
         </div>
       </div>
       <div class="bank_name bind" @click="toSure" v-if="showBtn">
-        <span>{{ '确定' }}</span>
+        <span>{{ $t('hj161') }}</span>
       </div>
       <van-notify v-model="messFlag" type="primary">
         <div>
           <div class="eft">
-            <span>{{ '认证失败,请重新认证' }}</span>
+            <span>{{ $t('hj200') }}</span>
           </div>
           <div class="bft">
-            <span>失败原因:{{ this.$store.state.userInfo.authMsg }}</span>
+            <span>{{ $t('hj201') }}:{{ this.$store.state.userInfo.authMsg }}</span>
           </div>
         </div>
       </van-notify>
     </div>
     <div class="pass">
       <div class="top_t">
-        <span v-if="this.$store.state.userInfo.isActive == 1" class="ise_pass">{{ '审核中' }}</span>
-        <span v-if="!showBtn && this.$store.state.userInfo.isActive != 1">{{ '通过' }}</span>
-        <span v-if="showBtn" class="ise_pass">{{ '未通过' }}</span>
+        <span v-if="this.$store.state.userInfo.isActive == 1" class="ise_pass">{{ $t('hj202') }}</span>
+        <span v-if="!showBtn && this.$store.state.userInfo.isActive != 1">{{ $t('hj203') }}</span>
+        <span v-if="showBtn" class="ise_pass">{{ $t('hj204') }}</span>
       </div>
     </div>
   </div>
@@ -104,17 +104,6 @@
   },
   created() {
     this.getUserInfo();
-    if (
-        this.$store.state.userInfo.isActive === 1 ||
-        this.$store.state.userInfo.isActive === 2
-      ) {
-        this.form.idCard = this.$store.state.userInfo.idCard;
-        this.form.name = this.$store.state.userInfo.realName;
-        this.form.img1key = this.$store.state.userInfo.img1Key;
-        this.form.img2key = this.$store.state.userInfo.img2Key;
-        //   this.form.img3key = this.$store.state.userInfo.img3Key
-        this.showBtn = false;
-      }
   },
  
   beforeDestroy() {
@@ -129,8 +118,9 @@
       document.body.classList.add("red-bg");
     }
     this.admin = process.env.API_HOST;
-    if (this.admin === undefined) {
-      this.admin = "";
+    console.log(this.admin)
+    if (this.admin == undefined) {
+      this.admin = "https://api.mitrade.cc";
     }
   },
   methods: {
@@ -153,7 +143,7 @@
       // const _that = this
       const isLt10M = file.size / 1024 / 1024 < 10;
       if (!isLt10M) {
-        this.$message.error("上传图片大小不能超过 10M!");
+        this.$message.error(this.$t('hj205'));
         return false;
       } else {
         this.form.img2key = URL.createObjectURL(file);
@@ -201,7 +191,7 @@
       console.log(file, "file");
       let i = false;
       if (i) {
-        Toast("您上传的照片过大,请选择20M以下的图片");
+        Toast(this.$t('hj206'));
       } else {
         // Indicator.open('Loading...')
         this.img1Key = file;
@@ -222,11 +212,11 @@
     toSure() {
       // 实名认证弹框
       if (isNull(this.form.name) || !isName(this.form.name)) {
-        Toast("请输入您的真实姓���");
+        Toast(this.$t('hj207'));
       } else if (isNull(this.form.idCard) || !idCardReg(this.form.idCard)) {
-        Toast("请输入您的正确的身份证号码");
+        Toast(this.$t('hj208'));
       } else if (isNull(this.form.img1key) || isNull(this.form.img2key)) {
-        Toast("请上传您的身份证照片");
+        Toast(this.$t('hj209'));
       } else {
         // 显示确认弹窗
         this.toAuthentication();
@@ -242,7 +232,7 @@
       };
       let data = await api.userAuth(opts);
       if (data.status === 0) {
-        Toast("提交成功!");
+        Toast(this.$t('hj210'));
         this.goBack();
       } else {
         Toast(data.msg);

--
Gitblit v1.9.3