From eb09a2640cbc80de82f67e9131aa0300899ebbe2 Mon Sep 17 00:00:00 2001
From: jhzh <1628036192@qq.com>
Date: Mon, 30 Jun 2025 15:19:53 +0800
Subject: [PATCH] 1

---
 src/page/authentication/index.vue |   71 ++++++++++++++++++++++++++++-------
 1 files changed, 57 insertions(+), 14 deletions(-)

diff --git a/src/page/authentication/index.vue b/src/page/authentication/index.vue
index f66a74b..a8512c2 100644
--- a/src/page/authentication/index.vue
+++ b/src/page/authentication/index.vue
@@ -1,14 +1,22 @@
 <template>
   <div class="bank_card_page">
+    <van-nav-bar
+      :placeholder="true"
+      :safe-area-inset-top="true"
+      title="KYC"
+      left-arrow
+      @click-left="$router.go(-1)"
+    >
+    </van-nav-bar>
     <div class="content">
-      <div class="top_back">
+<!--      <div class="top_back">
         <div class="left_back_icon" @click="$router.go(-1)">
           <img src="../../assets/img/zuojiantou.png" alt />
         </div>
-      </div>
-      <div class="titles">
+      </div> -->
+     <!-- <div class="titles">
         <span>{{ $t("hj146") }}</span>
-      </div>
+      </div> -->
       <div class="bank_name">
         <div class="lefts">
           <span>{{ $t("hj195") + ":" }}</span>
@@ -32,21 +40,21 @@
           <input
             v-if="showBtn"
             type="text"
-            placeholder="Please enter your ID card"
+            placeholder="Please enter your Aadhaar card"
             v-model="form.idCard"
           />
           <input v-if="!showBtn" type="text" v-model="form.idCard" readonly />
         </div>
       </div>
-      <!-- <div class="bank_name">
+      <div class="bank_name">
         <div class="lefts">
-          <span>{{ "Vaild Number" + ":" }}</span>
+          <span>{{ $t("电话号码") + ":" }}</span>
         </div>
         <div class="rights">
           <input
             v-if="showBtn"
             type="text"
-            placeholder="Please enter your ID card"
+            placeholder="Please enter your telephone number"
             v-model="form.vaildNumber"
           />
           <input
@@ -56,13 +64,13 @@
             readonly
           />
         </div>
-      </div> -->
+      </div>
       <div class="uploads">
         <div class="lefts">
           <el-upload
             :with-credentials="true"
             class="avatar-uploader"
-            :action="admin + '/user/upload.do'"
+            :action="admin + 'user/upload.do'"
             list-type="picture-card"
             name="upload_file"
             :show-file-list="false"
@@ -88,7 +96,7 @@
           <el-upload
             :with-credentials="true"
             class="avatar-uploader"
-            :action="admin + '/user/upload.do'"
+            :action="admin + 'user/upload.do'"
             list-type="picture-card"
             name="upload_file"
             :show-file-list="false"
@@ -198,11 +206,26 @@
     }
   },
   methods: {
+    checkImageFormat(url) {
+      const img = new Image();
+      img.onload = function() {
+        console.log('图片加载成功,格式正确');
+      };
+      img.onerror = function() {
+        console.log('图片加载失败,格式不支持');
+      };
+      img.src = url;
+    },
     handleAvatarSuccess(res, file) {
       this.imgStatus = false;
       this.form.img1key = res.data.url;
     },
     beforeAvatarUpload(file) {
+      const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
+      if (!isJpgOrPng) {
+        this.$message.error('只能上传 JPG 或 PNG 格式的图片!');
+      }
+      return isJpgOrPng;
       this.imgStatus = true;
     },
     handleError() {
@@ -213,6 +236,11 @@
       this.form.img2key = res.data.url; // URL.createObjectURL(file.raw);
     },
     beforeAvatarUpload2(file) {
+      const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
+            if (!isJpgOrPng) {
+              this.$message.error('Only images in JPG or PNG format can be uploaded!');
+            }
+            return isJpgOrPng;
       this.imgStatus2 = true;
       const isLt10M = file.size / 1024 / 1024 < 10;
       if (!isLt10M) {
@@ -317,15 +345,30 @@
 </script>
 
 <style scoped lang="less">
+  /deep/ .van-nav-bar__content {
+    height: 65px;
+  }
+  /deep/ .van-nav-bar__title {
+    font-family: "DINPro";
+    width: 100%;
+    height: 1.17333rem;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    font-style: normal;
+    font-weight: 500;
+    font-size: 0.48rem;
+    color: #14181f;
+  }
 .bank_card_page {
   width: 100%;
-  // height: 100%;
+  height: 100%;
   background: #fff;
   position: relative;
 
   .content {
     width: 100%;
-    height: 100%;
+    height: 100vh;
     padding: 0 0.6rem;
 
     .top_back {
@@ -422,7 +465,7 @@
 /deep/ .el-upload--picture-card {
   background: none;
   width: 100%;
-  height: 1.6rem;
+  height: 100PX;
   line-height: 1.6rem;
 }
 

--
Gitblit v1.9.3