소스 검색

确权调查移动端

wulanhaote
yujk 3 년 전
부모
커밋
84547acec2
1개의 변경된 파일10개의 추가작업 그리고 1개의 파일을 삭제
  1. +10
    -1
      src/views/authenticRight/index.vue

+ 10
- 1
src/views/authenticRight/index.vue 파일 보기

@@ -113,7 +113,7 @@
:rules="[{ required: true, message: '请填写被核查人姓名' }]"
>
<template #button>
<van-uploader :after-read="afterRead" v-model="fileList" :preview-image="false" :max-count="1" capture="camera" accept="image/*">
<van-uploader :after-read="afterRead" v-model="fileList" :max-size="4 * 1024 * 1024" @oversize="onOversize" :preview-image="false" :max-count="1" capture="camera" accept="image/*">
<van-button icon="photograph" type="primary" size="mini">扫描身份证</van-button>
</van-uploader>
</template>
@@ -638,6 +638,15 @@

},
methods:{
onOversize(){
this.$toast({
icon: 'error', // 找到自己需要的图标
message: '文件大小超过4MB,上传失败',
duration:"1000",
onClose:function(){
}
})
},
afterRead(file) {
const data = new FormData();
data.append("file", this.fileList[0].file);


불러오는 중...
취소
저장