Browse Source

fix: 报错处理

v1.0.1
jiannibang 3 years ago
parent
commit
b827f0afad
  1. 2
      src/views/Brand/Brand.vue

2
src/views/Brand/Brand.vue

@ -20,7 +20,7 @@ const selectedList = ref([])
Promise.all([getBrandListByFloor()]).then(([_brandList]) => { Promise.all([getBrandListByFloor()]).then(([_brandList]) => {
const recMap = indexList.value.recommendList.reduce((acc, { shopId }) => ({ ...acc, [shopId]: true }), {}) const recMap = indexList.value.recommendList.reduce((acc, { shopId }) => ({ ...acc, [shopId]: true }), {})
const list = _brandList.data.list const list = _brandList.data.list
selectedList.value = list.map(({ name, shopList }) => ({ name, shopList: shopList.filter(({ shopId }) => recMap[shopId]) }))
selectedList.value = list.map(({ name, shopList: _shopList }) => ({ name, shopList: _shopList.filter(({ shopId }) => recMap[shopId]) }))
}) })
function handleShop(item) { function handleShop(item) {

Loading…
Cancel
Save