feat: v3版疗休养优化7
This commit is contained in:
@@ -1,17 +1,6 @@
|
||||
const sublime = {
|
||||
jumpPagePjax(url) {
|
||||
window.location.href = url;
|
||||
},
|
||||
showLoadingbar() {
|
||||
if (!document.getElementById('therapy-loading')) {
|
||||
const bar = document.createElement('div');
|
||||
bar.id = 'therapy-loading';
|
||||
document.body.appendChild(bar);
|
||||
}
|
||||
},
|
||||
closeLoadingbar() {
|
||||
const bar = document.getElementById('therapy-loading');
|
||||
if (bar) bar.remove();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -89,7 +78,6 @@ Vue.directive('throttle', {
|
||||
$.ajaxSetup({
|
||||
traditional: true,
|
||||
error(xhr) {
|
||||
sublime.closeLoadingbar();
|
||||
const message = xhr.responseJSON && xhr.responseJSON.msg || '请求失败,请稍后重试';
|
||||
if (window.ELEMENT) ELEMENT.Message.error(message);
|
||||
else if (window.vant) vant.Toast.fail(message);
|
||||
|
||||
Reference in New Issue
Block a user