使用Promise.all的时候报错:
发现是Promise.all调用方式出错了。
错误代码:
Promise.all(getSwiperList(storeId), getNotices(storeId), getIndexProducts(storeId))
正确的应该是传入一个数组:
Promise.all([getSwiperList(storeId), getNotices(storeId), getIndexProducts(storeId)])
使用Promise.all的时候报错:
发现是Promise.all调用方式出错了。
错误代码:
Promise.all(getSwiperList(storeId), getNotices(storeId), getIndexProducts(storeId))
正确的应该是传入一个数组:
Promise.all([getSwiperList(storeId), getNotices(storeId), getIndexProducts(storeId)])