Commit fc5d7dab authored by lijiongliang's avatar lijiongliang

请求响应修改

parent 9e899632
......@@ -107,7 +107,7 @@ export default {
classification: "2"
}).then(res => {
if (res.data.code == 200) {
let list = res.data.data.rows
let list = res.data.data.rows || []
this.boutiqueMallList = [...this.boutiqueMallList, ...list];
// 加载成功 参数对象{list: 当前列表,total: 数据总长度(后端查询的total)}
......@@ -133,7 +133,7 @@ export default {
classification: "2"
}).then(res => {
if (res.data.code == 200) {
let list = res.data.data.rows
let list = res.data.data.rows || []
this.boutiqueMallList = list;
// 加载成功 参数对象{list: 当前列表,total: 数据总长度(后端查询的total)}
......@@ -196,7 +196,7 @@ export default {
classification: "1"
}).then(res => {
if (res.data.code == 200) {
this.mallList = res.data.data.rows
this.mallList = res.data.data.rows || []
}
})
},
......@@ -211,7 +211,7 @@ export default {
pageNum:this.page
}).then(res => {
if (res.data.code == 200) {
let data = res.data.data.rows;
let data = res.data.data.rows || [];
data.forEach(elem=>{
this.boutiqueMallList.push(elem)
})
......@@ -235,8 +235,7 @@ export default {
};
this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
let data = []
data = res.data.data
let data = res.data.data || []
let imgList = []
data.forEach(e => {
imgList.push(e)
......
......@@ -118,7 +118,7 @@ export default {
this.http.httpTokenRequest(opts, {}).then(res => {
if (res.statusCode == 200) {
uni.hideLoading()
this.carList = res.data
this.carList = res.data || []
}
})
},
......
......@@ -57,7 +57,7 @@ export default {
let opts = { url: '/app/moveLog/apply/list?pageSize='+paging.size+'&pageNum='+paging.page, method: 'get' };
this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
list = res.data.rows
list = res.data.rows || []
this.items = [...this.items, ...list]
// 加载成功 参数对象{list: 当前列表,total: 数据总长度(后端查询的total)}
......@@ -79,7 +79,7 @@ export default {
let opts = { url: '/app/moveLog/apply/list?pageSize='+paging.size+'&pageNum='+paging.page, method: 'get' };
this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
list = res.data.rows
list = res.data.rows || []
this.items = list
// 加载成功 参数对象{list: 当前列表,total: 数据总长度(后端查询的total)}
......
......@@ -95,7 +95,7 @@ export default {
let opts = { url: '/app/moveCode/list?carNo=' + this.keyword, method: 'get' };
this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
this.items = res.data.rows
this.items = res.data.rows || []
}
})
},
......
......@@ -60,7 +60,7 @@ export default {
};
this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
list = res.data.rows
list = res.data.rows || []
this.items = [...this.items, ...list]
// 加载成功 参数对象{list: 当前列表,total: 数据总长度(后端查询的total)}
this.$refs.list.loadSuccess({
......@@ -85,7 +85,7 @@ export default {
};
this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
list = res.data.rows
list = res.data.rows || []
this.items = [...this.items, ...list]
// 加载成功 参数对象{list: 当前列表,total: 数据总长度(后端查询的total)}
this.$refs.list.refreshSuccess({
......
......@@ -300,7 +300,7 @@ export default {
this.http.httpTokenRequest(opts, {}).then(res => {
if (res.statusCode == 200) {
uni.hideLoading()
this.carList = res.data
this.carList = res.data || []
this.selectCar = true
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment