From a6e124123819ff1ee48139fc3550fb8a04351805 Mon Sep 17 00:00:00 2001
From: ghusermoon <2673031505@qq.com>
Date: Mon, 20 Jul 2020 17:17:41 +0800
Subject: [PATCH] group order
---
common/api/shop.js | 10 +-
common/api/user.js | 7 +-
common/store/index.js | 12 +-
components/mine/coupon/mine.vue | 5 +-
components/shop/group/index.vue | 38 +++--
components/shop/group/item.vue | 16 +-
components/shop/recommend/pintuan.vue | 155 +++++++++++++++++
pageB/sdetails/index.vue | 236 ++++++++++++++++++++++++--
pageC/cart/ConfirmOrder.vue | 23 ++-
pageE/tool/ManicureOrder.vue | 35 +++-
pages/shop/index.vue | 12 +-
11 files changed, 494 insertions(+), 55 deletions(-)
create mode 100644 components/shop/recommend/pintuan.vue
diff --git a/common/api/shop.js b/common/api/shop.js
index e6af33f..437f818 100644
--- a/common/api/shop.js
+++ b/common/api/shop.js
@@ -205,10 +205,18 @@ export default {
getPinTuanDetails({ pintuan_id }) {
return vm.$u.post('Specialci/pintuanInfo', { pintuan_id: pintuan_id });
},
- // pintuanPush
+ // 推荐拼团
getPinTuanPush() {
return vm.$u.post('Specialci/pintuanPush');
},
+ // 开团/参团
+ withImmediate({ pintuan_id, pintuangroup_headid, pintuangroup_id}) {
+ return vm.$u.post('Specialci/withImmediate', {
+ pintuan_id: pintuan_id,
+ pintuangroup_headid: pintuangroup_headid,
+ pintuangroup_id: pintuangroup_id,
+ });
+ },
// 商品分类(拼团分类)
getGoodsClass() {
return vm.$u.post('Specialci/goodsClass');
diff --git a/common/api/user.js b/common/api/user.js
index 55234b2..68fef94 100644
--- a/common/api/user.js
+++ b/common/api/user.js
@@ -308,7 +308,6 @@ export default {
delMessage({ type }) {
return vm.$u.post('/message/readMessage', { type });
},
-
// 已读消息
refreshToken({ }) {
return vm.$u.post('/Auth/refreshToken', { });
@@ -321,6 +320,12 @@ export default {
articleDelShield({ id }) {
return vm.$u.post('article/articleDelShield', { member_id: id });
},
+ // 配置
+ getConfigInfo({ code }) {
+ return vm.$u.post('Document/getConfigInfo', {
+ code: code,
+ });
+ },
}
}
}
\ No newline at end of file
diff --git a/common/store/index.js b/common/store/index.js
index 2db9847..afce820 100644
--- a/common/store/index.js
+++ b/common/store/index.js
@@ -6,10 +6,17 @@ const store = new Vuex.Store({
state: {
cartInfo: {}, // 购物车数据
orderAddress: {}, // 下单时选择的地址
+ goodsDetails: {}, // 商品详情 1普通 2拼团 3秒杀 4优惠券
},
getters: {
getOrderAddress(state) {
return state.orderAddress;
+ },
+ getGoodsType(state) {
+ return state.goodsDetails.type;
+ },
+ getGoodsInfo(state) {
+ return state.goodsDetails.goods;
}
},
mutations: {
@@ -18,7 +25,10 @@ const store = new Vuex.Store({
},
updateAddress(state, address) {
state.orderAddress = address;
- }
+ },
+ setGoodsDetails(state, goods) {
+ state.goodsDetails = goods;
+ },
}
})
export default store;
\ No newline at end of file
diff --git a/components/mine/coupon/mine.vue b/components/mine/coupon/mine.vue
index 5e21429..8348b96 100644
--- a/components/mine/coupon/mine.vue
+++ b/components/mine/coupon/mine.vue
@@ -26,7 +26,6 @@
/**
* coupon 领取的优惠券 自己的优惠券
* @description 优惠券组件
- * @property {Number} type 优惠券操作方式(可兑换的优惠券: 0 / 自己的优惠券: 1)
* @property {Object} coupon-info 优惠券信息
* @event {Function} use 使用优惠券
*/
@@ -36,20 +35,18 @@ export default {
},
props: {
status: Number,
- type: Number,
couponInfo: Object,
goodsClass: Array,
},
created() {
// console.log(this.couponInfo);
- // this.getGoodsClass();
},
filters: {
showClass(value, classList) {
const ids = classList.filter(element => {
return element.gc_id == value;
});
- console.log(ids);
+ // console.log(ids);
return ids.length ? ids[0].gc_name : '';
}
},
diff --git a/components/shop/group/index.vue b/components/shop/group/index.vue
index bae48f7..247ad65 100644
--- a/components/shop/group/index.vue
+++ b/components/shop/group/index.vue
@@ -5,16 +5,15 @@
查看更多>
- sda
- asda
- dsad
- asdas
-
-
-
-
-
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pageB/sdetails/index.vue b/pageB/sdetails/index.vue
index 4b9b5f8..1c2d18f 100644
--- a/pageB/sdetails/index.vue
+++ b/pageB/sdetails/index.vue
@@ -1,9 +1,9 @@
-
+
-
- {{ goodsInfo.store_name }}{{ goodsInfo.goods_name }}
+
+ {{ goodsInfo.store_name }}{{ goodsInfo.goods_name }}
¥{{ goodsInfo.goods_price }}
@@ -15,6 +15,39 @@
+
+
+
+ {{ groupUser.length }}人正在拼团,可直接参与
+
+ 查看全部
+
+
+
+
+
+
+
+
+
+ 查看全部
+
+
+
+
+
+
+ {{ groupUser[0][0].member_nickname }}
+
+
+
+
+ {{ user[0].member_nickname }}
+
+
+
+
+
商品详情
@@ -23,22 +56,31 @@
-
+
+
+ 发起拼团
+ 参与拼团
+
+
+
@@ -128,6 +216,105 @@ export default {
height: 20rpx;
background-color: #ececec;
}
+ .group-user {
+ padding: 30rpx;
+ .top {
+ margin-bottom: 28rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ .title {
+ font-size: 30rpx;
+ color: rgba(51,51,51,1);
+ }
+ .view-more {
+ font-size: 24rpx;
+ color: rgba(153,153,153,1);
+ > image {
+ margin-left: 10rpx;
+ width: 8rpx;
+ height: 16rpx;
+ }
+ }
+ }
+ .bottom {
+ display: flex;
+ align-items: center;
+ font-size: 22rpx;
+ color: rgba(153,153,153,1);
+ .left {
+ margin-right: 40rpx;
+ .avatar {
+ width: 120rpx;
+ height: 60rpx;
+ margin-bottom: 16rpx;
+ position: relative;
+ @mixin avatar($left, $index) {
+ width: 60rpx;
+ height: 60rpx;
+ border-radius: 50%;
+ position: absolute;
+ top: 0;
+ left: $left;
+ z-index: $index;
+ }
+ > image {
+ &:first-child {
+ background-color: aliceblue;
+ @include avatar($left: 0rpx, $index: 7);
+ }
+ &:nth-child(2) {
+ background-color: aquamarine;
+ @include avatar($left: 30rpx, $index: 8);
+ }
+ &:nth-child(3) {
+ background-color: antiquewhite;
+ @include avatar($left: 60rpx, $index: 9);
+ }
+ }
+ }
+ .all {
+ > image {
+ margin-left: 10rpx;
+ width: 8rpx;
+ height: 16rpx;
+ }
+ }
+ }
+ .right {
+ display: flex;
+ image {
+ background-color: aquamarine;
+ width: 60rpx;
+ height: 60rpx;
+ margin-bottom: 15rpx;
+ border-radius: 50%;
+ }
+ .launch-user {
+ margin-right: 40rpx;
+ text-align: center;
+ > text {
+ width: 98rpx;
+ display: block;
+ }
+ }
+ .involvement-user {
+ display: flex;
+ align-items: center;
+ .item {
+ text-align: center;
+ > text {
+ display: block;
+ width: 72rpx;
+ }
+ &:not(:last-child) {
+ margin-right: 30rpx;
+ }
+ }
+ }
+ }
+ }
+ }
.xiangqing{
display: flex;
height: 85rpx;
@@ -149,5 +336,28 @@ export default {
.rich {
width: 100%;
}
+ .group-tool {
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ height: 98rpx;
+ display: flex;
+ font-size: 32rpx;
+ color: rgba(255,255,255,1);
+ z-index: 99;
+ .launch {
+ flex: 1;
+ background: rgba(253,211,96,1);
+ line-height: 98rpx;
+ text-align: center;
+ }
+ .involvement {
+ flex: 1;
+ background: rgba(255,120,15,1);
+ line-height: 98rpx;
+ text-align: center;
+ }
+ }
}
\ No newline at end of file
diff --git a/pageC/cart/ConfirmOrder.vue b/pageC/cart/ConfirmOrder.vue
index 23bfed1..2d7cb77 100644
--- a/pageC/cart/ConfirmOrder.vue
+++ b/pageC/cart/ConfirmOrder.vue
@@ -33,7 +33,7 @@
-
+
优惠券折扣
¥{{ item.coupon_price ? item.coupon_price : '0.00' }}
@@ -69,7 +69,7 @@
优惠券详情
使用优惠券
-
+
@@ -87,7 +87,7 @@