diff --git a/app.js b/app.js
index ab59cec..44ce1a7 100644
--- a/app.js
+++ b/app.js
@@ -51,7 +51,7 @@ App({
config: null, //门店参数
config2: null, //门店配置
code: null,
- user_id:null,// qa-6519858,//
+ user_id:null,// 6520352,// qa-6519858,//
// user_id:6520314,// qa-6519858,//
// user_id:14148118,// qa-6519858,//
buy_now: null,
@@ -928,7 +928,7 @@ App({
});
},
- user_tools_endTime(type) {
+ user_tools_endTime(type,func) {
//调用接口判断商家工具有没有过期
return this.request.promiseGet("/store/storemoduleendtime/page?store_id=" + os.stoid + "&type=" + type + "", {}).then(res => {
if (res.data.code == 0) {
@@ -938,8 +938,18 @@ App({
if (item.is_sy == 0) {
var now = Date.parse(new Date()); now = now / 1000;
if (item.end_time < now) {
+
+ if(func){
+ func(0)
+ return false;
+ }
return 0
}
+ if(func){
+ func(1)
+ return false;
+ }
+
return 1;
}
}
diff --git a/app.json b/app.json
index 7b545a5..6396a49 100644
--- a/app.json
+++ b/app.json
@@ -37,7 +37,7 @@
"pages/user/grow_value/grow_value",
"pages/payment/pay_success/pay_success",
"pages/user/plus/plus",
- "pages/user/cardinfo/cardinfo",
+
"pages/user/my_service/appment_main",
"pages/user/my_service/i_service",
"pages/user/my_service/cosmetology_list",
@@ -209,7 +209,8 @@
"pages": [
"pages/togoin/togoin",
"pages/user/Detailed/Detailed",
- "pages/user/user_fw/user_fw"
+ "pages/user/user_fw/user_fw",
+ "pages/user/cardinfo/cardinfo"
]
}
diff --git a/app.wxss b/app.wxss
index 08bca93..a37615e 100644
--- a/app.wxss
+++ b/app.wxss
@@ -380,7 +380,7 @@ button {
.modal-close {
position: absolute;
right: 25rpx;
- top:40rpx;
+ top:16rpx;
}
.no-data {
width: 100%;
diff --git a/components/cart_collect_temp/cart_collect_temp.js b/components/cart_collect_temp/cart_collect_temp.js
new file mode 100644
index 0000000..8b9d265
--- /dev/null
+++ b/components/cart_collect_temp/cart_collect_temp.js
@@ -0,0 +1,57 @@
+Component({
+ properties: {
+ // 这里定义了数据列表属性,列表显示数据
+ all_collocation_list: {
+ type: Array,
+ value: null
+ },
+ // 是不是购物车
+ is_cart: {
+ type: Boolean,
+ value: false
+ },
+ // 购物车的索引
+ cart_index: {
+ type: Number,
+ value: 0
+ }
+
+ },
+ /*** 页面的初始数据***/
+ data: {
+ imgUrl: getApp().globalData.setting.imghost,
+ },
+ methods: {
+ select_coll(e) {
+ var index = e.currentTarget.dataset.index;
+ var itr = this.properties.all_collocation_list[index];
+ var ob = {
+ index: index,
+ selected: !itr.selected
+ }
+
+ if(this.properties.is_cart){
+ ob.is_cart =1;
+ ob.cart_index =this.properties.cart_index;
+ }
+
+ var txt = "all_collocation_list[" + index + "].selected"
+
+ this.setData({[txt]: ob.selected})
+ this.triggerEvent('childFun', ob);
+ },
+
+ //图片失败,默认图片
+ bind_bnerr3: function (e) {
+ var _errImg = e.target.dataset.errorimg;
+ var _Img = e.target.dataset.img;
+ if (_Img != undefined) {
+ var _errObj = {};
+ _errObj[_errImg] = "/public/images/default_goods_image_240.gif";
+ this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
+ }
+ },
+
+
+ }
+})
\ No newline at end of file
diff --git a/components/cart_collect_temp/cart_collect_temp.json b/components/cart_collect_temp/cart_collect_temp.json
new file mode 100644
index 0000000..e8cfaaf
--- /dev/null
+++ b/components/cart_collect_temp/cart_collect_temp.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/components/cart_collect_temp/cart_collect_temp.wxml b/components/cart_collect_temp/cart_collect_temp.wxml
new file mode 100644
index 0000000..a73eaa0
--- /dev/null
+++ b/components/cart_collect_temp/cart_collect_temp.wxml
@@ -0,0 +1,26 @@
+
+
+ 超值搭配
+
+
+
+
+
+
+
+ {{item.goods_name}}
+
+ ¥{{item.price}}
+
+
+
+
+
+
+
+
+
diff --git a/components/cart_collect_temp/cart_collect_temp.wxss b/components/cart_collect_temp/cart_collect_temp.wxss
new file mode 100644
index 0000000..650b3d8
--- /dev/null
+++ b/components/cart_collect_temp/cart_collect_temp.wxss
@@ -0,0 +1,3 @@
+@import '../../app.wxss';
+@import "../../pages/index/index/index.wxss";
+
diff --git a/components/diy_advertising/diy_advertising.wxss b/components/diy_advertising/diy_advertising.wxss
index 294d632..3785961 100644
--- a/components/diy_advertising/diy_advertising.wxss
+++ b/components/diy_advertising/diy_advertising.wxss
@@ -66,6 +66,14 @@
margin: 0rpx;
}
+.s8_gk2 image {
+ width: 100%;
+ height: 488rpx;
+ vertical-align: top;
+ padding: 0rpx;
+ margin: 0rpx;
+}
+
.s7_gk7 image {
width: 100%;
height: 100%;
diff --git a/components/diy_goodsGroup/diy_goodsGroup.js b/components/diy_goodsGroup/diy_goodsGroup.js
index 1ee8e01..5334302 100644
--- a/components/diy_goodsGroup/diy_goodsGroup.js
+++ b/components/diy_goodsGroup/diy_goodsGroup.js
@@ -56,6 +56,11 @@ Component({
title_class: "",
is_no_plus: 1,
container: null,
+
+ //判断接口是不是调用完成
+ is_get:0,
+
+ is_retail_price:0 //是否显示零售价
},
lifetimes: {
@@ -315,44 +320,10 @@ Component({
getApp().getConfig2(function (e) {
var swithc_list = e.switch_list;
var sw_arr = JSON.parse(swithc_list);
- //---如果后台又开等级卡的开关---
- if (sw_arr.rank_switch && sw_arr.rank_switch == "2") {
- th.setData({
- rank_switch: true
- });
- //---回调卡的列表---
- th.getPlusCardType(function (ob) {
- th.setData({
- card_list: ob.card_list
- });
- var ti = setInterval(function () {
- var user = getApp().globalData.userInfo;
- if (!user) return false;
- clearInterval(ti);
-
- if (user.card_field && user['card_expiredate']) {
- var str = user['card_expiredate'].replace(/-/g, '/');
- var end = new Date(str);
- end = Date.parse(end) / 1000;
- var now = ut.gettimestamp();
-
- //--- 判断是等级会员,且在有效期范围内 ---
- if (user.card_field && now < end) {
- var card_name = ob.name_map.get(user.card_field);
- if (card_name && card_name.length > 4) card_name = card_name.substring(0, 4);
- th.setData({
- card_field: user.card_field,
- card_name: card_name,
- card_list: ob.card_list
- });
- }
-
- }
-
- }, 500)
- })
-
+ if(sw_arr.is_retail_price){
+ th.setData({is_retail_price:1});
}
+ ut.get_plus_name_price(sw_arr,th);
})
}
})
@@ -571,11 +542,12 @@ Component({
for (var i = 0; i < rData.length; i += 3) {
arr.push(rData.slice(i, i + 3));
}
- th.setData({ goods_array: arr, page: th.data.currentPage - 1, });
+ th.setData({ goods_array: arr, page: th.data.currentPage - 1,is_get:1 });
} else {
th.setData({
goods_array: th.data.requestData,
page: th.data.currentPage - 1,
+ is_get:1
});
}
diff --git a/components/diy_goodsGroup/diy_goodsGroup.wxml b/components/diy_goodsGroup/diy_goodsGroup.wxml
index dcf0dd8..98c1a79 100644
--- a/components/diy_goodsGroup/diy_goodsGroup.wxml
+++ b/components/diy_goodsGroup/diy_goodsGroup.wxml
@@ -25,7 +25,7 @@
-
+
@@ -67,7 +67,7 @@
+
¥{{item.prom_price}}
-
+ ¥{{item.market_price}}
@@ -89,10 +89,10 @@
-
-
-
-
+
+ ¥
+ {{item.market_price}}
+
@@ -105,10 +105,10 @@
-
-
-
-
+
+ ¥
+ {{item.market_price}}
+
@@ -122,10 +122,10 @@
{{filter.toFix(item.shop_price,2)}}
-
-
-
-
+
+ ¥
+ {{item.market_price}}
+
@@ -150,10 +150,10 @@
-
-
-
-
+
+ ¥
+ {{item.market_price}}
+
@@ -161,7 +161,7 @@
¥{{item.shop_price}}
-
+ ¥{{item.market_price}}
@@ -237,7 +237,7 @@
+
¥{{item.prom_price}}
-
+ ¥{{item.market_price}}
@@ -258,10 +258,10 @@
-
-
-
-
+
+ ¥
+ {{item.market_price}}
+
@@ -274,10 +274,10 @@
-
-
-
-
+
+ ¥
+ {{item.market_price}}
+
@@ -291,10 +291,10 @@
{{filter.toFix(item.shop_price,2)}}
-
-
-
-
+
+ ¥
+ {{item.market_price}}
+
@@ -319,17 +319,17 @@
-
-
-
-
+
+ ¥
+ {{item.market_price}}
+
¥{{item.shop_price}}
-
+ ¥{{item.market_price}}
@@ -406,7 +406,7 @@
+
¥{{item.prom_price}}
-
+ ¥{{item.market_price}}
@@ -427,10 +427,10 @@
-
-
-
-
+
+ ¥
+ {{item.market_price}}
+
@@ -443,10 +443,10 @@
-
-
-
-
+
+ ¥
+ {{item.market_price}}
+
@@ -460,10 +460,10 @@
{{filter.toFix(item.shop_price,2)}}
-
-
-
-
+
+ ¥
+ {{item.market_price}}
+
@@ -488,17 +488,17 @@
-
-
-
-
+
+ ¥
+ {{item.market_price}}
+
¥{{item.shop_price}}
-
+ ¥{{item.market_price}}
@@ -577,7 +577,7 @@
+
¥{{item.prom_price}}
-
+ ¥{{item.market_price}}
@@ -600,10 +600,10 @@
-
-
-
-
+
+ ¥
+ {{item.market_price}}
+
@@ -616,10 +616,10 @@
-
-
-
-
+
+ ¥
+ {{item.market_price}}
+
@@ -633,10 +633,10 @@
{{filter.toFix(item.shop_price,2)}}
-
-
-
-
+
+ ¥
+ {{item.market_price}}
+
@@ -660,10 +660,10 @@
-
-
-
-
+
+ ¥
+ {{item.market_price}}
+
@@ -671,7 +671,7 @@
¥{{item.shop_price}}
-
+ ¥{{item.market_price}}
@@ -772,7 +772,7 @@
+
¥{{aitem.prom_price}}
-
+ ¥{{aitem.market_price}}
@@ -793,10 +793,10 @@
-
-
-
-
+
+ ¥
+ {{aitem.market_price}}
+
@@ -809,10 +809,10 @@
-
-
-
-
+
+ ¥
+ {{aitem.market_price}}
+
@@ -826,10 +826,10 @@
{{filter.toFix(aitem.shop_price,2)}}
-
-
-
-
+
+ ¥
+ {{aitem.market_price}}
+
@@ -854,17 +854,17 @@
-
-
-
-
+
+ ¥
+ {{aitem.market_price}}
+
¥{{aitem.shop_price}}
-
+ ¥{{aitem.market_price}}
@@ -898,5 +898,8 @@
-暂无数据
+暂无数据
+
+
+
\ No newline at end of file
diff --git a/components/diy_goodsGroup/diy_goodsGroup.wxss b/components/diy_goodsGroup/diy_goodsGroup.wxss
index 616c4bf..496b5ff 100644
--- a/components/diy_goodsGroup/diy_goodsGroup.wxss
+++ b/components/diy_goodsGroup/diy_goodsGroup.wxss
@@ -912,6 +912,7 @@ top: 10rpx;
text-align: center;
}
-
-
+.flex{ display: flex;}
+.jcc{ justify-content: center;}
+.loader{ width:750rpx; margin:20rpx 0}
diff --git a/components/diy_groupbuy/diy_groupbuy.js b/components/diy_groupbuy/diy_groupbuy.js
index c73b494..28466b5 100644
--- a/components/diy_groupbuy/diy_groupbuy.js
+++ b/components/diy_groupbuy/diy_groupbuy.js
@@ -59,7 +59,19 @@ Component({
init: function (g_id) {
- var th = this, app = getApp(), goodsidlist = "";
+
+ var th=this;
+ getApp().getConfig2(function (e) {
+ var swithc_list = e.switch_list;
+ var sw_arr = JSON.parse(swithc_list);
+
+ if(sw_arr.is_retail_price){
+ th.setData({is_retail_price:1});
+ }
+ })
+
+
+ var app = getApp(), goodsidlist = "";
if (g_id.data && g_id.data.length > 0) {
//--先把商品ID串起来--
g_id.data.forEach(function (val, ind) {
diff --git a/components/diy_groupbuy/diy_groupbuy.wxml b/components/diy_groupbuy/diy_groupbuy.wxml
index 796d0f7..e928d9e 100644
--- a/components/diy_groupbuy/diy_groupbuy.wxml
+++ b/components/diy_groupbuy/diy_groupbuy.wxml
@@ -39,7 +39,7 @@
{{aitem.goods_name}}
¥{{aitem.price}}
-
+ ¥{{aitem.market_price}}
+ ¥{{aitem.market_price}}
diff --git a/components/diy_luckyGo/diy_luckyGo.js b/components/diy_luckyGo/diy_luckyGo.js
index c5a47ba..a40cf99 100644
--- a/components/diy_luckyGo/diy_luckyGo.js
+++ b/components/diy_luckyGo/diy_luckyGo.js
@@ -60,7 +60,18 @@ Component({
// 这里是一个自定义方法
customMethod: function () { },
init: function (g_id) {
- var th = this, app = getApp(), goodsidlist = "";
+ var th = this;
+
+ getApp().getConfig2(function (e) {
+ var swithc_list = e.switch_list;
+ var sw_arr = JSON.parse(swithc_list);
+
+ if(sw_arr.is_retail_price){
+ th.setData({is_retail_price:1});
+ }
+ })
+
+ var app = getApp(), goodsidlist = "";
if (g_id.data_type == 2) {
if (g_id.data && g_id.data.length > 0) {
//--先把商品ID串起来--
diff --git a/components/diy_luckyGo/diy_luckyGo.wxml b/components/diy_luckyGo/diy_luckyGo.wxml
index 1ed81e2..60bb7bf 100644
--- a/components/diy_luckyGo/diy_luckyGo.wxml
+++ b/components/diy_luckyGo/diy_luckyGo.wxml
@@ -27,9 +27,9 @@
{{aitem.title}}
-
+
{{filters.price(aitem.group_price)}}
-
+ {{aitem.market_price}}
diff --git a/components/diy_pingd_buy/diy_pingd_buy.js b/components/diy_pingd_buy/diy_pingd_buy.js
index a33ca6c..1b5e23d 100644
--- a/components/diy_pingd_buy/diy_pingd_buy.js
+++ b/components/diy_pingd_buy/diy_pingd_buy.js
@@ -65,8 +65,22 @@ Component({
// 这里是一个自定义方法
customMethod: function() {},
init: function(g_id) {
- var th = this,
- app = getApp(), all_array = [],
+
+ var th = this;
+ getApp().getConfig2(function (e) {
+ var swithc_list = e.switch_list;
+ var sw_arr = JSON.parse(swithc_list);
+
+ if(sw_arr.is_retail_price){
+ th.setData({is_retail_price:1});
+ }
+ })
+
+
+
+
+
+ var app = getApp(), all_array = [],
index = 0,
goodsidlist="";
diff --git a/components/diy_pingd_buy/diy_pingd_buy.wxml b/components/diy_pingd_buy/diy_pingd_buy.wxml
index 12a1769..7cb7dcd 100644
--- a/components/diy_pingd_buy/diy_pingd_buy.wxml
+++ b/components/diy_pingd_buy/diy_pingd_buy.wxml
@@ -46,7 +46,7 @@
{{aitem.title}}
¥{{aitem.price}}
-
+ ¥{{aitem.market_price}}
{{aitem.ct_num}}人团
@@ -91,7 +91,7 @@
¥{{aitem.price}}
-
+ ¥{{aitem.market_price}}
diff --git a/components/diy_pregoods/diy_pregoods.js b/components/diy_pregoods/diy_pregoods.js
index 3d2e424..29dfa98 100644
--- a/components/diy_pregoods/diy_pregoods.js
+++ b/components/diy_pregoods/diy_pregoods.js
@@ -33,7 +33,19 @@ Component({
methods: {
// 这里是一个自定义方法
init: function(g_id) {
- var th = this, app = getApp(), goodsidlist="";
+ var th = this;
+
+ getApp().getConfig2(function (e) {
+ var swithc_list = e.switch_list;
+ var sw_arr = JSON.parse(swithc_list);
+
+ if(sw_arr.is_retail_price){
+ th.setData({is_retail_price:1});
+ }
+ })
+
+
+ var app = getApp(), goodsidlist="";
if(g_id && g_id.length>0){
//--先把商品ID串起来--
g_id.forEach(function(val, ind) {
diff --git a/components/diy_pregoods/diy_pregoods.wxml b/components/diy_pregoods/diy_pregoods.wxml
index 7fb32e3..7a6dca5 100644
--- a/components/diy_pregoods/diy_pregoods.wxml
+++ b/components/diy_pregoods/diy_pregoods.wxml
@@ -57,7 +57,7 @@
{{aitem.act_name}}
¥{{aitem.presell_price}}
-
+ ¥{{aitem.shop_price}}
@@ -88,7 +88,7 @@
¥{{aitem.presell_price}}
- ¥{{aitem.market_price}}
+ ¥{{aitem.market_price}}
diff --git a/components/diy_seckill/diy_seckill.js b/components/diy_seckill/diy_seckill.js
index 512c645..04888f7 100644
--- a/components/diy_seckill/diy_seckill.js
+++ b/components/diy_seckill/diy_seckill.js
@@ -78,7 +78,19 @@ Component({
// 这里是一个自定义方法
customMethod: function () { },
init: function (g_id) {
- var th = this, app = getApp(), goodsidlist = "", idlist = "";
+ var th = this;
+
+ getApp().getConfig2(function (e) {
+ var swithc_list = e.switch_list;
+ var sw_arr = JSON.parse(swithc_list);
+
+ if(sw_arr.is_retail_price){
+ th.setData({is_retail_price:1});
+ }
+ })
+
+
+ var app = getApp(), goodsidlist = "", idlist = "";
if (g_id.data_type == 2) {
if (g_id.data && g_id.data.length > 0) {
//--先把商品ID串起来--
diff --git a/components/diy_seckill/diy_seckill.wxml b/components/diy_seckill/diy_seckill.wxml
index 48c4a72..7b3f902 100644
--- a/components/diy_seckill/diy_seckill.wxml
+++ b/components/diy_seckill/diy_seckill.wxml
@@ -82,7 +82,7 @@
{{aitem.goods_name}}
¥{{aitem.price}}
-
+ ¥{{aitem.market_price}}
diff --git a/components/goods_list/goods_list.js b/components/goods_list/goods_list.js
index aef9210..24d651f 100644
--- a/components/goods_list/goods_list.js
+++ b/components/goods_list/goods_list.js
@@ -18,14 +18,29 @@ Component({
max_card_field: "",
card_list: null,
is_no_plus: 1,
+
+ is_retail_price:0
+
},
properties: {
// 这⾥定义了innerText属性,属性值可以在组件使⽤时指定
},
- ready: function () { },
+ ready: function () {
+
+ var th=this;
+ getApp().getConfig2(function (e) {
+ var swithc_list = e.switch_list;
+ var sw_arr = JSON.parse(swithc_list);
+ if(sw_arr.is_retail_price){
+ th.setData({is_retail_price:1});
+ }
+ },1);
+
+ },
pageLifetimes: {
//要处理一下,游客登录后的界面的变化,主要还该是改变会员
show: function () {
+
this.init();
if (getApp().globalData.login_back == 1) {
getApp().globalData.login_back == 0;
@@ -48,39 +63,7 @@ Component({
getApp().getConfig2(function (e) {
var swithc_list = e.switch_list;
var sw_arr = JSON.parse(swithc_list);
- //---如果后台有开等级卡的开关---
- if (sw_arr.rank_switch && sw_arr.rank_switch == "2") {
- th.setData({
- rank_switch: true
- });
- //---回调卡的列表---
- th.getPlusCardType(function (ob) {
- th.setData({
- card_list: ob.card_list
- });
- var ti = setInterval(function () {
- var user = getApp().globalData.userInfo;
- if (!user) return false;
- clearInterval(ti);
- if (user.card_field && user['card_expiredate']) {
- var str = user['card_expiredate'].replace(/-/g, '/');
- var end = new Date(str);
- end = Date.parse(end) / 1000;
- var now = ut.gettimestamp();
- //--- 判断是等级会员,且在有效期范围内 ---
- if (user.card_field && now < end) {
- var card_name = ob.name_map.get(user.card_field);
- if (card_name && card_name.length > 4) card_name = card_name.substring(0, 8);
- th.setData({
- card_field: user.card_field,
- card_name: card_name,
- card_list: ob.card_list
- });
- }
- }
- }, 500)
- })
- }
+ ut.get_plus_name_price(sw_arr,th);
})
}
diff --git a/components/goods_list/goods_list.wxml b/components/goods_list/goods_list.wxml
index 27a7ab7..e15421d 100644
--- a/components/goods_list/goods_list.wxml
+++ b/components/goods_list/goods_list.wxml
@@ -17,7 +17,7 @@
-
+
{{item.prom_integral}}积分
+
@@ -26,13 +26,16 @@
{{item.prom_price}}
-
-
-
-
-
-
-
+
+
+
+
+
+ ¥
+ {{item.market_price}}
+
+
+
@@ -54,15 +57,20 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+ ¥
+ {{item.market_price}}
+
+
+
+
-
+
@@ -70,14 +78,14 @@
{{filter.toFix(item.shop_price,2)}}
-
-
-
-
-
-
-
-
+
+
+
+ ¥
+ {{item.market_price}}
+
+
+
@@ -89,10 +97,10 @@
{{filter.toFix(item.shop_price,2)}}
-
-
-
-
+
+ ¥
+ {{item.market_price}}
+
@@ -114,13 +122,13 @@
{{filter.toFix(item.shop_price,2)}}
-
-
-
-
-
-
-
+
+
+
+ ¥
+ {{item.market_price}}
+
+
@@ -133,13 +141,13 @@
{{filter.toFix(item.shop_price,2)}}
-
-
-
-
-
-
-
+
+
+
+ ¥
+ {{item.market_price}}
+
+
diff --git a/components/serviceCard_list/serviceCard_list.js b/components/serviceCard_list/serviceCard_list.js
index 4098e2f..b4b3ff4 100644
--- a/components/serviceCard_list/serviceCard_list.js
+++ b/components/serviceCard_list/serviceCard_list.js
@@ -45,48 +45,7 @@ Component({
success: function (e) {
if (e.data.code == 0 && e.data && e.data.data) {
getApp().globalData.userInfo = e.data.data;
- getApp().getConfig2(function (e) {
- var swithc_list = e.switch_list;
- var sw_arr = JSON.parse(swithc_list);
- //---如果后台有开等级卡的开关---
- if (sw_arr.rank_switch && sw_arr.rank_switch == "2") {
- th.setData({
- rank_switch: true
- });
- //---回调卡的列表---
- th.getPlusCardType(function (ob) {
- th.setData({
- card_list: ob.card_list
- });
- var ti = setInterval(function () {
- var user = getApp().globalData.userInfo;
- if (!user) return false;
- clearInterval(ti);
- if (user.card_field && user['card_expiredate']) {
- var str = user['card_expiredate'].replace(/-/g, '/');
- var end = new Date(str);
- end = Date.parse(end) / 1000;
- var now = ut.gettimestamp();
- //--- 判断是等级会员,且在有效期范围内 ---
- if (user.card_field && now < end) {
- var card_name = ob.name_map.get(user.card_field);
- if (card_name && card_name.length > 4) card_name = card_name.substring(0, 8);
- th.setData({
- card_field: user.card_field,
- card_name: card_name,
- card_list: ob.card_list
- });
- }
- }
- }, 500)
- })
- }
- })
-
}
-
-
-
}
})
},
diff --git a/components/serviceCard_list/serviceCard_list.wxml b/components/serviceCard_list/serviceCard_list.wxml
index 86919ed..ee7b346 100644
--- a/components/serviceCard_list/serviceCard_list.wxml
+++ b/components/serviceCard_list/serviceCard_list.wxml
@@ -37,95 +37,8 @@
-
-
-
-
-
-
-
-
-
- ¥
- {{filter.toFix(item[card_field],2)}}
-
-
- {{card_name}}
-
-
-
-
-
-
- ¥
- {{item.market_price}}
-
-
-
-
-
-
-
- ¥
- {{filter.toFix(item.shop_price,2)}}
-
-
-
-
-
- ¥
- {{item.market_price}}
-
-
-
-
-
-
-
-
-
-
- ¥
- {{filter.toFix(item.shop_price,2)}}
-
-
-
- ¥
- {{item.market_price}}
-
-
-
-
-
- ¥
- {{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}
-
- image>
- {{g_filter.get_card_price(item,card_list,1)}}
-
-
-
-
-
-
-
-
- ¥
- {{filter.toFix(item.shop_price,2)}}
-
-
-
-
-
- ¥
- {{item.market_price}}
-
-
-
-
-
-
+
diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js
index 206902f..d3b87c1 100644
--- a/custom-tab-bar/index.js
+++ b/custom-tab-bar/index.js
@@ -20,6 +20,12 @@ Component({
}
})
+ //过滤掉分销到期的
+ getApp().user_tools_endTime(2,function(e){
+ if(!e) th.setData({is_no_distri:1})
+ });
+
+
//购买的信息用全局缓存
if(getApp().globalData.dis_buy_obj){
var arr = getApp().globalData.dis_buy_obj;
diff --git a/packageA/pages/distribution/goods/goods.wxml b/packageA/pages/distribution/goods/goods.wxml
index ab59e8f..49b2c1a 100644
--- a/packageA/pages/distribution/goods/goods.wxml
+++ b/packageA/pages/distribution/goods/goods.wxml
@@ -83,7 +83,7 @@
{{item.goods_name}}
-
+
{{item.prom_integral}}积分
+
diff --git a/packageA/pages/distribution/shop/shop.wxml b/packageA/pages/distribution/shop/shop.wxml
index 9ce235d..993b486 100644
--- a/packageA/pages/distribution/shop/shop.wxml
+++ b/packageA/pages/distribution/shop/shop.wxml
@@ -76,7 +76,7 @@
{{item.goods_name}}
-
+
{{item.prom_integral}}
diff --git a/packageA/pages/goodsInfo/goodsInfo.js b/packageA/pages/goodsInfo/goodsInfo.js
index 2032b38..0bb8c73 100644
--- a/packageA/pages/goodsInfo/goodsInfo.js
+++ b/packageA/pages/goodsInfo/goodsInfo.js
@@ -914,7 +914,7 @@ Page({
// 如果限购数量a<=redis可购买数量d, 当增加数量t>a,提示超出限购
let actInfo = th.data.sele_g;
await th.get_buy_num2().then(function (data) {
- let limited = actInfo.buy_limit; // 限购数量a
+ let limited = actInfo.buy_limit==0?100000:actInfo.buy_limit; // 限购数量a
let promcardbuynum = data.data.data.promcardbuynum;
let buyedNum = promcardbuynum; // 自己已经购买的数量b
let canBuyNum = limited - buyedNum; // 自己还可购买的数量c
@@ -1242,7 +1242,7 @@ Page({
// 如果限购数量a<=redis可购买数量d, 当增加数量t>a,提示超出限购
let actInfo = th.data.sele_g;
await th.get_buy_num2().then(function (data) {
- let limited = actInfo.buy_limit; // 限购数量a
+ let limited = actInfo.buy_limit==0?100000:actInfo.buy_limit; // 限购数量a
let promcardbuynum = data.data.data.promcardbuynum;
let buyedNum = promcardbuynum; // 自己已经购买的数量b
let canBuyNum = limited - buyedNum; // 自己还可购买的数量c
diff --git a/packageA/pages/profile/profile.js b/packageA/pages/profile/profile.js
index 8b93286..cb444f8 100644
--- a/packageA/pages/profile/profile.js
+++ b/packageA/pages/profile/profile.js
@@ -586,6 +586,18 @@ Page({
this.setData({head_pic:uu.head_pic,nickname:uu.nickname})
}
+ if(getApp().globalData.first_leader){
+ //--生成会员 --
+ getApp().promiseGet("/api/weshop/users/get/" + r.stoid + "/" + getApp().globalData.first_leader,{}).then(res=>{
+ if(res.data.code==0){
+ //更新会员
+ self.setData({
+ fir_user:res.data.data
+ })
+ }
+ })
+ }
+
app.request.get(url1, {
success:async function(res) {
if(res.data.code == 0) {
@@ -1132,7 +1144,7 @@ Page({
//-- 需要推荐人 --
if(this.data.reg_info.introducer_state){
- let tjrname = this.data.referee;
+ let tjrname = this.data.referee || this.data.fir_user.mobile;
if (tjrname == "" || tjrname == null) {
//app.my_warnning("请输入推荐人", 0, this);
//return false;
diff --git a/packageA/pages/profile/profile.wxml b/packageA/pages/profile/profile.wxml
index cc2045e..d1ce6fb 100644
--- a/packageA/pages/profile/profile.wxml
+++ b/packageA/pages/profile/profile.wxml
@@ -29,8 +29,17 @@
推荐人:
+
+
+
+
+
+
+
+
-
+{{reg_info.introducer}}积分
diff --git a/packageB/pages/zuhegou/index/index.js b/packageB/pages/zuhegou/index/index.js
index dcc4b7f..1aae439 100644
--- a/packageB/pages/zuhegou/index/index.js
+++ b/packageB/pages/zuhegou/index/index.js
@@ -540,10 +540,12 @@ Page({
this.data.is_zuhe_addcart = 1;
if (!haveAdded) {
-
-
+ //购买的商品的数量默认超量的数量
th.data.sele_g = this.data.list[index];
- if (!th.data.sele_g.num) th.data.goodsInputNum = 1;
+ if (!th.data.sele_g.num){
+ th.data.goodsInputNum = 1;
+ if(th.data.sele_g.zhqty) th.data.goodsInputNum = th.data.sele_g.zhqty;
+ }
//如果没有门店,活动商品的配送方式和门店的配送方式不一样
if (!th.data.def_pick_store ||
@@ -664,8 +666,11 @@ Page({
async check_pk_store_conut(func,is_no_msg,gd,by_num){
var th=this;
if(this.data.sales_rules!=2){
- if(func) func();
- return false;
+ if(is_no_msg) return true;
+ else {
+ if(func) func();
+ return false;
+ }
}
//门店库存no
var pkno= gd && gd.pickup_no?gd.pickup_no:this.data.def_pick_store.pickup_no;
@@ -784,9 +789,17 @@ Page({
this.data.sele_index = index;
th.data.goodsInputNum = th.data.sele_g.num + 1;
+ //必须是组合购买的超量
+ var is_zhqty=0;
+ if(th.data.goodsInputNum 1) {
+ if (th.data.list[index].num > 0) {
var item = th.data.sele_g;
if (th.data.goodsInputNum > o.store_count) {
th.data.adding = 0;
@@ -2000,6 +2013,13 @@ Page({
}
var num = item.goods_num;
+
+ var is_num_change=0;
+ if(num -1 && item.cbuy < item.goods_num) {
num = item.cbuy;
}
@@ -2024,6 +2044,9 @@ Page({
updata['guide_id'] = getApp().globalData.guide_id;
updata['guide_type'] = 0;
}
+ if(is_num_change){
+ updata['goods_num']=num;
+ }
getApp().request.put("/api/weshop/cart/update", {
data: updata,
diff --git a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
index 65d3955..a80fb7a 100644
--- a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
+++ b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
@@ -6018,7 +6018,7 @@ Page({
},
go_card_info: function () {
- getApp().goto("/pages/user/cardinfo/cardinfo");
+ getApp().goto("/packageE/pages/user/cardinfo/cardinfo");
},
//-- 根据ID拿出门店 --
diff --git a/packageC/pages/presell/goodsInfo/goodsInfo.js b/packageC/pages/presell/goodsInfo/goodsInfo.js
index 84b0bd6..2cce371 100644
--- a/packageC/pages/presell/goodsInfo/goodsInfo.js
+++ b/packageC/pages/presell/goodsInfo/goodsInfo.js
@@ -4531,7 +4531,7 @@ Page({
getApp().goto("/pages/user/plus/plus");
},
go_card_info: function () {
- getApp().goto("/pages/user/cardinfo/cardinfo");
+ getApp().goto("/packageE/pages/user/cardinfo/cardinfo");
},
//-- 根据ID拿出门店 --
get_pick_from_list(pid) {
diff --git a/packageC/pages/presell/pregoodsInfo/goodsInfo.js b/packageC/pages/presell/pregoodsInfo/goodsInfo.js
index 243429b..0ba4d9d 100644
--- a/packageC/pages/presell/pregoodsInfo/goodsInfo.js
+++ b/packageC/pages/presell/pregoodsInfo/goodsInfo.js
@@ -3694,7 +3694,7 @@ Page({
getApp().goto("/pages/user/plus/plus");
},
go_card_info: function () {
- getApp().goto("/pages/user/cardinfo/cardinfo");
+ getApp().goto("/packageE/pages/user/cardinfo/cardinfo");
},
//-- 根据ID拿出门店 --
get_pick_from_list(pid) {
diff --git a/pages/user/cardinfo/cardinfo.js b/packageE/pages/user/cardinfo/cardinfo.js
index 2492876..202e3a1 100644
--- a/pages/user/cardinfo/cardinfo.js
+++ b/packageE/pages/user/cardinfo/cardinfo.js
@@ -2,11 +2,11 @@ var t = getApp(),
a = t.request,
o = t.globalData.setting,
os = o,
- i = require("../../../utils/util.js"),
+ i = require("../../../../utils/util.js"),
ut = i,
- s = require("../../../utils/common.js"),t_pay = require("../../../utils/pay2.js"),
- w = require("../../../utils/wxParse/wxParse.js");
-var regeneratorRuntime = require('../../../utils/runtime.js');
+ s = require("../../../../utils/common.js"),t_pay = require("../../../../utils/pay2.js"),
+ w = require("../../../../utils/wxParse/wxParse.js");
+var regeneratorRuntime = require('../../../../utils/runtime.js');
//wx.downloadFile把线上地址设为本地地址
Page({
diff --git a/pages/user/cardinfo/cardinfo.json b/packageE/pages/user/cardinfo/cardinfo.json
index 393a432..393a432 100644
--- a/pages/user/cardinfo/cardinfo.json
+++ b/packageE/pages/user/cardinfo/cardinfo.json
diff --git a/pages/user/cardinfo/cardinfo.wxml b/packageE/pages/user/cardinfo/cardinfo.wxml
index e54425a..5858514 100644
--- a/pages/user/cardinfo/cardinfo.wxml
+++ b/packageE/pages/user/cardinfo/cardinfo.wxml
@@ -1,5 +1,5 @@
-
-
+
+
diff --git a/pages/user/cardinfo/cardinfo.wxss b/packageE/pages/user/cardinfo/cardinfo.wxss
index e4f3bac..64ee734 100644
--- a/pages/user/cardinfo/cardinfo.wxss
+++ b/packageE/pages/user/cardinfo/cardinfo.wxss
@@ -1,4 +1,4 @@
- @import "../../../utils/wxParse/wxParse.wxss";
+ @import "../../../../utils/wxParse/wxParse.wxss";
.Member_bk {
position:relative;
z-index: 0;
diff --git a/pages/activity/pind_list/pind_list.js b/pages/activity/pind_list/pind_list.js
index 2575672..ec3b10d 100644
--- a/pages/activity/pind_list/pind_list.js
+++ b/pages/activity/pind_list/pind_list.js
@@ -18,6 +18,7 @@ Page({
iurl: os.imghost,
ad_data: null,
max_sw_height: 200,
+ is_retail_price:0
},
//------初始化加载----------
@@ -29,6 +30,16 @@ Page({
var th = this;
getApp().getConfig();
+ var th=this;
+ getApp().getConfig2(function (e) {
+ var swithc_list = e.switch_list;
+ var sw_arr = JSON.parse(swithc_list);
+ if(sw_arr.is_retail_price){
+ th.setData({is_retail_price:1});
+ }
+ },1);
+
+
if (first_leader) {
getApp().globalData.first_leader = first_leader;
//调用接口判断是不是会员
diff --git a/pages/activity/pind_list/pind_list.wxml b/pages/activity/pind_list/pind_list.wxml
index 2c4e617..54f1a78 100644
--- a/pages/activity/pind_list/pind_list.wxml
+++ b/pages/activity/pind_list/pind_list.wxml
@@ -43,7 +43,7 @@
-
+
{{item.ct_num}}人团
@@ -63,20 +63,20 @@
{{item.djs.min}}分
{{item.djs.sec}}秒
-
+
¥
{{item.price}}
-
+ ¥{{item.shop_price}}
- 即将开始
- 即将开始
- 即将开始
+ 即将开始
+ 即将开始
+ 即将开始
去参团
去开团
@@ -94,11 +94,11 @@
diff --git a/pages/activity/seckill_list/seckill_list.js b/pages/activity/seckill_list/seckill_list.js
index 0fd3be1..749e997 100644
--- a/pages/activity/seckill_list/seckill_list.js
+++ b/pages/activity/seckill_list/seckill_list.js
@@ -17,6 +17,7 @@ Page({
isshow: 0,
ad_data: null,
max_sw_height: 200,
+ is_retail_price:0
},
//------初始化加载----------
@@ -37,6 +38,16 @@ Page({
console.log(first_leader);
getApp().getConfig();
+ var th=this;
+ getApp().getConfig2(function (e) {
+ var swithc_list = e.switch_list;
+ var sw_arr = JSON.parse(swithc_list);
+ if(sw_arr.is_retail_price){
+ th.setData({is_retail_price:1});
+ }
+ },1);
+
+
if (first_leader) {
getApp().globalData.first_leader = first_leader;
//调用接口判断是不是会员
diff --git a/pages/activity/seckill_list/seckill_list.wxml b/pages/activity/seckill_list/seckill_list.wxml
index fbf6a19..376c93b 100644
--- a/pages/activity/seckill_list/seckill_list.wxml
+++ b/pages/activity/seckill_list/seckill_list.wxml
@@ -68,8 +68,8 @@
¥
- {{item.price}}
-
+ {{item.price}}--{{is_retail_price}}--
+ 零售价¥{{item.market_price}}
@@ -79,7 +79,7 @@
已抢光 -->
即将开始
马上抢
- 已抢光
+ 已抢光
diff --git a/pages/cart/cart2/cart2.js b/pages/cart/cart2/cart2.js
index 7807ca8..5a79ddf 100644
--- a/pages/cart/cart2/cart2.js
+++ b/pages/cart/cart2/cart2.js
@@ -137,7 +137,11 @@ Page({
dis_config:null,
bn_use_commission:0, //是不是使用佣金
cart_use_commission:0,
- cart_commission:0
+ cart_commission:0,
+
+ //订单所有搭配购的
+ all_collocation_list:[]
+
},
onLoad: function (t) {
wx.setNavigationBarTitle({ title: "填写订单", })
@@ -391,7 +395,11 @@ Page({
//to.get_allsto(function (e) {
//th.setData({ allsto: e });
//-------获取购物车已经选择的商品--------
+ if(!th.data.old_cartlist)
th.get_cart();
+ else{
+ th.calculatePrice();
+ }
//})
}
});
@@ -413,6 +421,72 @@ Page({
},
+ //-- 获取搭配购商品 --
+ async set_collection(gd,arr,index){
+ var th=this;
+ var user_id=getApp().globalData.user_id;
+ var collocation_list=[];
+ var pick=null;
+ var distr_t=0;
+
+ //如果是购物车的时候,
+ if(arr) {
+ var idx = th.data.allsto.findIndex(function (e) {
+ return e.pickup_id == arr[index].pick_id
+ })
+ pick = th.data.allsto[idx];
+ var get_gd=null;
+ await getApp().request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + gd.goods_id,{
+
+ }).then(res1 => {
+ if(res1.data.code==0){
+ get_gd=res1.data.data;
+ }
+ })
+ distr_t=pick.distr_type || get_gd.distr_type;
+
+ }else{
+ var gg=to.get_b_now();
+ //---获取门店---
+ await getApp().request.promiseGet("/api/weshop/pickup/get/" + oo.stoid + "/" + gg.pick_id, {})
+ .then(res => {
+ pick = res.data.data;
+ });
+ distr_t=gd.distr_type || pick.distr_type;
+ }
+
+ await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/"
+ + os.stoid + "/" + gd.goods_id + "/0/"+user_id, {
+ }).then(res => {
+ if(res.data.code==0 && res.data.data){
+ var r_data = res.data.data;
+ if (r_data.collocationList) {
+ collocation_list=r_data.collocationList;
+ }
+ }
+ })
+
+ if(!collocation_list) return null;
+
+ var new_arr=[];
+ for (let i = 0; i 0){
gd.prom_type =gg.prom_type=0;
gd.prom_id =gg.prom_id=0;
@@ -1051,6 +1155,7 @@ Page({
}
+
//如果立即购买那边过来,就要读取接口,查看活动的优惠内容
if (gg.prom_type == 3) {
t.data.data.prom_id = gg.prom_id;
@@ -1100,10 +1205,12 @@ Page({
//计算价格
th.calculatePrice2();
//获取优惠券
- th.get_buy_now_quan();
+ th.get_buy_now_quan();
})
} else {
+
+
//--看是不是搭配促销--
if (gg.prom_type == 5) {
t.data.data.prom_id = gg.prom_id;
@@ -1122,91 +1229,26 @@ Page({
}
th.setData({ collocation_goods: gg.collocation_goods });
- var cart_arr = new Array();
- //var narr=gg.collocation_goods;
- //修改成深拷贝,确保返回是数据正确
- var narr = JSON.parse(JSON.stringify(gg.collocation_goods));
-
- narr.push(t.data.data);
-
- //-- 搭配促销的门店配送方式的修复 --
- et = 1;
- distr_t = 0; // 配送方式 0=用户自选 1=自提 2=物流
- for (var hi in narr) {
- var dis_t = narr[hi].distr_type;
- if (dis_t == 2) {
- th.setData({ is_all_zt: 0 });
- et = 0;
- }
- if (dis_t > 0) {
- distr_t = dis_t;
- }
-
- //-- 如果有一件代发的商品或者不是同城配送的配送 --
- if(narr[hi].is_same_city!=1 || narr[hi].whsle_id>0){
- th.setData({show_same_city:0})
- }
+ if(th.data.all_collocation_list){
+ for(var i = 0; i {
- if (rs.data.code == 0) back_data =rs.data.data;
- });
-
- if(back_data && parseFloat(back_data)) {
- ie.can_usecommise =parseFloat(back_data);
- cart_commission = ie.can_usecommise;
- }
- cart_arr.push(ie);
- if(cart_commission){
- th.setData({cart_commission});
- }
-
- th.data.old_cartlist = cart_arr;
+ //var narr=gg.collocation_goods;
+ //修改成深拷贝,确保返回是数据正确
+ var narr = JSON.parse(JSON.stringify(gg.collocation_goods));
+ narr.push(t.data.data);
+ await th.get_collocation_list(narr);
}
th.setData({
bn_goods: gd, bn_pickname: gg.pick_name, index: m_wind,
@@ -1228,8 +1270,6 @@ Page({
th.get_cart_quan();
});
-
-
} else {
//计算价格
th.calculatePrice2();
@@ -1540,7 +1580,6 @@ Page({
}
}
-
o_price -= (item_map.price - item_map.prom_price);
//如果有限制使用优惠券,就要减掉参与的活动商品的钱
if (!item_map.is_xz_yh) q_conditin = o_price;
@@ -1622,6 +1661,9 @@ Page({
}
},
+
+
+
calclate_lbNum(r_data) {
let send_lb = this.data.send_lb;
//g_lb_num我的礼包 g_zxlb_num专享礼包
@@ -3154,10 +3196,17 @@ Page({
}
//积分购,先要带is_integral_normal=1
- if (gg.is_integral_normal) goods.is_integral_normal = 1;
+ if (gg.is_integral_normal){
+ goods.is_integral_normal = 1; item.is_normal=1;
+ }
//先要带is_pd_normal=1
- if (gg.is_pd_normal) goods.is_pd_normal = 1;
+ if (gg.is_pd_normal){
+ goods.is_pd_normal = 1; item.is_normal=1;
+ }
+
+
+
//如果不立即购买或者秒杀,如果是线下库存购买的时候
if (goods.prom_type != 1 && goods.prom_type != 6 && goods.prom_type != 2 && th.data.sales_rules == 2 && !th.data.bn_goods.whsle_id) {
@@ -4307,6 +4356,13 @@ Page({
ob[txt] = this.data.imgUrl + "/miniapp/images/default_g_img.gif";
this.setData(ob);
},
+ cart_set_err1: function (e) {
+ var txt = e.currentTarget.dataset.err;
+ var ob = {};
+ ob[txt] = "/miniapp/images/default_g_img.gif";
+ this.setData(ob);
+ },
+
//--验证是否已经冻结--
check_is_frozenQuan: function (quanlist, frozenQuan, isby) {
console.log("券列表", quanlist);
@@ -5400,10 +5456,9 @@ Page({
th.setData({ [txt9]: new_pk_list_goods, send_gf: this.data.send_gf });
this.data.old_cartlist[index].goods = new_pk_list_goods;
-
console.log(this.data.send_gf, "----");
-
th.calculatePrice();
+
} else {
var new_pk_list_goods = [];
//-- 当是立即购买的时候 --
@@ -5552,6 +5607,206 @@ Page({
} else {
func();
}
+ },
+
+ //子组件返回的优化
+ select_coll(e){
+ console.log("--1111--aaa--");
+ console.log(e);
+ //-- 如果是购物车的选择添加搭配商品 --
+ if(e.detail.is_cart==1){
+ this.select_coll_buy_cart(e.detail);
+ }else{
+ this.select_coll_buy_now(e.detail);
+ }
+ },
+
+ //立即购买的时候,选中和不选中搭配商品
+ async select_coll_buy_now(e){
+ var th=this;
+ //--按钮变灰色 --
+ th.setData({submit:1});
+ //如果是选中
+ if(e.selected){
+ var item=this.data.all_collocation_list[e.index];
+ item.goods_num=1;
+ item.goods_price=item.price;
+ item.is_collocation=1;
+
+ var coll_arr=[];
+ if(this.data.collocation_goods && this.data.collocation_goods.length){
+ coll_arr=this.data.collocation_goods;
+ }
+ coll_arr.push(item);
+ this.setData({collocation_goods:coll_arr});
+ //让主商品的活动变成5,搭配购
+ this.setData({'bn_goods.prom_type':5, 'bn_goods.prom_id':coll_arr[0].prom_id });
+
+ var is_has_main=coll_arr.findIndex(function(e){
+ return e.goods_id==th.data.bn_goods.goods_id;
+ })
+
+ //要进行深拷贝
+ var coll_arr_new=JSON.parse(JSON.stringify(coll_arr));
+ coll_arr_new.unshift(this.data.bn_goods);
+
+ await th.get_collocation_list(coll_arr_new);
+ //计算价格
+ th.calculatePrice2();
+ th.get_cart_quan();
+
+ }else{
+ var item=this.data.all_collocation_list[e.index];
+ var coll_arr=this.data.collocation_goods;
+ var find=coll_arr.findIndex(function (e){
+ return e.goods_id==item.goods_id;
+ })
+ coll_arr.splice(find,1);
+
+ //当coll_arr的长度等于1的时候,说明没有选中搭配商品,只有主商品了
+ if(!coll_arr || coll_arr.length<1){
+ //让主商品的活动变成0,取消搭配购
+ this.setData({'bn_goods.prom_type':0, 'bn_goods.prom_id':0,collocation_goods:[] });
+ //计算价格
+ th.calculatePrice2();
+ //获取优惠券
+ th.get_buy_now_quan();
+
+ }else{
+ this.setData({collocation_goods:coll_arr});
+ //要进行深拷贝
+ var coll_arr_new=JSON.parse(JSON.stringify(coll_arr));
+ coll_arr_new.unshift(this.data.bn_goods);
+ await th.get_collocation_list(coll_arr);
+ //计算价格
+ th.calculatePrice2();
+ th.get_cart_quan();
+ }
+ }
+ },
+ //购物车购买的时候,选中和不选中搭配商品
+ async select_coll_buy_cart(e){
+ var th=this;
+ var cart_index=e.cart_index;
+ var index=e.index;
+
+ var collocationList=this.data.cartlist[cart_index].collocationList;
+ var item=collocationList[cart_index];
+ var goods=this.data.cartlist[cart_index].goods;
+ var txt='cartlist['+cart_index+'].goods';
+ var txt2='cartlist['+cart_index+'].collocationList['+index+'].selected';
+
+ //-- 如果是选中 --
+ if(e.selected){
+ item.goods_num=1;
+ item.goods_price=item.price;
+ item.prom_type=5;
+ item.is_collocation=1;
+
+ goods.push(item);
+
+ th.setData({[txt]:goods,[txt2]:1});
+
+ th.data.old_cartlist=JSON.parse(JSON.stringify(this.data.cartlist));
+ th.calculatePrice();
+ //th.get_cart_quan();
+
+ }else{
+ var fd=goods.findIndex(function (e){
+ return e.goods_id ==item.goods_id && e.prom_type ==5;
+ })
+
+ goods.splice(fd,1);
+ th.setData({[txt]:goods,[txt2]:0});
+ th.data.old_cartlist=JSON.parse(JSON.stringify(this.data.cartlist));
+
+ th.calculatePrice();
+ //th.get_cart_quan();
+ }
+ },
+
+ //-- 搭配购的获取搭配商品的购物车计算价格的数组格式 --
+ async get_collocation_list(narr){
+ var gg = to.get_b_now();
+ var th=this;
+ var cart_arr = new Array();
+ //-- 搭配促销的门店配送方式的修复 --
+ var et = 1;
+ var distr_t = 0; // 配送方式 0=用户自选 1=自提 2=物流
+ for (var hi in narr) {
+ var dis_t = narr[hi].distr_type;
+ if (dis_t == 2) {
+ th.setData({ is_all_zt: 0 });
+ et = 0;
+ }
+ if (dis_t > 0) {
+ distr_t = dis_t;
+ }
+
+ //-- 如果有一件代发的商品或者不是同城配送的配送 --
+ if(narr[hi].is_same_city!=1 || narr[hi].whsle_id>0){
+ th.setData({show_same_city:0})
+ }
+ }
+ //自选的时候,系统配置了默认的配送方式是物流的时候
+ if (distr_t == 0 && th.data.json_d.pickupway && th.data.json_d.pickupway == 1) {
+ et = 0; th.setData({ is_all_zt: 0 });
+ }
+
+ var m_wind=th.data.m_wind;
+ var ie = {
+ pickup_id: gg.pick_id,
+ pname: gg.pick_name,
+ goods: narr,
+ exp_type: et,
+ wind: m_wind,
+ distr_t: distr_t,
+ bn_t_exp_t: distr_t,
+ goods_price: 0,
+ shipping_price: 0,
+ user_money: 0,
+ total_amount: 0,
+ order_amount: 0,
+ user_note: ""
+ };
+
+ var cart_commission=0;
+ //-- 循环计算一下线下取价 --
+ //计算佣金的商品
+ var commission_gds=[];
+ for (var c = 0; c < narr.length; c++) {
+ var hr={
+ goods_id:narr[c].goods_id,
+ goods_num:narr[c].goods_num,
+ prom_type:0,
+ prom_id:0,
+ }
+ commission_gds.push(hr);
+
+ }
+
+ //获取购物车的佣金,此处要优化调用接口,获取佣金
+ var req_d = {
+ user_id:getApp().globalData.user_id,goods_ids:commission_gds,store_id: os.stoid
+ }
+ var back_data=null;
+ await getApp().request.promisePost("/api/weshop/order/getrebateSum", {
+ is_json: 1, data: req_d
+ }).then(rs => {
+ if (rs.data.code == 0) back_data =rs.data.data;
+ });
+
+ if(back_data && parseFloat(back_data)) {
+ ie.can_usecommise =parseFloat(back_data);
+ cart_commission = ie.can_usecommise;
+ }
+
+ cart_arr.push(ie);
+ if(cart_commission){
+ th.setData({cart_commission});
+ }
+
+ th.data.old_cartlist = cart_arr;
}
diff --git a/pages/cart/cart2/cart2.json b/pages/cart/cart2/cart2.json
index 0cfb931..b3a5ca9 100644
--- a/pages/cart/cart2/cart2.json
+++ b/pages/cart/cart2/cart2.json
@@ -2,6 +2,7 @@
"navigationBarTitleText": "填写订单",
"enablePullDownRefresh": false,
"usingComponents": {
- "warn": "/components/long_warn/long_warn"
+ "warn": "/components/long_warn/long_warn",
+ "cart_collect_temp": "/components/cart_collect_temp/cart_collect_temp"
}
}
\ No newline at end of file
diff --git a/pages/cart/cart2/cart2.wxml b/pages/cart/cart2/cart2.wxml
index 4ee2f70..1d17591 100644
--- a/pages/cart/cart2/cart2.wxml
+++ b/pages/cart/cart2/cart2.wxml
@@ -108,6 +108,11 @@
+
+
+
@@ -127,10 +132,6 @@
立即开通
-
-
-
-
@@ -217,7 +218,6 @@
-
@@ -252,6 +252,7 @@
+
留言
@@ -332,7 +333,7 @@
-
+
{{item.goods_name}}
@@ -356,7 +357,7 @@
-
+
{{item.goods_name}}
@@ -375,6 +376,10 @@
+
+
+
+
@@ -441,8 +446,6 @@
-
-
@@ -478,8 +481,6 @@
-
-
留言
diff --git a/pages/distribution/distribution.wxml b/pages/distribution/distribution.wxml
index 7a53c29..40918ad 100644
--- a/pages/distribution/distribution.wxml
+++ b/pages/distribution/distribution.wxml
@@ -95,7 +95,7 @@
仅限PLUS卡({{item.conditonRemark}})的会员,
- PLUS详情
+ PLUS详情
立即升级
diff --git a/pages/giftpack/buygiftpack/giftpackbuy.wxml b/pages/giftpack/buygiftpack/giftpackbuy.wxml
index 73d22d0..5ac2c25 100644
--- a/pages/giftpack/buygiftpack/giftpackbuy.wxml
+++ b/pages/giftpack/buygiftpack/giftpackbuy.wxml
@@ -24,7 +24,7 @@
-
+
diff --git a/pages/giftpack/giftpacklist/giftpacklist.js b/pages/giftpack/giftpacklist/giftpacklist.js
index 4254171..162bacf 100644
--- a/pages/giftpack/giftpacklist/giftpacklist.js
+++ b/pages/giftpack/giftpacklist/giftpacklist.js
@@ -71,6 +71,7 @@ Page({
sto_sele_name_1: '',
share_goods_img:'', //礼包的分享图
+ giftImageCover:null,
canvasHidden:true,
screenWidth: 0
@@ -251,8 +252,11 @@ Page({
},
success: function (res) {
if (res.data.code == 0) {
+ console.log('商品------++')
+ console.log(res)
th.setData({
- giftImage: th.data.iurl + res.data.data.lbUrl,
+ giftImage: th.data.iurl + res.data.data.lbUrl,
+ giftImageCover: th.data.iurl + (th.data.params.cover_img ? th.data.params.cover_img: res.data.data.lbUrl),
giftTitle: res.data.data.giftTitle,
default_color: res.data.data.bgcolor
})
@@ -346,7 +350,8 @@ Page({
success: function success(res) {
if (res.data.code == 0) {
_this2.setData({
- giftImage: th.iurl + res.data.data.lbUrl,
+ giftImage: th.iurl + res.data.data.lbUrl,
+ giftImageCover: th.iurl + (_this2.data.params.cover_img ? _this2.data.params.cover_img: res.data.data.lbUrl),
giftTitle: res.data.data.giftTitle,
default_color: res.data.data.bgcolor
})
@@ -419,6 +424,7 @@ Page({
if (res.data.code == 0) {
th.setData({
giftImage: th.data.iurl + res.data.data.lbUrl,
+ giftImageCover: th.data.iurl + (th.data.params.cover_img ? th.data.params.cover_img: res.data.data.lbUrl),
giftTitle: res.data.data.lbTitle,
default_color: res.data.data.bgcolor
})
@@ -964,6 +970,7 @@ Page({
th.get_goods_temp(function () {
var vpath = res.path;
var context = wx.createCanvasContext('share');
+ // let share_goods_img = th.params.cover_img
th.drawPoster(context, unit, th.data.share_goods_img, vpath, 0);
//把画板内容绘制成图片,并回调 画板图片路径
@@ -1116,7 +1123,7 @@ Page({
tt();
return false;
}
- var img_url = ee.data.giftImage;
+ var img_url = ee.data.giftImageCover ? ee.data.giftImageCover : ee.data.giftImage;
//获取商品是分享图信息
wx.getImageInfo({
src: img_url,
diff --git a/pages/giftpack/mygiftpack/mygiftpack.wxml b/pages/giftpack/mygiftpack/mygiftpack.wxml
index 06133a5..ebd43f0 100644
--- a/pages/giftpack/mygiftpack/mygiftpack.wxml
+++ b/pages/giftpack/mygiftpack/mygiftpack.wxml
@@ -23,7 +23,7 @@
-
+
@@ -93,7 +93,7 @@
-
+
diff --git a/pages/goods/categoryList/categoryList.js b/pages/goods/categoryList/categoryList.js
index 676e71c..43e3a73 100644
--- a/pages/goods/categoryList/categoryList.js
+++ b/pages/goods/categoryList/categoryList.js
@@ -75,6 +75,8 @@ Page({
load: 0,
xmlist: null,
+ is_retail_price:0 //是否显示零售价
+
},
@@ -166,32 +168,11 @@ Page({
//计算等级价相关
var swithc_list = rs.switch_list;
var sw_arr = JSON.parse(swithc_list);
- //---如果后台又开等级卡的开关---
- if (sw_arr.rank_switch && sw_arr.rank_switch == "2") {
- th.setData({ rank_switch: true });
- var user = getApp().globalData.userInfo;
- var ti = setInterval(function () {
- if (!user) return false;
- clearInterval(ti);
- //---回调卡的列表---
- th.getPlusCardType(function (ob) {
- th.setData({ card_list: ob.card_list });
- if (user.card_field && user['card_expiredate']) {
- var str = user['card_expiredate'].replace(/-/g, '/');
- var end = new Date(str);
- end = Date.parse(end) / 1000;
- var now = ut.gettimestamp();
-
- //--- 判断是等级会员,且在有效期范围内 ---
- if (user.card_field && now < end) {
- var card_name = ob.name_map.get(user.card_field);
- //if (card_name.length > 4) card_name = card_name.substring(0, 4);
- th.setData({ card_field: user.card_field, card_name: card_name, card_list: ob.card_list });
- }
- }
- })
- }, 500)
+
+ if(sw_arr.is_retail_price){
+ th.setData({is_retail_price:1});
}
+
});
},
onShow: function () {
@@ -221,6 +202,11 @@ Page({
var data = e;
var switch_list_data = data.switch_list;
var switch_list = JSON.parse(switch_list_data);
+
+ //---如果后台又开等级卡的开关---
+ ut.get_plus_name_price(switch_list,that);
+
+
var is_newsgoodstype = switch_list.is_newsgoodstype;
if (is_newsgoodstype == undefined) {
is_newsgoodstype = 0;
diff --git a/pages/goods/categoryList/categoryList.wxml b/pages/goods/categoryList/categoryList.wxml
index 783beae..26132a3 100644
--- a/pages/goods/categoryList/categoryList.wxml
+++ b/pages/goods/categoryList/categoryList.wxml
@@ -584,7 +584,8 @@
{{item.goods_name}}
-
+
+
@@ -592,7 +593,7 @@
+
{{item.prom_price}}
-
+ {{item.market_price}}
+
+
@@ -621,7 +624,7 @@
@@ -260,9 +260,15 @@
+
{{filters.toFix(prom_price,2)}}元
0积分
-
+
+
+ ¥{{filters.toFix(data.market_price,2)}}
+
+
+
¥{{filters.toFix(data.shop_price,2)}}
+
@@ -302,18 +308,29 @@
¥
{{filters.toFix(data[card_field],2)}}
-
-
-
+
+
+ 零售价:¥{{filters.toFix(data.market_price,2)}}
+
+
+
+ :¥{{filters.toFix(data.shop_price,2)}}
+
+
¥
{{filters.toFix(data.shop_price,2)}}
-
-
-
+
+ 零售价:¥{{filters.toFix(data.market_price,2)}}
+
+
+
+ :¥{{filters.toFix(data.shop_price,2)}}
+
+
@@ -410,7 +427,8 @@
¥
{{prom_price}}
- ¥{{filters.toFix(data.shop_price,2)}}
+ ¥{{filters.toFix(data.market_price,2)}}
+ ¥{{filters.toFix(data.shop_price,2)}}
@@ -1504,6 +1522,7 @@
+
diff --git a/pages/goods/goodsList/goodsList.js b/pages/goods/goodsList/goodsList.js
index ba08ae0..73b3337 100644
--- a/pages/goods/goodsList/goodsList.js
+++ b/pages/goods/goodsList/goodsList.js
@@ -4,6 +4,7 @@
};
}(require("../../../utils/LoadMore.js")), e = getApp(), a = new t.default(), oo = e.globalData.setting, ut = require("../../../utils/util.js");
var regeneratorRuntime = require('../../../utils/runtime.js');
+var com_fil= require('../com_screen.js');
Page({
data: {
@@ -16,6 +17,8 @@ Page({
openFilterModal: !1,
baseUrl: "/api/weshop/goods/page?1=1",
requestUrl: "",
+ old_req_url:'',
+
tabname:"sort", //排序的字段
adname:"asc", //升降的字段
is_new:0,
@@ -25,6 +28,19 @@ Page({
rq_data:null,
isToggle: false, //切换商品视图控制符
show_all:1, //判断显示
+
+ is_retail_price:0, //是否显示零售价
+
+ more_sort_arr:[
+ {name:'综合',value:'sort'},
+ {name:'新品',value:'on_time'},
+ {name:'评论',value:'comment_count'},
+ ],
+
+ fil_cate_state:0,
+ fil_nation_state:0,
+ fil_brand_state:0,
+ fil_price_state:0,
},
onLoad: function(t) {
@@ -59,6 +75,7 @@ Page({
url += "&parent_id="+t.pid;
}
}
+ this.data.cat_id=t.cat_id;
}
if (0 != t.brand_id && t.brand_id != undefined) { url += "&brand_id=" + t.brand_id; }
@@ -153,7 +170,14 @@ Page({
}
})
}
+
+
+ this.data.old_req_url=url;
+ //进行筛选
+ this.set_screen(url);
+
this.requestGoodsList(url);
+
getApp().getConfig2(function(rs){
//计算等级价相关
var swithc_list=rs.switch_list;
@@ -184,6 +208,11 @@ Page({
})
},500)
}
+
+ if(sw_arr.is_retail_price){
+ th.setData({is_retail_price:1});
+ }
+
});
//调用接口判断商家plus有没有过期
@@ -250,6 +279,7 @@ Page({
}
this.resetData(), this.requestGoodsList(url);
},
+
requestGoodsList:function(t) {
if(this.data.loading) return false;
this.data.loading=1;
@@ -259,6 +289,7 @@ Page({
var user_id=getApp().globalData.user_id;
if(!user_id) user_id=0;
+
//不是商品分组的,不是默认排序的
if(t.indexOf("group_id")==-1 || e.data.tabname!="sort" ){
t += "&orderField=" + e.data.tabname;
@@ -266,8 +297,13 @@ Page({
}
t +="&page=" + e.data.currentPage;
+
+ wx.showLoading({});
+
getApp().request.promiseGet(t, {data:{is_mainshow: 1, isonsale: 1, store_id: oo.stoid}}).then(async res=>{
th.data.loading=0;
+ wx.hideLoading();
+
e.setData({is_go:1});
if(ut.ajax_ok(res)){
e.data.currentPage++;
@@ -322,7 +358,7 @@ Page({
if (res.data.code == 0 && res.data.data && res.data.data.length > 0) {
var arr = res.data.data[0];
item.prom_price = arr.luck_goods_price;
- item.sales_sum=arr.buy_goodnum+(arr.virtual_qty?arr.virtual_qty:0);
+ // item.sales_sum=arr.buy_goodnum+(arr.virtual_qty?arr.virtual_qty:0);
}
})
break;
@@ -336,10 +372,10 @@ Page({
if (prom != null && prom.is_end==0 && prom.end_time>now && (prom.start_time
- 综合
-
-
-
-
+
+
+
+
+ 新品
+ 评论
+ 综合
+
+
+
+
+
销量
-
-
-
+
+
+
+
+
+
+
价格
-
-
-
+
+
+
+
+
+
+
-
+
+ 筛选
+
+
+
-
+
@@ -74,7 +90,7 @@
+
{{item.prom_price}}
-
+ {{item.market_price}}
@@ -101,7 +117,7 @@