提交 299aeb64 authored 作者: 刘旭's avatar 刘旭

修复收藏bug

上级 c2cb1712
...@@ -624,6 +624,11 @@ let onClick = (e: any) => { ...@@ -624,6 +624,11 @@ let onClick = (e: any) => {
if (JSON.stringify(store.collectData) === '{}') { if (JSON.stringify(store.collectData) === '{}') {
// 初次收藏 // 初次收藏
complete().then((data: any) => { complete().then((data: any) => {
data.item.map((cart: any, c: number) => {
if (JSON.stringify(cart[0]) === '{}') cart.shift()
if (JSON.stringify(cart[1]) === '{}') cart.pop()
cart.map((item: any) => item.sort = c)
});
productLineCollect(data).then((res: any) => { productLineCollect(data).then((res: any) => {
if (res.data.code === 200) { if (res.data.code === 200) {
store.$patch({ store.$patch({
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论