2020-06-15 02:00:14 +00:00
|
|
|
export default {
|
|
|
|
init(vm){
|
|
|
|
return {
|
2020-06-29 09:24:57 +00:00
|
|
|
// 发现列表
|
|
|
|
getArticlelist({ page, value, store_id, member_id, is_video_img }){
|
|
|
|
return vm.$u.post('article/articlelist', {
|
|
|
|
page: page,
|
|
|
|
like: value, // 搜索内容
|
|
|
|
store_id: store_id,
|
|
|
|
member_id: member_id,
|
|
|
|
is_video_img: is_video_img,
|
|
|
|
});
|
|
|
|
},
|
2020-06-30 10:06:50 +00:00
|
|
|
// 发现(取消)点赞
|
|
|
|
articleLike({ article_id }) {
|
|
|
|
return vm.$u.post('article/articleLike', {
|
|
|
|
article_id: article_id,
|
|
|
|
});
|
|
|
|
},
|
|
|
|
// 发现(取消)收藏
|
|
|
|
articleCollect({ article_id }) {
|
|
|
|
return vm.$u.post('article/articleCollect', {
|
|
|
|
article_id: article_id,
|
|
|
|
});
|
|
|
|
},
|
|
|
|
// 屏蔽用户
|
|
|
|
articleAddShield({ article_id, member_id }) {
|
|
|
|
return vm.$u.post('article/articleAddShield', {
|
|
|
|
article_id: article_id,
|
|
|
|
member_id: member_id,
|
|
|
|
});
|
|
|
|
},
|
|
|
|
// 推荐达人
|
|
|
|
getRecommendList(){
|
|
|
|
return vm.$u.post('MemberExpert/recommendList');
|
|
|
|
},
|
2020-06-24 08:39:31 +00:00
|
|
|
// 获取商城首页信息(顶部轮播图与商品分类)
|
|
|
|
getShopTopList(){
|
|
|
|
return vm.$u.post('Shop/getShopTopList');
|
|
|
|
},
|
2020-06-30 10:06:50 +00:00
|
|
|
// 商品分类列表(树结构)
|
|
|
|
getGoodsClassifyList() {
|
|
|
|
return vm.$u.post('Goods/getGoodsClassifyList');
|
|
|
|
},
|
2020-06-18 06:57:26 +00:00
|
|
|
// 商品推荐
|
|
|
|
getGoodsRecommend({page}){
|
|
|
|
return vm.$u.post('Goods/getGoodsRecommend', {
|
|
|
|
page: page
|
|
|
|
});
|
2020-06-19 10:07:11 +00:00
|
|
|
},
|
|
|
|
// 购物车商品列表
|
|
|
|
getCartList() {
|
|
|
|
return vm.$u.post('cart/cartList');
|
2020-06-24 08:39:31 +00:00
|
|
|
},
|
|
|
|
// 购物车商品列表(树结构)
|
|
|
|
getCartTreeList() {
|
|
|
|
return vm.$u.post('cart/cartTreeList');
|
|
|
|
},
|
2020-06-29 00:47:37 +00:00
|
|
|
// 添加购物车
|
|
|
|
addCart({ goods_id, quantity }) {
|
|
|
|
return vm.$u.post('cart/cartAdd', {
|
|
|
|
goods_id: goods_id,
|
|
|
|
quantity: quantity
|
|
|
|
});
|
|
|
|
},
|
|
|
|
// 购物车删除商品
|
|
|
|
deleteCart({ id }) {
|
|
|
|
return vm.$u.post('cart/cartDel', {
|
2020-06-29 09:24:57 +00:00
|
|
|
cart_ids: id
|
|
|
|
});
|
|
|
|
},
|
2020-06-30 10:06:50 +00:00
|
|
|
// 购物车更新商品数量
|
|
|
|
cartUpdateNumber({ cart_id, quantity }) {
|
|
|
|
return vm.$u.post('cart/cartUpdate', {
|
|
|
|
cart_id: cart_id,
|
|
|
|
quantity: quantity
|
|
|
|
});
|
|
|
|
},
|
|
|
|
// 订单结算数据
|
|
|
|
settlementOrder({ cart_id }) {
|
|
|
|
return vm.$u.post('buy/buy_step1', {
|
|
|
|
cart_id: cart_id,
|
|
|
|
});
|
|
|
|
},
|
2020-06-29 09:24:57 +00:00
|
|
|
// 商品详情
|
|
|
|
getGoodsDetails({ id }) {
|
|
|
|
return vm.$u.post('Goods/goodDetails', {
|
|
|
|
goods_id: id
|
2020-06-29 00:47:37 +00:00
|
|
|
});
|
2020-06-30 10:06:50 +00:00
|
|
|
},
|
2020-06-15 02:00:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|