From cc9fb2b48beabf4d9fefe320eae93581b4740c09 Mon Sep 17 00:00:00 2001 From: ghusermoon <2673031505@qq.com> Date: Wed, 15 Jul 2020 16:21:43 +0800 Subject: [PATCH] 7.15 --- common/api/shop.js | 40 +++++++++++++++++++++++++-- common/api/user.js | 8 ++++++ common/store/index.js | 41 ++++++++++++++++++++++++++++ components/shop/recommend/index.vue | 32 +++++++++++++++------- main.js | 7 ++++- package.json | 2 +- pageB/sdetails/index.vue | 9 +++--- pageE/setting/ShieldUsers.vue | 28 +++++++++++++++---- pages/index/index.vue | 23 ++++++++++++++-- pages/shop/index.vue | 31 +++++++++++++++++---- static/image/common/15.png | Bin 0 -> 14783 bytes 11 files changed, 190 insertions(+), 31 deletions(-) create mode 100644 common/store/index.js create mode 100644 static/image/common/15.png diff --git a/common/api/shop.js b/common/api/shop.js index d0afccd..789413f 100644 --- a/common/api/shop.js +++ b/common/api/shop.js @@ -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', { @@ -129,8 +143,14 @@ export default { }); }, // 商品详情 + // 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 }); }, @@ -149,7 +169,23 @@ export default { return vm.$u.post('goods/goodsInfo', { goods_id: id }); - } + }, + // 秒杀推荐 + 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 + }); + }, } } diff --git a/common/api/user.js b/common/api/user.js index 302ecda..31956ba 100644 --- a/common/api/user.js +++ b/common/api/user.js @@ -302,6 +302,14 @@ export default { delMessage({ type }) { return vm.$u.post('/message/readMessage', { type }); }, + // 屏蔽列表 + articlShieldList() { + return vm.$u.post('/Article/articlShieldList'); + }, + // 取消屏蔽 + articleDelShield({ id }) { + return vm.$u.post('article/articleDelShield', { member_id: id }); + }, } } } \ No newline at end of file diff --git a/common/store/index.js b/common/store/index.js new file mode 100644 index 0000000..b80b0a4 --- /dev/null +++ b/common/store/index.js @@ -0,0 +1,41 @@ +// 商品相关 +const moduleA = { + state: () => ({ + count: 0 + }), + mutations: { + increment (state) { + // 这里的 `state` 对象是模块的局部状态 + state.count++ + } + }, + getters: { + doubleCount (state) { + return state.count * 2 + } + } +} +// 用户相关 +const moduleB = { + state: () => ({ + count: 0 + }), + mutations: { + increment (state) { + // 这里的 `state` 对象是模块的局部状态 + state.count++ + } + }, + getters: { + doubleCount (state) { + return state.count * 2 + } + } +} + +const store = new Vuex.Store({ + modules: { + shop: moduleA, + user: moduleB + } +}) \ No newline at end of file diff --git a/components/shop/recommend/index.vue b/components/shop/recommend/index.vue index 4c38bbb..849765f 100644 --- a/components/shop/recommend/index.vue +++ b/components/shop/recommend/index.vue @@ -5,25 +5,35 @@ 点击查看更多> - - - 12:00 + + + {{ info.groupbuy_starttime_histime }} - 修身套头上衣 - 珂莱蒂尔雪纺衫2020春装新简约百搭V领蕾丝九分... + {{ info.groupbuy_name }} + {{ info.goods_name }} - ¥99 - ¥299 + ¥{{ info.groupbuy_price }} + ¥{{ info.goods_price }} - +