完善上传页面的放大查看功能
此提交包含在:
@@ -2,11 +2,10 @@ import Swal from 'sweetalert2';
|
||||
|
||||
const SelfSwal = Swal.mixin({
|
||||
customClass: {
|
||||
confirmButton: 'btn-round-full-single',
|
||||
cancelButton: 'btn-round-full-single',
|
||||
confirmButton: 'btn btn-primary',
|
||||
cancelButton: 'btn btn-gray',
|
||||
},
|
||||
buttonsStyling: false,
|
||||
heightAuto: false
|
||||
});
|
||||
|
||||
// ajax
|
||||
|
@@ -11,7 +11,7 @@ export function get(url) {
|
||||
"Allow-Control-Allow-Origin": "*"
|
||||
}
|
||||
}),
|
||||
() => get(url)
|
||||
() => ({ fn: get(url), identifier: 'get:' + url })
|
||||
);
|
||||
}
|
||||
export function post(url, data) {
|
||||
@@ -22,15 +22,16 @@ export function post(url, data) {
|
||||
"Allow-Control-Allow-Origin": "*"
|
||||
}
|
||||
}),
|
||||
() => post(url, data)
|
||||
() => ({ fn: post(url, data), identifier: 'post:' + url + ' ' + JSON.stringify(data) })
|
||||
);
|
||||
}
|
||||
|
||||
const waitToSend = [];
|
||||
|
||||
async function send(xhr, retryFunc) {
|
||||
async function send(xhr, retryConf) {
|
||||
if (waitToSend.length) {
|
||||
waitToSend.push(retryFunc);
|
||||
if (waitToSend.every(retryConfItem => retryConfItem.identifier !== retryConf.identifier))
|
||||
waitToSend.push(retryConf);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
@@ -50,7 +51,7 @@ async function send(xhr, retryFunc) {
|
||||
History.force('/login');
|
||||
return failData;
|
||||
}
|
||||
waitToSend.push(retryFunc);
|
||||
waitToSend.push(retryConf);
|
||||
if (err.message === 'Network Error')
|
||||
return await failed('您的设备似乎断网了,请检查网络后重试或刷新', flushWaitList) || failData;
|
||||
if (err?.response?.status === 504)
|
||||
|
新增問題並參考
封鎖使用者