后台导航 测试使用原生 ajax
This commit is contained in:
parent
9d65337fbd
commit
5b89353afe
|
|
@ -357,17 +357,28 @@
|
||||||
null;
|
null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$http.get(url, null, {hload: true, hmsg: true}).then((res) => {
|
$.ajax({
|
||||||
if (res.data) {
|
url: 'admin/'+url,
|
||||||
self.name = res.data;
|
// dataType: 'json',
|
||||||
} else {
|
headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')},
|
||||||
self.name = '{{ __('admin/builder.text_no_data') }}';
|
// beforeSend: function() { self.loading = true;; },
|
||||||
|
complete: function() { self.nameLoading = false; },
|
||||||
|
success: function (json) {
|
||||||
|
console.log(json);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
|
||||||
self.name = '{{ __('admin/builder.text_no_data') }}';
|
|
||||||
}).finally(() => {
|
|
||||||
self.nameLoading = false;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// $http.get(url, null, {hload: true, hmsg: true}).then((res) => {
|
||||||
|
// if (res.data) {
|
||||||
|
// self.name = res.data;
|
||||||
|
// } else {
|
||||||
|
// self.name = '{{ __('admin/builder.text_no_data') }}';
|
||||||
|
// }
|
||||||
|
// }).catch(() => {
|
||||||
|
// self.name = '{{ __('admin/builder.text_no_data') }}';
|
||||||
|
// }).finally(() => {
|
||||||
|
// self.nameLoading = false;
|
||||||
|
// });
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue