diff --git a/packageE/pages/cart/cart2/cart2.js b/packageE/pages/cart/cart2/cart2.js
index f762957..75799a2 100644
--- a/packageE/pages/cart/cart2/cart2.js
+++ b/packageE/pages/cart/cart2/cart2.js
@@ -934,11 +934,11 @@ Page({
}
}
}
-
}
+
//按门店分类的数组
var arr = new Array();
-
+
var th=this;
th.data.in_zhact_gdmap = {};
//---是不是购买等级卡成功的返回---等级卡显示的判断---
@@ -6811,7 +6811,19 @@ Page({
if (fid > -1) return false;
}
- ob.price += item.goods_price * item.goods_num;
+ //优惠促销取价的优化
+ let f_price=item.goods_price;
+ if(ob.discount_field!=undefined){
+ switch (ob.discount_field){
+ case 0: f_price=item.goods_price;break;
+ case 1: f_price=item.shop_price;break;
+ case 2: f_price=item.market_price;break;
+ }
+ }
+
+ item.goods_price=f_price;
+
+ ob.price += f_price * item.goods_num;
ob.goods_num += item.goods_num;
ob.goods.push({ goods_id: item.goods_id, goods_price: item.goods_price, goods_num: item.goods_num });
@@ -6851,13 +6863,27 @@ Page({
var ob = {};
ob.prom_id = item.prom_id;
ob.name = prom.name;
- ob.price = item.goods_price * item.goods_num;
+
+ //优惠促销取价的优化
+ let f_price=item.goods_price;
+ if(prom.discount_field!=undefined){
+ switch (prom.discount_field){
+ case 0: f_price=item.goods_price;break;
+ case 1: f_price=item.shop_price;break;
+ case 2: f_price=item.goods_market_price;break;
+ }
+ }
+
+ item.goods_price=f_price;
+
+ ob.price = f_price * item.goods_num;
ob.goods_num = item.goods_num;
ob.is_bz = prom.is_bz;
ob.is_xz_yh = prom.is_xz_yh;
ob.is_xz_yh = prom.is_xz_yh;
ob.is_order_yh = prom.is_order_yh;
ob.is_post_temp = prom.is_post_temp;
+ ob.discount_field = prom.discount_field;
ob.goods = new Array();
ob.goods.push({ goods_id: item.goods_id, goods_price: item.goods_price, goods_num: item.goods_num });
map[pickid][item.prom_id] = ob;
@@ -6897,14 +6923,29 @@ Page({
}
})
+
+ //优惠促销取价的优化
+ let f_price=item.goods_price;
+
+ if(prom.discount_field!=undefined){
+ switch (prom.discount_field){
+ case 0: f_price=item.goods_price;break;
+ case 1: f_price=item.shop_price;break;
+ case 2: f_price=item.goods_market_price;break;
+ }
+ }
+
+ item.goods_price=f_price;
+
ob.prom_id = item.prom_id;
ob.name = prom.name;
- ob.price = item.goods_price * item.goods_num;
+ ob.price = f_price * item.goods_num;
ob.goods_num = item.goods_num;
ob.is_bz = prom.is_bz;
ob.is_xz_yh = prom.is_xz_yh;
ob.is_order_yh = prom.is_order_yh;
ob.is_post_temp = prom.is_post_temp;
+ ob.discount_field = prom.discount_field;
ob.goods = new Array();
ob.goods.push({ goods_id: item.goods_id, goods_price: item.goods_price, goods_num: item.goods_num });
var obj = {};
@@ -8298,6 +8339,72 @@ Page({
}
}
func({'code': 0, 'msg': '成功'})
+ },
+
+ //--- 不参与优惠促销的开关 ---
+ no_cj_prom: function (e) {
+
+ let th=this;
+ let can_cx_idx = e.currentTarget.dataset.can_cx_idx; //多促销的索引
+ let pidx = e.currentTarget.dataset.pidx; //订单索引
+ let item = this.data.cartlist[pidx].show_can_cx[can_cx_idx]; //促销内容
+ let pk=this.data.cartlist[pidx].pickup_id; //门店ID
+
+ //给no_cj_prom进行赋值
+ item.no_cj_prom = !item.no_cj_prom ? 1 : 0;
+ var txt = 'cartlist[' + pidx + '].show_can_cx';
+ this.setData({
+ [txt]: this.data.cartlist[pidx].show_can_cx,
+ })
+
+ let ck_prom_type=item.cur_act;
+ //处理一下商品
+ let goods0 = JSON.parse(JSON.stringify(th.data.cartlist_y));
+ let goods = [];
+ for (var ik = 0; ik < goods0.length; ik++) {
+ var item_c = goods0[ik];
+ if (item_c.pick_id == pk && item_c.is_collocation) continue;
+ goods.push(item_c);
+ }
+
+ //-- 此时要把购物车中的商品确定活动 --
+ for (var b = 0; b < ck_prom_type.goods.length; b++) {
+ //-- 开始查找 --
+ var fg = goods.findIndex(function (g_item) {
+ return g_item.goods_id == ck_prom_type.goods[b].goods_id
+ && [0, 3, 5, 7, 10].indexOf(g_item.prom_type) > -1
+ && g_item.pick_id == pk && g_item.is_gift == 0;
+ })
+ if (fg > -1) {
+ goods[fg].prom_type = ck_prom_type.prom_type;
+ goods[fg].prom_id = ck_prom_type.prom_id;
+
+ //如果是不参与的话,商品的活动状态要清理
+ if(item.no_cj_prom){
+ goods[fg].prom_type=0;
+ goods[fg].prom_id=0;
+ }
+
+ for (var ik = 0; ik < th.data.cartlist[pidx].goods.length; ik++) {
+ if (th.data.cartlist[pidx].goods[ik].id == goods[fg].id) {
+ th.data.cartlist[pidx].goods[ik].prom_type = goods[fg].prom_type;
+ th.data.cartlist[pidx].goods[ik].prom_id = goods[fg].prom_id;
+ }
+ }
+ }
+ }
+
+ //原始数据要有深拷贝不能有地址的牵连
+ th.data.cartlist_y = JSON.parse(JSON.stringify(goods))
+
+
+ //重新调用cart_next,进行下一步计算
+ wx.showLoading({
+ title: "处理中.",
+ })
+ this.get_cart_next(null, 1, {prom_type: 0, prom_id: 0});
+
+
}
diff --git a/packageE/pages/cart/cart2/cart2.wxml b/packageE/pages/cart/cart2/cart2.wxml
index 8523ff9..4e3b855 100644
--- a/packageE/pages/cart/cart2/cart2.wxml
+++ b/packageE/pages/cart/cart2/cart2.wxml
@@ -118,57 +118,65 @@
-
-
-
-
-
-
-
-
-
- 促销
-
-
- 优惠促销
- 搭配促销
- 组合购
- 阶梯促销
+
+
+
+
+
+
+
+
+
+
+
+ 促销
+
+
+ 优惠促销
+ 搭配促销
+ 组合购
+ 阶梯促销
+
+
+
+
+
-
-
-
-
-
-
-
-
-
- 促销
-
-
- 优惠促销
- 搭配促销
- 组合购
- 阶梯促销
+
+
+
+
+ 促销
+
+
+ 优惠促销
+ 搭配促销
+ 组合购
+ 阶梯促销
+
+
+
+
+
-
-
-
-
-
+
-
+
+
+
+ 参与优惠活动
+
+
@@ -177,54 +185,61 @@
-
-
-
-
-
-
- 促销
-
-
- 优惠促销
- 搭配促销
- 组合购
- 阶梯促销
+
+
+
+
+
+
+ 促销
+
+
+ 优惠促销
+ 搭配促销
+ 组合购
+ 阶梯促销
+
+
+
+
-
-
-
-
-
-
-
-
- 促销
-
-
- 优惠促销
- 搭配促销
- 组合购
- 阶梯促销
+
+
+
+
+ 促销
+
+
+ 优惠促销
+ 搭配促销
+ 组合购
+ 阶梯促销
+
+
+
+
-
-
-
+
+
+
+
+
+ 参与优惠活动
+
-
-
+
diff --git a/packageE/pages/cart/cart2/filter.wxs b/packageE/pages/cart/cart2/filter.wxs
index d217310..d32491d 100644
--- a/packageE/pages/cart/cart2/filter.wxs
+++ b/packageE/pages/cart/cart2/filter.wxs
@@ -27,6 +27,10 @@ function check_show(items,sele_prom_type){
//is_act_last 是不是最后一个
function check_is_last(index,goods_id){
+
+ if(!index) index='';
+ index+='';
+
var gd_arr=index.split(',');
var idx=-1;
//-- 判断有没有包含商品 --
diff --git a/pages/payment/pay_success/pay_success.js b/pages/payment/pay_success/pay_success.js
index 17cc053..9a120e8 100644
--- a/pages/payment/pay_success/pay_success.js
+++ b/pages/payment/pay_success/pay_success.js
@@ -30,6 +30,29 @@ Page({
});
var type=options.type,order_sn=options.order_sn;
var th=this,order=null;
+
+ getApp().request.promiseGet("/api/weshop/ad/page?pid=1211&store_id=" + getApp().globalData.setting.stoid, {
+ data: {
+ enabled: 1
+ }
+ }).then(res => {
+ if (res.data.code == 0 && res.data.data.pageData && res.data.data.pageData.length > 0) {
+ var a = res.data.data.pageData;
+ var arr = new Array();
+ for (var i = 0; i < a.length; i++) {
+ var tt = {
+ 'ad_code': getApp().globalData.setting.imghost + a[i].ad_code,
+ 'media_link': '',
+ 'ad_weapplink': a[i].ad_weapplink
+ };
+ arr.push(tt);
+ }
+ if (arr.length > 0) th.setData({
+ banner: arr,
+ });
+ }
+ })
+
// 卡项订单
@@ -117,4 +140,10 @@ Page({
var url= '/pages/index/index/index';
getApp().goto(url)
},
+
+ gotoshequn:function(e){
+ getApp().goto(e.currentTarget.dataset.url);
+ },
+
+
})
\ No newline at end of file
diff --git a/pages/payment/pay_success/pay_success.wxml b/pages/payment/pay_success/pay_success.wxml
index 9e123c4..15acf65 100644
--- a/pages/payment/pay_success/pay_success.wxml
+++ b/pages/payment/pay_success/pay_success.wxml
@@ -12,6 +12,39 @@
+
+
+
+
+
+
+
+
+ 订单详情
+
+
+
+
+ 立即预约
+
+
+
+
+
+
+
+ 回到首页
+
+
+ 查看订单
+
+
+
+
+
+
+
+
@@ -78,6 +111,8 @@
+
+
@@ -107,35 +142,10 @@
-
-
-
-
-
-
-
- 订单详情
-
-
-
-
- 立即预约
-
-
-
-
-
-
- 查看订单
-
-
-
-
-
-
- 回到首页
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/payment/pay_success/pay_success.wxss b/pages/payment/pay_success/pay_success.wxss
index 3a996eb..afc16f0 100644
--- a/pages/payment/pay_success/pay_success.wxss
+++ b/pages/payment/pay_success/pay_success.wxss
@@ -64,11 +64,12 @@ page {
.btn {
box-sizing: border-box;
- height: 80rpx;
- line-height: 80rpx;
+ height: 75rpx;
+ line-height: 75rpx;
/* padding: 10rpx; */
text-align: center;
- border-radius: 40rpx;
+ border-radius: 20rpx;
+ padding: 0 40rpx;
}
.pay_home {
@@ -94,3 +95,52 @@ page {
.border {
border: 2rpx solid #ccc;
}
+
+
+.shequn{
+ width: 94%;
+ margin:0 23rpx 23rpx 23rpx;
+ min-height: 260rpx;
+ background: white;
+ border-radius: 15rpx;
+ display: flex;
+}
+
+.shequnleft{
+ display: block;
+ width: 60%;
+ margin: 30rpx;
+}
+.shequnleft .one1{
+ display: flex;
+ width: 100%;
+ height: 110rpx;
+ line-height: 110rpx;
+ margin-top: -15rpx;
+ font-size: 30rpx;
+ color: #313131;
+ font-weight: bold;
+}
+.shequnleft .one2{
+ display: flex;
+ width: 100%;
+ color: #f39700;
+ font-size: 24rpx;
+}
+.shequnleft .one3{
+ display: flex;
+ width: 100%;
+ color: #313131;
+ font-size: 24rpx;
+}
+.shequnright{
+ display: flex;
+ width: 40%;
+ justify-content: center;
+ align-items: center;
+}
+
+.shequnright image{
+ width: 150rpx;
+ height: 150rpx;
+}