-
Status changed to merged
-
mentioned in commit 3c670ec574ca5d77a568c8631b9dbca29194814e
Showing
9 changed files
app.json
@@ -122,8 +122,11 @@ | @@ -122,8 +122,11 @@ | ||
122 | "pages/details_serviceCard/details_serviceCard", | 122 | "pages/details_serviceCard/details_serviceCard", |
123 | "pages/serviceCard_pd/goodsInfo/goodsInfo", | 123 | "pages/serviceCard_pd/goodsInfo/goodsInfo", |
124 | "pages/serviceCard_pd/team_show/team_show", | 124 | "pages/serviceCard_pd/team_show/team_show", |
125 | - "pages/serviceCard_pd/cart/cart" | ||
126 | - ] | 125 | + "pages/serviceCard_pd/cart/cart", |
126 | + "pages/serviceCard_pd/team_success/team_success" | ||
127 | + ], | ||
128 | + | ||
129 | + "plugins":{"live-player-plugin":{"version":"1.3.2","provider":"wx2b03c6e691cd7370"}} | ||
127 | }, | 130 | }, |
128 | { | 131 | { |
129 | "root": "packageB/", | 132 | "root": "packageB/", |
@@ -197,7 +200,8 @@ | @@ -197,7 +200,8 @@ | ||
197 | "pages/user/member/bring/msg/msg", | 200 | "pages/user/member/bring/msg/msg", |
198 | "pages/user/member/account/account", | 201 | "pages/user/member/account/account", |
199 | "pages/user/member/account_unable/account_unable", | 202 | "pages/user/member/account_unable/account_unable", |
200 | - "pages/user/member/cash_record/cash_record" | 203 | + "pages/user/member/cash_record/cash_record", |
204 | + "pages/gift/gift" | ||
201 | ] | 205 | ] |
202 | } | 206 | } |
203 | 207 | ||
@@ -268,4 +272,5 @@ | @@ -268,4 +272,5 @@ | ||
268 | "uploadFile":15000, | 272 | "uploadFile":15000, |
269 | "connectSocket":15000 | 273 | "connectSocket":15000 |
270 | } | 274 | } |
275 | + | ||
271 | } | 276 | } |
272 | \ No newline at end of file | 277 | \ No newline at end of file |
packageD/pages/gift/gift.js
0 → 100644
1 | +var os = getApp().globalData.setting,ut = require("../../../utils/util.js"); | ||
2 | +var regeneratorRuntime = require('../../../utils/runtime.js'); | ||
3 | + | ||
4 | + | ||
5 | +Page({ | ||
6 | + data: { | ||
7 | + iurl:os.imghost | ||
8 | + }, | ||
9 | + /** | ||
10 | + * 生命周期函数--监听页面加载 | ||
11 | + */ | ||
12 | + onLoad:async function (options) { | ||
13 | + wx.showLoading(); | ||
14 | + var prom=null; | ||
15 | + var prom_list=null; | ||
16 | + //-- 获取活动 -- | ||
17 | + var url="/api/weshop/promgoods/get/"+os.stoid+"/"+options.prom_id; | ||
18 | + await getApp().promiseGet(url,{}).then(res=>{ | ||
19 | + if(res.data.code==0){ | ||
20 | + prom=res.data.data; | ||
21 | + } | ||
22 | + }) | ||
23 | + //-- 获取活动列表 -- | ||
24 | + var url1="/api/weshop/promgoodslist/list"; | ||
25 | + var req_data={ | ||
26 | + prom_id:options.prom_id | ||
27 | + } | ||
28 | + await getApp().promiseGet(url1,{data:req_data}).then(res=>{ | ||
29 | + if(res.data.code==0){ | ||
30 | + prom_list=res.data.data; | ||
31 | + } | ||
32 | + }) | ||
33 | + | ||
34 | + var list=prom_list[options.index]; | ||
35 | + var rule=JSON.parse(list.preferential_type); | ||
36 | + | ||
37 | + var gift_id=rule.gift; | ||
38 | + var g_arr=gift_id.split(","); | ||
39 | + var gift_goods=[]; | ||
40 | + for(let i in g_arr){ | ||
41 | + let item=g_arr[i]; | ||
42 | + var gift=null; | ||
43 | + var good=null; | ||
44 | + var url2="/api/weshop/prom/gift/page?store_id="+os.stoid+"&id="+item; | ||
45 | + await getApp().promiseGet(url2,{}).then(res=>{ | ||
46 | + if(ut.ajax_ok(res)){ | ||
47 | + gift=res.data.data.pageData[0]; | ||
48 | + } | ||
49 | + }) | ||
50 | + | ||
51 | + var url3="/api/weshop/goods/get/"+os.stoid+"/"+gift.goods_id; | ||
52 | + await getApp().promiseGet(url3,{}).then(res=>{ | ||
53 | + if(res.data.code==0){ | ||
54 | + good=res.data.data; | ||
55 | + } | ||
56 | + }) | ||
57 | + gift_goods.push(good) | ||
58 | + } | ||
59 | + | ||
60 | + this.setData({ | ||
61 | + prom:prom,list:list,gift_goods:gift_goods,zp_num:rule.zp_num | ||
62 | + }) | ||
63 | + wx.hideLoading(); | ||
64 | + | ||
65 | + }, | ||
66 | + /*** 生命周期函数--监听页面显示 */ | ||
67 | + onShow:function () { | ||
68 | + | ||
69 | + }, | ||
70 | + | ||
71 | + | ||
72 | + | ||
73 | + | ||
74 | + | ||
75 | + | ||
76 | +}) | ||
0 | \ No newline at end of file | 77 | \ No newline at end of file |
packageD/pages/gift/gift.json
0 → 100644
packageD/pages/gift/gift.wxml
0 → 100644
1 | +<!-- 多赠品 --> | ||
2 | +<view class="duo_gift_sele"> | ||
3 | + <!-- top act_name --> | ||
4 | + <view class="flex gift_top_v ai_c fs30" style="padding-left: 30rpx; margin: 20rpx 0"> | ||
5 | + {{prom.name}},满{{list.condition}}{{list.prom_type==1?'件':'元'}},可任选{{zp_num}}件商品为赠品 | ||
6 | + </view> | ||
7 | + | ||
8 | + <view class="gd_content"> | ||
9 | + <!-- 赠品选择 --> | ||
10 | + <view class="order-item" wx:for="{{gift_goods}}" wx:for-item="items" wx:for-index="idx"> | ||
11 | + <navigator class="goods-img rel" bindtap="go_gd" data-gd="{{items.goods_id}}"> | ||
12 | + <image class="wh100" src="{{iurl+items.original_img}}" binderror="bind_bnerr2" data-errorimg="gift_goods[{{idx}}].original_img"></image> | ||
13 | + </navigator> | ||
14 | + <view class="goods-cont"> | ||
15 | + <view class="goods-name"> | ||
16 | + <navigator bindtap="go_gd" class="ellipsis-2 fs30" data-gd="{{items.goods_id}}">{{items.goods_name}}</navigator> | ||
17 | + </view> | ||
18 | + <view class="specifications ellipsis-1"> | ||
19 | + <view wx:if="{{items.goods_color || items.goods_spec}}"> | ||
20 | + {{items.goods_color}}{{items.goods_color?"/":''}}{{items.goods_spec}}</view> | ||
21 | + <view wx:else>规格1</view> | ||
22 | + </view> | ||
23 | + | ||
24 | + <view class="flex ai_c"> | ||
25 | + <view class="goods-price co-red ellipsis-1"> | ||
26 | + <view class="fs30">¥{{items.shop_price}}</view> | ||
27 | + </view> | ||
28 | + | ||
29 | + <view class="line_th fs22" style="color: #999; margin-left: 10rpx">¥{{items.market_price}}</view> | ||
30 | + </view> | ||
31 | + | ||
32 | + </view> | ||
33 | + </view> | ||
34 | + </view> | ||
35 | + | ||
36 | +</view> |
packageD/pages/gift/gift.wxss
0 → 100644
1 | +page{ background-color:#f0f0f0 } | ||
2 | +.gd_content{ | ||
3 | + background-color: #fff; border-top-left-radius: 20rpx; border-top-right-radius: 20rpx; | ||
4 | +} | ||
5 | + | ||
6 | +.order-item { | ||
7 | + display: flex; | ||
8 | + height: 246rpx; | ||
9 | + border-top: 3rpx solid rgb(245, 245, 245); | ||
10 | + align-items: center; | ||
11 | + padding-right: 30rpx; | ||
12 | +} | ||
13 | + | ||
14 | +.goods-img { | ||
15 | + float: left; | ||
16 | + width: 200rpx; | ||
17 | + height: 200rpx; | ||
18 | + margin: 0 20rpx; | ||
19 | +} | ||
20 | +.goods-cont { | ||
21 | + width: 420rpx; | ||
22 | + height: 165rpx; | ||
23 | + font-size: 28rpx; | ||
24 | + margin-left: 35rpx; | ||
25 | + padding-top: 7rpx; | ||
26 | + padding-bottom: 5rpx; | ||
27 | +} | ||
28 | +.goods-name{ | ||
29 | + max-height: 60rpx; | ||
30 | + line-height: 30rpx; | ||
31 | + margin-bottom: 16rpx; | ||
32 | + font-size:26rpx; | ||
33 | + width: 490rpx; | ||
34 | + display: -webkit-box; | ||
35 | + word-break: break-all; | ||
36 | + -webkit-box-orient: vertical; | ||
37 | + -webkit-line-clamp:1; | ||
38 | + overflow: hidden; | ||
39 | + text-overflow:ellipsis; | ||
40 | + height: 30rpx; | ||
41 | + color: #1d1d1d; | ||
42 | +} | ||
43 | +.specifications { | ||
44 | + padding: 3rpx 8rpx; | ||
45 | + margin-top: 8rpx; | ||
46 | + font-size: 22rpx; | ||
47 | + max-width: 356rpx; | ||
48 | + width: auto; | ||
49 | + height: 30rpx; | ||
50 | + line-height: 29rpx; | ||
51 | + background-color: rgb(236, 236, 236); | ||
52 | + border-radius: 8rpx; | ||
53 | + white-space: nowrap; | ||
54 | + color: rgb(63, 63, 63); | ||
55 | + display: inline-block; | ||
56 | +} | ||
57 | + | ||
58 | +.line_th { | ||
59 | + text-decoration: line-through; | ||
60 | +} | ||
61 | + |
pages/cart/cart2/cart2.js
@@ -2428,11 +2428,11 @@ Page({ | @@ -2428,11 +2428,11 @@ Page({ | ||
2428 | 'shipping_code': th.data.bn_exp_type == 1 ? 0 : th.data.wu_arr[th.data.index].code, | 2428 | 'shipping_code': th.data.bn_exp_type == 1 ? 0 : th.data.wu_arr[th.data.index].code, |
2429 | 'shipping_name': th.data.bn_exp_type == 1 ? '' : th.data.wu_arr[th.data.index].name, | 2429 | 'shipping_name': th.data.bn_exp_type == 1 ? '' : th.data.wu_arr[th.data.index].name, |
2430 | 'invoice_title': '', | 2430 | 'invoice_title': '', |
2431 | - 'goods_price': th.data.formData.all_price, //商品总价 | ||
2432 | - 'shipping_price': th.data.formData.shipping_price, //物流金额 | ||
2433 | - 'user_money': th.data.formData.user_money, //使用余额 | ||
2434 | - 'total_amount': th.data.formData.total_amount, //订单总价 | ||
2435 | - 'order_amount': th.data.formData.order_amount, //应付 | 2431 | + 'goods_price': parseFloat(th.data.formData.all_price).toFixed(2), //商品总价 |
2432 | + 'shipping_price': parseFloat(th.data.formData.shipping_price).toFixed(2), //物流金额 | ||
2433 | + 'user_money': parseFloat(th.data.formData.user_money).toFixed(2), //使用余额 | ||
2434 | + 'total_amount': parseFloat(th.data.formData.total_amount).toFixed(2), //订单总价 | ||
2435 | + 'order_amount': parseFloat(th.data.formData.order_amount).toFixed(2), //应付 | ||
2436 | 'user_note': th.data.user_note['0'] ? th.data.user_note['0'] : 0, //用户备注 | 2436 | 'user_note': th.data.user_note['0'] ? th.data.user_note['0'] : 0, //用户备注 |
2437 | 'store_id': oo.stoid, //商家 | 2437 | 'store_id': oo.stoid, //商家 |
2438 | 'pickup_id': th.data.bn_pick, //门店 | 2438 | 'pickup_id': th.data.bn_pick, //门店 |
@@ -2687,11 +2687,11 @@ Page({ | @@ -2687,11 +2687,11 @@ Page({ | ||
2687 | 'shipping_code': th.data.is_all_zt == 1 ? 0 : th.data.wu_arr[t_item.wind].code, | 2687 | 'shipping_code': th.data.is_all_zt == 1 ? 0 : th.data.wu_arr[t_item.wind].code, |
2688 | 'shipping_name': th.data.is_all_zt == 1 ? '' : th.data.wu_arr[t_item.wind].name, | 2688 | 'shipping_name': th.data.is_all_zt == 1 ? '' : th.data.wu_arr[t_item.wind].name, |
2689 | 'invoice_title': '', | 2689 | 'invoice_title': '', |
2690 | - 'goods_price': t_item.goods_price, //商品总价 | ||
2691 | - 'shipping_price': t_item.shipping_price, //物流金额 | ||
2692 | - 'user_money': t_item.user_money, //使用余额 | ||
2693 | - 'total_amount': t_item.total_amount, //订单总价 | ||
2694 | - 'order_amount': t_item.order_amount, //应付 | 2690 | + 'goods_price': parseFloat(t_item.goods_price).toFixed(2), //商品总价 |
2691 | + 'shipping_price': parseFloat(t_item.shipping_price).toFixed(2), //物流金额 | ||
2692 | + 'user_money': parseFloat(t_item.user_money).toFixed(2), //使用余额 | ||
2693 | + 'total_amount': parseFloat(t_item.total_amount).toFixed(2), //订单总价 | ||
2694 | + 'order_amount': parseFloat(t_item.order_amount).toFixed(2), //应付 | ||
2695 | 'user_note': val_arr[i], //用户备注 | 2695 | 'user_note': val_arr[i], //用户备注 |
2696 | 'store_id': oo.stoid, //商家 | 2696 | 'store_id': oo.stoid, //商家 |
2697 | 'pickup_id': t_item.pickup_id, //门店 | 2697 | 'pickup_id': t_item.pickup_id, //门店 |
pages/goods/goodsInfo/g_filter.wxs
@@ -98,10 +98,17 @@ var g_filters = { | @@ -98,10 +98,17 @@ var g_filters = { | ||
98 | } else { | 98 | } else { |
99 | return value.toFixed(0); | 99 | return value.toFixed(0); |
100 | }; | 100 | }; |
101 | - }, | 101 | + }, |
102 | + | ||
103 | + is_more_gift:function(str){ | ||
104 | + var arr=str.split(","); | ||
105 | + return arr.length; | ||
106 | + } | ||
107 | + | ||
102 | } | 108 | } |
103 | module.exports = { | 109 | module.exports = { |
104 | is_has_rank:g_filters.is_has_rank, | 110 | is_has_rank:g_filters.is_has_rank, |
105 | get_card_price:g_filters.get_card_price, | 111 | get_card_price:g_filters.get_card_price, |
106 | num:g_filters.num, | 112 | num:g_filters.num, |
113 | + is_more_gift:g_filters.is_more_gift | ||
107 | } | 114 | } |
108 | \ No newline at end of file | 115 | \ No newline at end of file |
pages/goods/goodsInfo/goodsInfo.js
@@ -6994,12 +6994,14 @@ Page({ | @@ -6994,12 +6994,14 @@ Page({ | ||
6994 | hiddenCS: true, | 6994 | hiddenCS: true, |
6995 | }); | 6995 | }); |
6996 | }, | 6996 | }, |
6997 | - | ||
6998 | - | ||
6999 | 6997 | ||
7000 | - | ||
7001 | - | ||
7002 | - | ||
7003 | - | 6998 | + |
6999 | + //显示多赠品 | ||
7000 | + show_zp:function (e) { | ||
7001 | + var prom_id=e.currentTarget.dataset.prom; | ||
7002 | + var index=e.currentTarget.dataset.index; | ||
7003 | + getApp().goto("/packageD/pages/gift/gift?prom_id="+prom_id+"&index="+index); | ||
7004 | + } | ||
7005 | + | ||
7004 | 7006 | ||
7005 | }) | 7007 | }) |
pages/goods/goodsInfo/goodsInfo.wxml
@@ -505,8 +505,16 @@ | @@ -505,8 +505,16 @@ | ||
505 | <text class="tick lh2 pdr20" wx:if="{{item.past==1}}">包邮</text> | 505 | <text class="tick lh2 pdr20" wx:if="{{item.past==1}}">包邮</text> |
506 | <text class="tick lh2 pdr20" wx:if="{{item.intValue>0}}">送{{item.intValue}}积分</text> | 506 | <text class="tick lh2 pdr20" wx:if="{{item.intValue>0}}">送{{item.intValue}}积分</text> |
507 | <view class="tick lh2 pdr20" wx:if="{{item.couponId>0}}">送{{item.couponMoney}}元优惠券</view> | 507 | <view class="tick lh2 pdr20" wx:if="{{item.couponId>0}}">送{{item.couponMoney}}元优惠券</view> |
508 | - <view class="tick ellipsis-1x lh2" wx:if="{{item.gift_id}}">送赠品</view> | ||
509 | - <view class="tick ellipsis-1x lh2 details pdr40" wx:if="{{item.lb_id>0}}" data-id="{{item.lb_id}}" bindtap="viewLbDetails">送{{item.lbtitle}}</view> | 508 | + |
509 | + <block wx:if="{{item.gift_id}}"> | ||
510 | + <view class="tick ellipsis-1x lh2 details pdr40" bindtap="show_zp" data-index="{{index}}" data-prom="{{item.prom_id}}" | ||
511 | + wx:if="{{g_filters.is_more_gift(item.gift_id)>1}}" >送赠品</view> | ||
512 | + <view class="tick ellipsis-1x lh2" wx:else >送{{item.goods_name}}</view> | ||
513 | + </block> | ||
514 | + | ||
515 | + | ||
516 | + | ||
517 | + <view class="tick ellipsis-1x lh2 details pdr40" wx:if="{{item.lb_id>0}}" data-id="{{item.lb_id}}" bindtap="viewLbDetails">送{{item.lbtitle}}</view> | ||
510 | <view class="tick ellipsis-1x lh2 details pdr40" wx:if="{{item.zxlb_id>0}}" data-id="{{item.zxlb_id}}" data-flag="1" bindtap="viewLbDetails">送{{item.zxlbtitle}}</view> | 518 | <view class="tick ellipsis-1x lh2 details pdr40" wx:if="{{item.zxlb_id>0}}" data-id="{{item.zxlb_id}}" data-flag="1" bindtap="viewLbDetails">送{{item.zxlbtitle}}</view> |
511 | </view> | 519 | </view> |
512 | </view> | 520 | </view> |
@@ -1282,7 +1290,7 @@ | @@ -1282,7 +1290,7 @@ | ||
1282 | <text wx:if="{{hui_condition.past==1}}">,包邮</text> | 1290 | <text wx:if="{{hui_condition.past==1}}">,包邮</text> |
1283 | <text wx:if="{{hui_condition.intValue>0}}">,送{{hui_condition.intValue}}积分</text> | 1291 | <text wx:if="{{hui_condition.intValue>0}}">,送{{hui_condition.intValue}}积分</text> |
1284 | <text wx:if="{{hui_condition.couponId>0}}">,送优惠券</text> | 1292 | <text wx:if="{{hui_condition.couponId>0}}">,送优惠券</text> |
1285 | - <text wx:if="{{hui_condition.gift_id>0}}">,送赠品</text> | 1293 | + <text wx:if="{{hui_condition.gift_id}}">,送赠品</text> |
1286 | <text wx:if="{{hui_condition.lb_id>0}}">,送礼包</text> | 1294 | <text wx:if="{{hui_condition.lb_id>0}}">,送礼包</text> |
1287 | <text wx:if="{{hui_condition.zxlb_id>0}}">,送专享礼包</text> | 1295 | <text wx:if="{{hui_condition.zxlb_id>0}}">,送专享礼包</text> |
1288 | </view> | 1296 | </view> |