From 0df61bbe45cd6adf9de18074b5e978673247be85 Mon Sep 17 00:00:00 2001
From: zzzz <690498789@qq.com>
Date: Tue, 26 Mar 2024 00:05:55 +0800
Subject: [PATCH] 注册页面的客服地址错误

---
 src/page/authentication/index.vue |  229 ++++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 147 insertions(+), 82 deletions(-)

diff --git a/src/page/authentication/index.vue b/src/page/authentication/index.vue
index a7a5b53..f5e83dd 100644
--- a/src/page/authentication/index.vue
+++ b/src/page/authentication/index.vue
@@ -7,83 +7,148 @@
         </div>
       </div>
       <div class="titles">
-        <span>{{ $t('hj146') }}</span>
+        <span>{{ $t("hj146") }}</span>
       </div>
       <div class="bank_name">
         <div class="lefts">
-          <span>{{ $t('hj195') + ':' }}</span>
+          <span>{{ $t("hj195") + ":" }}</span>
         </div>
         <div class="rights">
-          <input v-if="showBtn" type="text" placeholder="Please enter your Name" v-model="form.name" />
+          <input
+            v-if="showBtn"
+            type="text"
+            placeholder="Please enter your Name"
+            v-model="form.name"
+          />
 
           <input v-if="!showBtn" type="text" v-model="form.name" readonly />
         </div>
       </div>
       <div class="bank_name">
         <div class="lefts">
-          <span>{{ $t('hj196') + ':' }}</span>
+          <span>{{ $t("hj196") + ":" }}</span>
         </div>
         <div class="rights">
-          <input v-if="showBtn" type="text" placeholder="Please enter your ID card" v-model="form.idCard" />
+          <input
+            v-if="showBtn"
+            type="text"
+            placeholder="Please enter your ID card"
+            v-model="form.idCard"
+          />
           <input v-if="!showBtn" type="text" v-model="form.idCard" readonly />
         </div>
       </div>
       <div class="bank_name">
         <div class="lefts">
-          <span>{{"Vaild Number"+':'}}</span>
+          <span>{{ "Vaild Number" + ":" }}</span>
         </div>
         <div class="rights">
-          <input v-if="showBtn" type="text" placeholder="Please enter your ID card" v-model="form.vaildNumber" />
-          <input v-if="!showBtn" type="text" v-model="form.vaildNumber" readonly />
+          <input
+            v-if="showBtn"
+            type="text"
+            placeholder="Please enter your ID card"
+            v-model="form.vaildNumber"
+          />
+          <input
+            v-if="!showBtn"
+            type="text"
+            v-model="form.vaildNumber"
+            readonly
+          />
         </div>
       </div>
-      <!-- <div class="uploads">
+      <div class="uploads">
         <div class="lefts">
-          <el-upload :with-credentials="true" class="avatar-uploader" :action="admin + '/user/upload.do'"
-            list-type="picture-card" name="upload_file" :show-file-list="false" :on-success="handleAvatarSuccess"
-            :on-error="handleError" :before-upload="beforeAvatarUpload" :disabled="!showBtn">
-            <img v-if="form.img1key" :src="form.img1key" class="id-img avatar" style="width: 100%;height: 100%;" />
+          <el-upload
+            :with-credentials="true"
+            class="avatar-uploader"
+            :action="admin + '/user/upload.do'"
+            list-type="picture-card"
+            name="upload_file"
+            :show-file-list="false"
+            :on-success="handleAvatarSuccess"
+            :on-error="handleError"
+            :before-upload="beforeAvatarUpload"
+            :disabled="!showBtn"
+          >
+            <img
+              v-if="form.img1key"
+              :src="form.img1key"
+              class="id-img avatar"
+              style="width: 100%; height: 100%"
+            />
             <i v-else class="iconfont icon-zhaopian"></i>
-            <span v-if="!form.img1key && !imgStatus" class="btn-title">{{$t('hj197')}}</span>
-            <span v-if="imgStatus" class="btn-title">{{$t('hj198')}}</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">
-          <el-upload :with-credentials="true" class="avatar-uploader" :action="admin + '/user/upload.do'"
-            list-type="picture-card" name="upload_file" :show-file-list="false" :on-success="handleAvatarSuccess2"
-            :on-error="handleError2" :before-upload="beforeAvatarUpload2" :disabled="!showBtn">
-            <img v-if="form.img2key" :src="form.img2key" class="id-img avatar" style="width: 100%;height: 100%;"/>
+          <el-upload
+            :with-credentials="true"
+            class="avatar-uploader"
+            :action="admin + '/user/upload.do'"
+            list-type="picture-card"
+            name="upload_file"
+            :show-file-list="false"
+            :on-success="handleAvatarSuccess2"
+            :on-error="handleError2"
+            :before-upload="beforeAvatarUpload2"
+            :disabled="!showBtn"
+          >
+            <img
+              v-if="form.img2key"
+              :src="form.img2key"
+              class="id-img avatar"
+              style="width: 100%; height: 100%"
+            />
             <i v-else class="iconfont icon-zhaopian"></i>
-            <span v-if="!form.img2key && !imgStatus2" class="btn-title">{{$t('hj199')}}</span>
-            <span v-if="imgStatus2" class="btn-title">{{$t('hj198')}}</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>
       <div class="bank_name bind" @click="toSure" v-if="showBtn">
-        <span>{{ $t('hj161') }}</span>
+        <span>{{ $t("hj161") }}</span>
       </div>
       <van-notify v-model="messFlag" type="primary">
         <div>
           <div class="eft">
-            <span>{{ $t('hj200') }}</span>
+            <span>{{ $t("hj200") }}</span>
           </div>
           <div class="bft">
-            <span>{{ $t('hj201') }}:{{ this.$store.state.userInfo.authMsg }}</span>
+            <span
+              >{{ $t("hj201") }}:{{ this.$store.state.userInfo.authMsg }}</span
+            >
           </div>
         </div>
       </van-notify>
       <div class="pass">
         <div class="top_t">
-          <img  v-if="this.$store.state.userInfo.isActive == 1" src="../../../static/img/bd_shz.png"/>
-          <span v-if="this.$store.state.userInfo.isActive == 1" class="ise_pass">{{ $t('hj202') }}</span>
-          <img  v-if="!showBtn && this.$store.state.userInfo.isActive != 1" src="../../../static/img/bd_suessce.png"/>
-          <span v-if="!showBtn && this.$store.state.userInfo.isActive != 1">{{ $t('hj203') }}</span>
-          <img v-if="showBtn" src="../../../static/img/bd_fail.png"/>
-          <span v-if="showBtn" class="ise_pass">{{ $t('hj204') }}</span>
+          <img
+            v-if="this.$store.state.userInfo.isActive == 1"
+            src="../../../static/img/bd_shz.png"
+          />
+          <span
+            v-if="this.$store.state.userInfo.isActive == 1"
+            class="ise_pass"
+            >{{ $t("hj202") }}</span
+          >
+          <img
+            v-if="!showBtn && this.$store.state.userInfo.isActive != 1"
+            src="../../../static/img/bd_suessce.png"
+          />
+          <span v-if="!showBtn && this.$store.state.userInfo.isActive != 1">{{
+            $t("hj203")
+          }}</span>
+          <img v-if="showBtn" src="../../../static/img/bd_fail.png" />
+          <span v-if="showBtn" class="ise_pass">{{ $t("hj204") }}</span>
         </div>
       </div>
     </div>
-
   </div>
 </template>
 
@@ -101,10 +166,10 @@
         phone: "",
         name: "",
         idCard: "",
-        vaildNumber:"",
+        vaildNumber: "",
         img1key: "",
         img2key: "",
-        img3key: ""
+        img3key: "",
       },
       img1Key: "",
       img2Key: "",
@@ -113,7 +178,7 @@
       admin: "",
       imgStatus: false,
       imgStatus2: false,
-      messFlag: this.$store.state.userInfo.isActive == 3 ? true : false
+      messFlag: this.$store.state.userInfo.isActive == 3 ? true : false,
     };
   },
   created() {
@@ -132,7 +197,7 @@
       document.body.classList.add("red-bg");
     }
     this.admin = process.env.API_HOST;
-    console.log(this.admin)
+    console.log(this.admin);
     if (this.admin == undefined) {
       this.admin = "https://api.guosen.org";
     }
@@ -157,11 +222,11 @@
       // const _that = this
       const isLt10M = file.size / 1024 / 1024 < 10;
       if (!isLt10M) {
-        this.$message.error(this.$t('hj205'));
+        this.$message.error(this.$t("hj205"));
         return false;
       } else {
         this.form.img2key = URL.createObjectURL(file);
-        compress(file, function (val) { });
+        compress(file, function (val) {});
       }
     },
     handleError2() {
@@ -171,32 +236,32 @@
       this.form.img3key = res.data.url; // URL.createObjectURL(file.raw);
     },
     async getUserInfo() {
-    // 获取用户信息
-    let data = await api.getUserInfo();
-    if (data.status === 0) {
-      // 判断是否登录
-      this.$store.commit('dialogVisible', false);
-      this.$store.state.userInfo = data.data;
-      this.userInfo = data.data;
-      if (
-        this.$store.state.userInfo.isActive === 1 ||
-        this.$store.state.userInfo.isActive === 2
-      ) {
-        this.form.idCard = this.$store.state.userInfo.idCard;
-        this.form.vaildNumber = this.$store.state.userInfo.vaildNumber;
-        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;
+      // 获取用户信息
+      let data = await api.getUserInfo();
+      if (data.status === 0) {
+        // 判断是否登录
+        this.$store.commit("dialogVisible", false);
+        this.$store.state.userInfo = data.data;
+        this.userInfo = data.data;
+        if (
+          this.$store.state.userInfo.isActive === 1 ||
+          this.$store.state.userInfo.isActive === 2
+        ) {
+          this.form.idCard = this.$store.state.userInfo.idCard;
+          this.form.vaildNumber = this.$store.state.userInfo.vaildNumber;
+          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;
+        }
+      } else {
+        //this.$store.commit('dialogVisible',true);
+        //跳转到login
+        this.$router.push({ path: "/login" });
       }
-    } else {
-      //this.$store.commit('dialogVisible',true);
-      //跳转到login
-      this.$router.push({ path: "/login" });
-    }
-  },
-    beforeAvatarUpload3(file) { },
+    },
+    beforeAvatarUpload3(file) {},
     // 上传
     handleFile: function (e) {
       // var that = this
@@ -206,14 +271,14 @@
       console.log(file, "file");
       let i = false;
       if (i) {
-        Toast(this.$t('hj206'));
+        Toast(this.$t("hj206"));
       } else {
         // Indicator.open('Loading...')
         this.img1Key = file;
         // this.$refs.formDate.submit()
         // this.uploadIdImg({upload_file:file})
         var reader = new FileReader();
-        reader.onload = data => {
+        reader.onload = (data) => {
           let res = data.target || data.srcElement;
           this.form.img1Key = res.result;
           // Indicator.close()
@@ -227,15 +292,15 @@
     toSure() {
       // 实名认证弹框
       if (isNull(this.form.name)) {
-      // if (isNull(this.form.name) || !isName(this.form.name)) {
-        Toast(this.$t('hj207'));
+        // if (isNull(this.form.name) || !isName(this.form.name)) {
+        Toast(this.$t("hj207"));
       } else if (isNull(this.form.idCard)) {
-        Toast(this.$t('hj208'));
+        Toast(this.$t("hj208"));
       }
       // else if (isNull(this.form.img1key) || isNull(this.form.img2key)) {
       //   Toast(this.$t('hj209'));
       // }
-       else {
+      else {
         // 显示确认弹窗
         this.toAuthentication();
       }
@@ -246,11 +311,11 @@
         idCard: this.form.idCard,
         vaildNumber: this.form.vaildNumber,
         img2key: this.form.img2key,
-        img3key: this.form.img3key
+        img3key: this.form.img3key,
       };
       let data = await api.userAuth(opts);
       if (data.status === 0) {
-        Toast(this.$t('hj210'));
+        Toast(this.$t("hj210"));
         this.goBack();
       } else {
         Toast(data.msg);
@@ -258,8 +323,8 @@
     },
     goBack() {
       this.$router.back(-1);
-    }
-  }
+    },
+  },
 };
 </script>
 
@@ -279,7 +344,7 @@
       width: 100%;
       height: 2rem;
 
-      >div {
+      > div {
         width: 10%;
         height: 100%;
         display: flex;
@@ -344,7 +409,7 @@
   display: flex;
   align-items: center;
   justify-content: center;
-  background: #5C288C;
+  background: #5c288c;
   font-size: 0.4103rem;
   color: #fff;
 
@@ -360,7 +425,7 @@
   justify-content: space-between;
   margin-top: 0.3rem;
 
-  >div {
+  > div {
     width: 48%;
     background: rgb(247, 247, 247);
   }
@@ -397,13 +462,13 @@
     font-size: 80px;
     color: #3ac23e;
     align-items: center;
-    img{
-    width: 64px;
-    height: 64px;
-    margin-top: 200px;
-    margin-bottom: 20px;
+    img {
+      width: 64px;
+      height: 64px;
+      margin-top: 200px;
+      margin-bottom: 20px;
     }
-    span{
+    span {
       font-size: 30px;
     }
   }

--
Gitblit v1.9.3