统一axios写法

This commit is contained in:
panlinlin
2021-04-12 16:04:04 +08:00
parent 27df8bd84c
commit 4010ed6c23
28 changed files with 243 additions and 218 deletions

View File

@@ -136,20 +136,20 @@
getDeviceList: function() {
let that = this;
this.getDeviceListLoading = true;
this.$axios.get(`/api/device/query/devices`,{
this.$axios({
method: 'get',
url:`/api/device/query/devices`,
params: {
page: that.currentPage,
count: that.count
}
} )
.then(function (res) {
}).then(function (res) {
console.log(res);
console.log(res.data.list);
that.total = res.data.total;
that.deviceList = res.data.list;
that.getDeviceListLoading = false;
})
.catch(function (error) {
}).catch(function (error) {
console.log(error);
that.getDeviceListLoading = false;
});