|
@@ -88,13 +88,13 @@
|
|
|
// 获取购物车列表
|
|
|
getCartData() {
|
|
|
NET.request(API.getCartList, {}, 'GET').then(res => {
|
|
|
- res.data.merchants.forEach(item => {
|
|
|
+ res.data.merchants && res.data.merchants.forEach(item => {
|
|
|
item.allCheck = false
|
|
|
item.products.forEach(site => {
|
|
|
site.check = false
|
|
|
})
|
|
|
})
|
|
|
- this.cartsList = res.data.merchants
|
|
|
+ this.cartsList = res.data.merchants || []
|
|
|
}).catch(error => {
|
|
|
this.$refs.uTips.show({
|
|
|
title: '获取购物车列表失败',
|