1
jhzh
2024-08-12 f1dc8f5a7f3a661ce19513a9ad47fe18e3e883ff
src/views/login/step2/idSet.vue
@@ -44,7 +44,7 @@
                        </div>
                        <div class="image_upload">
                          <div class="text-center">
                            <el-upload class="avatar-uploader" :action="`${nowUrl}/api/api/uploadFile`"
                            <el-upload class="avatar-uploader" :action="`${nowUrl}/wap/public/uploadimg!execute.action`"
                              :headers="uploadHeader" accept=".jpg,.jpeg,.png,.gif.JPG,.JPEG,.PNG,.GIF"
                              :show-file-list="false" :on-success="handelDoucumentsFront" :on-error="onErrorUpload"
                              :before-upload="beforeAvatarUpload">
@@ -56,7 +56,7 @@
                            <p>{{ $t("message.user.zhengjianzhengmian") }}</p>
                          </div>
                          <div class="text-center" style="margin: 0 10px">
                            <el-upload class="avatar-uploader" :action="`${nowUrl}/api/api/uploadFile`"
                            <el-upload class="avatar-uploader" :action="`${nowUrl}/wap/public/uploadimg!execute.action`"
                              :headers="uploadHeader" accept=".jpg,.jpeg,.png,.gif.JPG,.JPEG,.PNG,.GIF"
                              :show-file-list="false" :on-success="handelDoucumentsBack" :on-error="onErrorUpload"
                              :before-upload="beforeAvatarUpload">
@@ -67,8 +67,8 @@
                            </el-upload>
                            <p>{{ $t("message.user.zhengjianfanmian") }}</p>
                          </div>
                          <div class="text-center">
                            <el-upload class="avatar-uploader" :action="`${nowUrl}/api/api/uploadFile`"
                          <!-- <div class="text-center">
                            <el-upload class="avatar-uploader" :action="`${nowUrl}/wap/public/uploadimg!execute.action`"
                              :headers="uploadHeader" accept=".jpg,.jpeg,.png,.gif.JPG,.JPEG,.PNG,.GIF"
                              :show-file-list="false" :on-success="holdIdCardSuccess" :on-error="onErrorUpload"
                              :before-upload="beforeAvatarUpload">
@@ -78,7 +78,7 @@
                              </el-icon>
                            </el-upload>
                            <p>{{ $t("message.user.shouchizhengjianzhao") }}</p>
                          </div>
                          </div> -->
                        </div>
                        <!-- 拍摄示例 -->
                        <div class="label label_top">
@@ -141,7 +141,7 @@
    };
  },
  mounted() {
    this.nowUrl = "https://enjdhdg.site";
    this.nowUrl = "https://https://uni.eypmj.com";
    let interimToken = localStorage.getItem("spToken");
    if (interimToken) {
      this.getIdentify();
@@ -173,20 +173,26 @@
    //上传正面
    handelDoucumentsFront(res, file) {
      const { path, httpUrl } = res.data;
      this.oneImg = httpUrl;
      this.idFrontImg = path;
      // const { path, httpUrl } = res.data;
      // this.oneImg = httpUrl;
      const data = res.data;
      this.oneImg = `${this.nowUrl}/wap/public/showimg!showImg.action?imagePath=${data}`;
      this.idFrontImg = data;
    },
    //上传背面
    handelDoucumentsBack(res, file) {
      const { path, httpUrl } = res.data;
      this.twoImg = httpUrl;
      // const { path, httpUrl } = res.data;
      // this.twoImg = httpUrl;
      const path = res.data;
      this.twoImg = `${this.nowUrl}/wap/public/showimg!showImg.action?imagePath=${path}`;
      this.idBackImg = path;
    },
    //手持身份证
    holdIdCardSuccess(res, file) {
      const { path, httpUrl } = res.data;
      this.threeImg = httpUrl;
      // const { path, httpUrl } = res.data;
      // this.threeImg = httpUrl;
      const path = res.data;
      this.threeImg = `${this.nowUrl}/wap/public/showimg!showImg.action?imagePath=${path}`;
      this.handheldPhoto = path;
    },
@@ -229,18 +235,18 @@
        return;
      }
      if (!this.idFrontImg || !this.idBackImg || !this.handheldPhoto) {
      if (!this.idFrontImg || !this.idBackImg) {
        this.$message.warning(this.$t("message.user.shangchuan6"));
        return;
      }
      Axios.apply({
        nationality: this.nationality,
        idNumber: this.idNumber,
        idName: "id/passpost",
        idnumber: this.idNumber,
        idname: "id/passpost",
        name: this.name,
        idFrontImg: this.idFrontImg,
        idBackImg: this.idBackImg,
        handheldPhoto: this.handheldPhoto,
        idimg_1: this.idFrontImg,
        idimg_2: this.idBackImg,
        // idimg_3: this.handheldPhoto,
      }).then((res) => {
        if (res.code == "0") {
          this.$message.success(this.$t("message.user.bangdingchenggong"));
@@ -278,7 +284,7 @@
/* 图片上传 */
.image_upload {
  display: flex;
  justify-content: space-between;
  /* justify-content: space-between; */
}
.avatar-uploader .el-upload:hover {