Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const items = get(res.data.data, this.resKey, []);
const page = get(res.data.data, this.pageKey, null);
this.$emit('onLoad', items);
return page;
});
},
sleep(time) {
return new Promise(resolve => {
setTimeout(resolve, time);
});
}
},
components: {
IsEmpty,
[List.name]: List
}
};
if (this.pages <= this.page) {
this.finished = true;
}
},
itemClick(id) {
this.$router.push(`/items/detail/${id}`);
}
},
activated() {
this.wordHistory = this.getKeyWordHistory();
},
components: {
[Search.name]: Search,
[Card.name]: Card,
[Tag.name]: Tag,
[List.name]: List,
[IsEmpty.name]: IsEmpty
}
};
cancelCollect(event, i, item) {
this.$dialog.confirm({ message: '是否取消收藏该商品' }).then(() => {
collectAddOrDelete({ valueId: item.valueId, type: 0 }).then(res => {
this.list.splice(i, 1);
});
});
},
itemClick(id) {
this.$router.push(`/items/detail/${id}`);
}
},
components: {
[Search.name]: Search,
[IsEmpty.name]: IsEmpty,
[List.name]: List,
[Card.name]: Card
}
};
brandList({
page: this.page,
limit: this.limit
}).then(res => {
this.list.push(...res.data.data.list);
this.loading = false;
this.finished = res.data.data.page >= res.data.data.pages;
});
},
itemClick(id) {
this.$router.push(`/items/brand/${id}`);
}
},
components: {
[List.name]: List
}
};
categoryId: this.categoryId,
page: this.page,
limit: this.limit
}).then(res => {
this.goodsList.push(...res.data.data.list);
this.loading = false;
this.finished = res.data.data.page >= res.data.data.pages;
});
},
itemClick(id) {
this.$router.push(`/items/detail/${id}`);
}
},
components: {
[List.name]: List,
[Card.name]: Card,
[Tab.name]: Tab,
[Tabs.name]: Tabs
}
};
scrollShowArrow() {
this.showArrow = document.getElementById('app').scrollTop > 120;
},
backTop() {
document.getElementById('app').scrollTop = 0;
},
itemClick(i) {
this.$router.push({ name: 'detail', params: { itemId: i } });
}
},
components: {
[ItemGroup.name]: ItemGroup,
[ItemCardHori.name]: ItemCardHori,
[Search.name]: Search,
[List.name]: List,
[IsEmpty.name]: IsEmpty
}
};
this.orderList = [];
this.getOrderList();
},
toOrderDetail(id) {
this.$router.push({
path: '/order/order-detail',
query: { orderId: id }
});
}
},
components: {
[Tab.name]: Tab,
[Tabs.name]: Tabs,
[Panel.name]: Panel,
[Card.name]: Card,
[List.name]: List,
[Tag.name]: Tag
}
};
getHome().then(res => {
this.shopInfos = res.data.data;
});
}
},
components: {
[Row.name]: Row,
[Col.name]: Col,
[Card.name]: Card,
[Toast.name]: Toast,
[CouponCell.name]: CouponCell,
[CouponList.name]: CouponList,
[Search.name]: Search,
[Panel.name]: Panel,
[List.name]: List,
[Swipe.name]: Swipe,
[SwipeItem.name]: SwipeItem,
[Tabbar.name]: Tabbar,
[TabbarItem.name]: TabbarItem,
[Tag.name]: Tag,
[Grid.name]: Grid,
[GridItem.name]: GridItem
}
};
this.activeIndex = index;
}
},
getStatusText(status) {
return STATUS_TEXT[status] || '';
},
getRefundList(){
}
},
components: {
[Tab.name]: Tab,
[Tabs.name]: Tabs,
[Panel.name]: Panel,
[Card.name]: Card,
[List.name]: List
}
};
this.loading = false;
this.finished = res.data.data.page >= res.data.data.pages;
});
},
handleTabClick() {
this.page = 0;
this.couponList = [];
this.getCouponList();
}
},
components: {
[Tab.name]: Tab,
[Tabs.name]: Tabs,
[Panel.name]: Panel,
[Card.name]: Card,
[List.name]: List,
CouponCell,
CouponList
}
};