Merge branch 'master' of http://git.luyuan.tk/luyuan/deming into xbx
This commit is contained in:
@@ -1,6 +1,14 @@
|
||||
export default {
|
||||
init(vm){
|
||||
return {
|
||||
// 获取首页轮播
|
||||
getIndexSwiper() {
|
||||
return vm.$u.post('adv/indexadv');
|
||||
},
|
||||
// 获取首页轮播
|
||||
getZhiBoSwiper() {
|
||||
return vm.$u.post('adv/divebroadcastxadv');
|
||||
},
|
||||
// 发现列表
|
||||
getArticlelist({ page, value, store_id, member_id, is_video_img }){
|
||||
return vm.$u.post('article/articlelist', {
|
||||
@@ -29,6 +37,12 @@ export default {
|
||||
article_id: article_id,
|
||||
});
|
||||
},
|
||||
// 直播列表
|
||||
// getZhiboList() {
|
||||
// return vm.$u.post('article/articleCollect', {
|
||||
// article_id: article_id,
|
||||
// });
|
||||
// },
|
||||
// 屏蔽用户
|
||||
articleAddShield({ article_id, member_id }) {
|
||||
return vm.$u.post('article/articleAddShield', {
|
||||
@@ -64,9 +78,10 @@ export default {
|
||||
return vm.$u.post('Goods/getGoodsClassifyList');
|
||||
},
|
||||
// 商品推荐
|
||||
getGoodsRecommend({page}){
|
||||
getGoodsRecommend({page, gc_id}){
|
||||
return vm.$u.post('Goods/getGoodsRecommend', {
|
||||
page: page
|
||||
page: page,
|
||||
gc_id: gc_id,
|
||||
});
|
||||
},
|
||||
// 购物车商品列表
|
||||
@@ -121,16 +136,23 @@ export default {
|
||||
});
|
||||
},
|
||||
// 选择地区计算运费
|
||||
getFreight({ freight_hash, city_id, area_id }) {
|
||||
getFreight({ freight_hash, city_id, area_id, delivery }) {
|
||||
return vm.$u.post('Buy/change_addr', {
|
||||
freight_hash: freight_hash,
|
||||
city_id: city_id,
|
||||
area_id: area_id,
|
||||
delivery: delivery,
|
||||
});
|
||||
},
|
||||
// 商品详情
|
||||
// getGoodsDetails({ id }) {
|
||||
// return vm.$u.post('Goods/goodDetails', {
|
||||
// goods_id: id
|
||||
// });
|
||||
// },
|
||||
// 商品详情
|
||||
getGoodsDetails({ id }) {
|
||||
return vm.$u.post('Goods/goodDetails', {
|
||||
return vm.$u.post('goods/goodsInfo', {
|
||||
goods_id: id
|
||||
});
|
||||
},
|
||||
@@ -155,6 +177,65 @@ export default {
|
||||
return vm.$u.post('ShopSearch/search',{
|
||||
keyword,page,order
|
||||
})
|
||||
},
|
||||
// 秒杀推荐
|
||||
recommendedSpike() {
|
||||
return vm.$u.post('Spike/recommendedSpike');
|
||||
},
|
||||
// 秒杀详情
|
||||
getSpikeInfo({ id }) {
|
||||
return vm.$u.post('Spike/spikeInfo', {
|
||||
groupbuy_id: id
|
||||
});
|
||||
},
|
||||
// 秒杀列表
|
||||
getSpikeList({ page }) {
|
||||
return vm.$u.post('spike/spikeList', {
|
||||
page: page
|
||||
});
|
||||
},
|
||||
// 拼团列表
|
||||
getPinTuanList({ page, gc_id }) {
|
||||
return vm.$u.post('Specialci/pintuanList', {
|
||||
page: page,
|
||||
gc_id: gc_id,
|
||||
});
|
||||
},
|
||||
// 拼团商品详情
|
||||
getPinTuanDetails({ pintuan_id }) {
|
||||
return vm.$u.post('Specialci/pintuanInfo', { pintuan_id: pintuan_id });
|
||||
},
|
||||
// pintuanPush
|
||||
getPinTuanPush() {
|
||||
return vm.$u.post('Specialci/pintuanPush');
|
||||
},
|
||||
// 商品分类(拼团分类)
|
||||
getGoodsClass() {
|
||||
return vm.$u.post('Specialci/goodsClass');
|
||||
},
|
||||
// 优惠券列表(要兑换的)
|
||||
getCouponList({ page, store_id, type, gc_id }) {
|
||||
return vm.$u.post('Coupon/CouponList', {
|
||||
page: page,
|
||||
store_id: store_id,
|
||||
type: type,
|
||||
gc_id: gc_id,
|
||||
});
|
||||
},
|
||||
// 领取优惠券
|
||||
getCoupon({ id }) {
|
||||
return vm.$u.post('Coupon/getCoupon', {
|
||||
vouchertemplate_id: id,
|
||||
});
|
||||
},
|
||||
// 我的优惠券(已有的)
|
||||
getMemberCouponList({ store_id, gc_id, type, status }) {
|
||||
return vm.$u.post('Coupon/getMemberCouponList', {
|
||||
store_id: store_id,
|
||||
gc_id: gc_id,
|
||||
type: type,
|
||||
status: status,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ export default {
|
||||
address,
|
||||
true_name,
|
||||
mobile_phone,
|
||||
// longitude,
|
||||
// longitude,
|
||||
// latitude,
|
||||
}) {
|
||||
return vm.$u.post('memberAddress/addressAdd', {
|
||||
@@ -236,10 +236,28 @@ export default {
|
||||
if(refund_state) Object.assign(params, {refund_state: refund_state});
|
||||
return vm.$u.post('Order/orderList', params);
|
||||
},
|
||||
// 售后列表
|
||||
getAfterSaleList({ page }) {
|
||||
return vm.$u.post('order/afterSaleList', { page: page });
|
||||
},
|
||||
// 订单详情
|
||||
getOrderInfo({ order_id }) {
|
||||
return vm.$u.post('Order/orderInfo', { order_id: order_id });
|
||||
},
|
||||
// 取消订单
|
||||
cancelOrder({ order_id, msg = '' } = {}) {
|
||||
let params = { order_id: order_id };
|
||||
if(msg) Object.assign(params, {msg: msg});
|
||||
return vm.$u.post('Order/buyer_cancel', params);
|
||||
},
|
||||
// 删除订单
|
||||
deleteOrder({ order_id }) {
|
||||
return vm.$u.post('order/order_delete', { order_id: order_id });
|
||||
},
|
||||
// 确认收货
|
||||
confirmReceive ({ order_id }) {
|
||||
return vm.$u.post('Order/order_receive', { order_id: order_id });
|
||||
},
|
||||
// 查询订单的评价信息
|
||||
getOrderEvaluateInfo({ id }) {
|
||||
return vm.$u.post('Order/getOrderEvaluateInfo', { id: id });
|
||||
@@ -284,6 +302,19 @@ export default {
|
||||
delMessage({ type }) {
|
||||
return vm.$u.post('/message/readMessage', { type });
|
||||
},
|
||||
|
||||
// 已读消息
|
||||
refreshToken({ }) {
|
||||
return vm.$u.post('/Auth/refreshToken', { });
|
||||
},
|
||||
// 屏蔽列表
|
||||
articlShieldList() {
|
||||
return vm.$u.post('/Article/articlShieldList');
|
||||
},
|
||||
// 取消屏蔽
|
||||
articleDelShield({ id }) {
|
||||
return vm.$u.post('article/articleDelShield', { member_id: id });
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
24
common/store/index.js
Normal file
24
common/store/index.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
Vue.use(Vuex)
|
||||
|
||||
const store = new Vuex.Store({
|
||||
state: {
|
||||
cartInfo: {}, // 购物车数据
|
||||
orderAddress: {}, // 下单时选择的地址
|
||||
},
|
||||
getters: {
|
||||
getOrderAddress(state) {
|
||||
return state.orderAddress;
|
||||
}
|
||||
},
|
||||
mutations: {
|
||||
updateCart(state, cart) {
|
||||
state.cartInfo = cart;
|
||||
},
|
||||
updateAddress(state, address) {
|
||||
state.orderAddress = address;
|
||||
}
|
||||
}
|
||||
})
|
||||
export default store;
|
||||
Reference in New Issue
Block a user