diff --git a/src/views/index/driverAdd.vue b/src/views/index/driverAdd.vue
index 8d6e3982..f7c4d1da 100644
--- a/src/views/index/driverAdd.vue
+++ b/src/views/index/driverAdd.vue
@@ -16,23 +16,29 @@
身份证正面
-
-
-
-
-
-
-
+ -->
+ />
@@ -153,6 +159,8 @@ export default {
mixins:[myMixins],
data(){
return{
+ baseURL:'',
+ licenseOcrInfo:'',
id:'',
driverName:"",
driverPhone:"",
@@ -178,11 +186,22 @@ export default {
idCardAuthority:'',
idCardValidStartTime:'',
idCardValidEndTime:'',
- token:''
+ authorization:{Authorization: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJzb25nIiwiYXVkIjpbInN1cHBsaWVyLWFwcCJdLCJuYmYiOjE3MjY4MDk4MTQsInVzZXJfaW5mbyI6eyJ1c2VySWQiOjU0NjU0LCJwaG9uZSI6IjE3NjMwMDM1NjU4IiwibmFtZSI6InNvbmciLCJzdXBwbGllck5hbWUiOiLkuIrmtbfmtYvor5XkvpvlupTllYYiLCJzdXBwbGllcklkIjozMzA0MSwic3VwcGxpZXJUeXBlIjoyLCJ1c2VybmFtZSI6InNvbmciLCJ1c2VyVHlwZSI6InJlc2N1ZUFwcCIsImRldmljZUlkIjoiMTkwZTM1ZjdlMTRhYzdjMDAwNyIsImF1dGhvcml0aWVzIjpbXX0sInNjb3BlIjpbImFsbCJdLCJpc3MiOiJodHRwczovL3Npbm9hc3Npc3QuY29tIiwiZXhwIjoxNzI2ODk2MjE0LCJpYXQiOjE3MjY4MDk4MTR9.5KTAMXZf8ll6HS4Z49YJQ1HiRvHr79Q1goDAGEtsBmY'},
+ fileList:'',
+ file:'',
}
},
mounted() {
- this.token = localStorage.getItem('token');
+ if (window.location.href.includes('www.sinoassist.com')) {
+ this.baseURL = 'https://api.sinoassist.com'
+ } else if (window.location.href.includes('ccreview.sino-assist.com')) {
+ this.baseURL = 'https://api.sinoassist.com'
+ } else {
+ // this.baseURL = 'https://api1.sino-assist.com'
+ this.baseURL = 'http://localhost:8080'
+
+ }
+ // this.authorization={Authorization: localStorage.getItem('token')}
// this.requestPermissions();
this.id = this.$route.params?.id;
this.driverName = this.$route.params?.name;
@@ -239,29 +258,23 @@ export default {
isUse(e){
this.states=e
},
- // 返回布尔值
- beforeRead(file) {
- this.$toast('beforeReadbeforeReadbeforeRead');
- console.log("beforeRead",file)
- if (file.type !== 'image/jpeg') {
- this.$toast('请上传 jpg 格式图片');
- return false;
- }
- return true;
+ /* beforeAvatarUpload(file){
+ this.licenseOcrInfo= file
+ },
+ async changeHandle() {
+
+ const formData = new FormData()
+ formData.append('file', this.licenseOcrInfo);
+ /!* await this.$post(this.$api.supplier.supplierApproval.recognizeBusinessLicense, formData).then((res) => {
+
+
+ });*!/
+ },*/
+ beforeRead(){
+ console.log("-----------")
},
async identityCardFrontHandler(file, detail) { // 上传身份证正面照片
console.log("检查文件类型",file, detail)
- // 检查文件类型
- if (!file.file.type.startsWith('image/')) {
- this.$toast('请选择图片文件');
- return;
- }
- console.log("上传身份证正面照片",file)
- // 检查文件大小
- if (file.file.size > 5 * 1024 * 1024) {
- this.$toast('文件大小不能超过 5MB');
- // return;
- }
const formData = new FormData();
formData.append("file" , file.file);
let res = await uploadImage(formData)