From 534b8c32bbad7474b18653bcce0c742319fb5b39 Mon Sep 17 00:00:00 2001
From: zhaoxiaoqiang <287285524@qq.com>
Date: Fri, 05 Aug 2022 15:04:53 +0800
Subject: [PATCH] 上传

---
 src/components/upload/uploadIdCard.vue |   23 ++++++++++++-----------
 1 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/src/components/upload/uploadIdCard.vue b/src/components/upload/uploadIdCard.vue
index a21ddc4..7ac9a64 100644
--- a/src/components/upload/uploadIdCard.vue
+++ b/src/components/upload/uploadIdCard.vue
@@ -1,7 +1,7 @@
 <!--
  * @Date: 2019-08-30 18:04:49
  * @LastEditors: zxq
- * @LastEditTime: 2022-08-05 14:56:46
+ * @LastEditTime: 2022-08-05 15:04:19
  * @Description:
  -->
 <template>
@@ -31,9 +31,9 @@
       :actions="nav"
       @select="handleMenuSelect"
     ></van-action-sheet> -->
-    <van-action-sheet v-model="selectModel" cancel-text="取消" title="标题">
+    <van-action-sheet v-model="selectModel" cancel-text="取消" title="上传身份证">
       <div class="content">
-        <div class="upload_input">
+        <div class="upload_input" @click="handleMenuSelect">
                 <div>拍照</div>
                 <input
                   style="cursor:pointer;width:100%;opacity:0;"
@@ -45,7 +45,7 @@
                   capture="camera"
                 />
           </div>
-          <div class="upload_input">
+          <div class="upload_input" @click="handleMenuSelect">
               <div>本地相册上传</div>
               <input
                   style="cursor:pointer;width:100%;opacity: 0;"
@@ -110,6 +110,7 @@
     ...mapMutations([SET_APP_LOADING]),
     // 处理图片上传的事件(deleteIndex---删除图片的索引)
     handlePhotoChange: function(evt,type) {
+      this.selectModel = false;
       let that = this;
       let shebei = this.judgeBrand(navigator.userAgent.toLowerCase());
       that.SET_APP_LOADING(true);
@@ -325,12 +326,11 @@
     },
     // 选择拍照或者相册选项
     handleMenuSelect(index) {
-      console.log( this.$children[0]  )
-      if (index === 0) {
-        this.$refs.androidInputFileCapture.click();
-      } else {
-        this.$refs.androidInputFileImage.click();
-      }
+      // if (index === 0) {
+      //   this.$refs.androidInputFileCapture.click();
+      // } else {
+      //   this.$refs.androidInputFileImage.click();
+      // }
       this.selectModel = false;
     },
     // 处理图片的删除
@@ -375,11 +375,12 @@
 <style lang="less"  >
 .component-photo-upload {
   .upload_input{
-    font-size: 14px;
+    font-size: 16px;
     width: 100%;
     height: 45px;
     position: relative;
     text-align: center;
+    margin-top: 10px;
     input{
       position: absolute;
       left: 0;

--
Gitblit v1.8.0