task#6524 报备防重复点击
This commit is contained in:
@ -21,7 +21,7 @@ service.interceptors.request.use(
|
|||||||
}
|
}
|
||||||
config.headers['Content-Type'] = config.contentType || 'application/x-www-form-urlencoded'
|
config.headers['Content-Type'] = config.contentType || 'application/x-www-form-urlencoded'
|
||||||
let token = localStorage.getItem('token');
|
let token = localStorage.getItem('token');
|
||||||
// let token='4099761587129c46b03c9316c9e866c9'
|
// let token='eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBTkNIQU5HIiwidXNlcklkIjo0NTY3MSwibmFtZSI6IuWuieeVhSIsInVzZXJOYW1lIjoiQU5DSEFORyIsInN1cHBsaWVySWQiOjExMjgsImlzWmQiOjAsImV4cCI6MTc1MjEzNDc2M30.q1O7C8thZzEMVKYDhBQ-N_14Fh9Bqejj7j11EKLF5Aw'
|
||||||
// let token='eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJTSEhQWEIiLCJ1c2VySWQiOjU0NzI2LCJuYW1lIjoiI-a1i-ivleWwj-eZveeZvSIsInVzZXJOYW1lIjoiU0hIUFhCIiwic3VwcGxpZXJJZCI6MTAwMDE2NSwiZXhwIjoxNzQ0NTEwNzkwfQ.JPk0OA7slYJN3FIi_uhW4Y0CiWRvl6R1dK8MRTbyhD8'
|
// let token='eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJTSEhQWEIiLCJ1c2VySWQiOjU0NzI2LCJuYW1lIjoiI-a1i-ivleWwj-eZveeZvSIsInVzZXJOYW1lIjoiU0hIUFhCIiwic3VwcGxpZXJJZCI6MTAwMDE2NSwiZXhwIjoxNzQ0NTEwNzkwfQ.JPk0OA7slYJN3FIi_uhW4Y0CiWRvl6R1dK8MRTbyhD8'
|
||||||
if(!(reqUrl=='/supplier/supplierTraining/trainingTask' || reqUrl=='/supplier/supplierTraining/normalList' || reqUrl=='/supplier/supplierTraining/trainingList')){
|
if(!(reqUrl=='/supplier/supplierTraining/trainingTask' || reqUrl=='/supplier/supplierTraining/normalList' || reqUrl=='/supplier/supplierTraining/trainingList')){
|
||||||
config.headers['Authorization'] = `${token}`;
|
config.headers['Authorization'] = `${token}`;
|
||||||
|
@ -150,6 +150,7 @@
|
|||||||
userOrderId: '',
|
userOrderId: '',
|
||||||
userOrderCode: '',
|
userOrderCode: '',
|
||||||
driverId: '',
|
driverId: '',
|
||||||
|
clickFlag: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
@ -191,6 +192,8 @@
|
|||||||
this.recordList = recordList.data;
|
this.recordList = recordList.data;
|
||||||
},
|
},
|
||||||
async saveHandler() {
|
async saveHandler() {
|
||||||
|
if( this.clickFlag ) {
|
||||||
|
this.clickFlag = false;
|
||||||
let data = {
|
let data = {
|
||||||
source: Number(this.type),
|
source: Number(this.type),
|
||||||
reportContent: this.remark,
|
reportContent: this.remark,
|
||||||
@ -223,6 +226,7 @@
|
|||||||
Toast('备注内容不能为空')
|
Toast('备注内容不能为空')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
await newOrderReporting(data)
|
await newOrderReporting(data)
|
||||||
Dialog.alert({
|
Dialog.alert({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
@ -232,7 +236,12 @@
|
|||||||
this.addReportShow = false
|
this.addReportShow = false
|
||||||
this.scrollToBottom();
|
this.scrollToBottom();
|
||||||
this.initDialogData();
|
this.initDialogData();
|
||||||
|
this.clickFlag = true
|
||||||
});
|
});
|
||||||
|
} finally {
|
||||||
|
this.clickFlag = true
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
initDialogData() {
|
initDialogData() {
|
||||||
this.appointTime = '';
|
this.appointTime = '';
|
||||||
|
Reference in New Issue
Block a user