身份证正面,文件更换

This commit is contained in:
2024-09-20 17:05:01 +08:00
parent 7b95507378
commit c3f859619f

View File

@ -16,7 +16,7 @@
<img class="startImg" src="@/assets/start.png" /> <img class="startImg" src="@/assets/start.png" />
<span>身份证正面</span> <span>身份证正面</span>
</div> </div>
<van-image style="width: 54px;height: 54px;" class="camerImg" v-if="identityCardFront" :src="identityCardFront" /> <van-image @click="handlePreview" @remove="handleRemove" style="width: 54px;height: 54px;" class="camerImg" v-if="identityCardFront" :src="identityCardFront" />
<el-upload <el-upload
v-else v-else
:action="baseURL + '/order/uploadImage'" :action="baseURL + '/order/uploadImage'"
@ -26,8 +26,6 @@
:before-upload="checkImgType" :before-upload="checkImgType"
class="upload-demo" class="upload-demo"
:show-file-list="false" :show-file-list="false"
:on-preview="handlePreview"
:on-remove="handleRemove"
> >
<van-icon slot="default" name="plus" style="font-size: 54px" /> <van-icon slot="default" name="plus" style="font-size: 54px" />
</el-upload> </el-upload>
@ -187,8 +185,8 @@ export default {
idCardAuthority:'', idCardAuthority:'',
idCardValidStartTime:'', idCardValidStartTime:'',
idCardValidEndTime:'', idCardValidEndTime:'',
authorization:{Authorization: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJzb25nIiwiYXVkIjpbInN1cHBsaWVyLWFwcCJdLCJuYmYiOjE3MjY4MDk4MTQsInVzZXJfaW5mbyI6eyJ1c2VySWQiOjU0NjU0LCJwaG9uZSI6IjE3NjMwMDM1NjU4IiwibmFtZSI6InNvbmciLCJzdXBwbGllck5hbWUiOiLkuIrmtbfmtYvor5XkvpvlupTllYYiLCJzdXBwbGllcklkIjozMzA0MSwic3VwcGxpZXJUeXBlIjoyLCJ1c2VybmFtZSI6InNvbmciLCJ1c2VyVHlwZSI6InJlc2N1ZUFwcCIsImRldmljZUlkIjoiMTkwZTM1ZjdlMTRhYzdjMDAwNyIsImF1dGhvcml0aWVzIjpbXX0sInNjb3BlIjpbImFsbCJdLCJpc3MiOiJodHRwczovL3Npbm9hc3Npc3QuY29tIiwiZXhwIjoxNzI2ODk2MjE0LCJpYXQiOjE3MjY4MDk4MTR9.5KTAMXZf8ll6HS4Z49YJQ1HiRvHr79Q1goDAGEtsBmY'}, // authorization:{Authorization: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJzb25nIiwiYXVkIjpbInN1cHBsaWVyLWFwcCJdLCJuYmYiOjE3MjY4MDk4MTQsInVzZXJfaW5mbyI6eyJ1c2VySWQiOjU0NjU0LCJwaG9uZSI6IjE3NjMwMDM1NjU4IiwibmFtZSI6InNvbmciLCJzdXBwbGllck5hbWUiOiLkuIrmtbfmtYvor5XkvpvlupTllYYiLCJzdXBwbGllcklkIjozMzA0MSwic3VwcGxpZXJUeXBlIjoyLCJ1c2VybmFtZSI6InNvbmciLCJ1c2VyVHlwZSI6InJlc2N1ZUFwcCIsImRldmljZUlkIjoiMTkwZTM1ZjdlMTRhYzdjMDAwNyIsImF1dGhvcml0aWVzIjpbXX0sInNjb3BlIjpbImFsbCJdLCJpc3MiOiJodHRwczovL3Npbm9hc3Npc3QuY29tIiwiZXhwIjoxNzI2ODk2MjE0LCJpYXQiOjE3MjY4MDk4MTR9.5KTAMXZf8ll6HS4Z49YJQ1HiRvHr79Q1goDAGEtsBmY'},
// authorization:{Authorization:''}, authorization:{Authorization:''},
} }
}, },
mounted() { mounted() {
@ -197,8 +195,8 @@ export default {
} else if (window.location.href.includes('ccreview.sino-assist.com')) { } else if (window.location.href.includes('ccreview.sino-assist.com')) {
this.baseURL = 'https://api.sinoassist.com' this.baseURL = 'https://api.sinoassist.com'
} else { } else {
// this.baseURL = 'https://api1.sino-assist.com' this.baseURL = 'https://api1.sino-assist.com'
this.baseURL = 'http://localhost:8080' // this.baseURL = 'http://localhost:8080'
} }
let token=localStorage.getItem('token') let token=localStorage.getItem('token')
@ -259,17 +257,15 @@ export default {
return false return false
} }
}, },
handleRemove(file, fileList) { handleRemove() {
console.log(file, fileList);
this.identityCardFront = '' this.identityCardFront = ''
}, },
handlePreview(file) { handlePreview() {
ImagePreview({ ImagePreview({
images: this.identityCardFront, images: this.identityCardFront,
startPosition: 1, startPosition: 1,
closeable: true, closeable: true,
}); });
console.log(file);
}, },
async changeHandle(response) { async changeHandle(response) {
if (response.success === true) { if (response.success === true) {