diff --git a/packageA/pages/chongzhi/chongzhi.wxml b/packageA/pages/chongzhi/chongzhi.wxml
index 831fd72..682e711 100644
--- a/packageA/pages/chongzhi/chongzhi.wxml
+++ b/packageA/pages/chongzhi/chongzhi.wxml
@@ -1,3 +1,4 @@
+
@@ -28,7 +29,7 @@
-
+
立即使用
diff --git a/packageA/pages/chongzhi/g_filter.wxs b/packageA/pages/chongzhi/g_filter.wxs
new file mode 100644
index 0000000..f9bd741
--- /dev/null
+++ b/packageA/pages/chongzhi/g_filter.wxs
@@ -0,0 +1,11 @@
+var is_acting = function(endtime){
+ //判断结束时间减去当前时间 ,如果当前时间大于0则为True
+ endtime = endtime.substring(0, 19);
+ var reg = getRegExp("-", "g");
+ endtime = endtime.replace(reg, '/');
+ var bijiao = getDate(endtime) - getDate();
+ return bijiao > 0 ? true : false;
+}
+module.exports = {
+ is_acting:is_acting
+}
\ No newline at end of file
diff --git a/packageA/pages/chongzhiDetails/chongzhiDetails.js b/packageA/pages/chongzhiDetails/chongzhiDetails.js
index be43591..bb6bf1f 100644
--- a/packageA/pages/chongzhiDetails/chongzhiDetails.js
+++ b/packageA/pages/chongzhiDetails/chongzhiDetails.js
@@ -66,11 +66,32 @@ Page({
data: {
Id:options.id,
store_id:os.stoid,
- user_id: UserInfo.user_id ,
+ user_id: UserInfo.user_id,
},
- success: function (res) {
+ success: function (res) {
+ var result=res.data.data;
+
+ var now=new Date();
+ var reg = RegExp("-", "g");
+ var endtime = result.EndDate.replace(reg, '/');
+ var end=new Date(endtime);
+ result.is_acting=1;
+ if(end
+
-
@@ -13,7 +14,7 @@
-
+
@@ -25,21 +26,22 @@
- {{item.GiveName}}
+ {{item.CouponSum}}元优惠券
+ {{item.Integral}}积分
+ {{item.GradeSum}}成长值
+ {{item.GiveName}}
- 数量:{{item.Qty}}
+ 数量:{{item.Qty}}
-
-
-
-
+
+
-
+
立即充值
- 立即使用
+ 立即使用
已核销
diff --git a/packageA/pages/chongzhiDetails/chongzhiDetails.wxss b/packageA/pages/chongzhiDetails/chongzhiDetails.wxss
index 16ffd3f..25d4bee 100644
--- a/packageA/pages/chongzhiDetails/chongzhiDetails.wxss
+++ b/packageA/pages/chongzhiDetails/chongzhiDetails.wxss
@@ -18,10 +18,7 @@
padding-bottom: 120rpx;
}
-.banner-container {
- height: 600rpx;
-
-}
+.banner-container {}
.list {
/* padding: 0 20rpx;
diff --git a/packageA/pages/chongzhiDetails/g_filter.wxs b/packageA/pages/chongzhiDetails/g_filter.wxs
new file mode 100644
index 0000000..f9bd741
--- /dev/null
+++ b/packageA/pages/chongzhiDetails/g_filter.wxs
@@ -0,0 +1,11 @@
+var is_acting = function(endtime){
+ //判断结束时间减去当前时间 ,如果当前时间大于0则为True
+ endtime = endtime.substring(0, 19);
+ var reg = getRegExp("-", "g");
+ endtime = endtime.replace(reg, '/');
+ var bijiao = getDate(endtime) - getDate();
+ return bijiao > 0 ? true : false;
+}
+module.exports = {
+ is_acting:is_acting
+}
\ No newline at end of file
diff --git a/packageA/pages/jfbuy/jfbuy.js b/packageA/pages/jfbuy/jfbuy.js
index 9cd3b51..d2fdf13 100644
--- a/packageA/pages/jfbuy/jfbuy.js
+++ b/packageA/pages/jfbuy/jfbuy.js
@@ -18,7 +18,8 @@ Page({
active1: false,
// 控制佣金
active2: false,
- url: oo.imghost,
+ url: oo.imghost,
+ h5_url:oo.h5_url,
//popup
hiddenPopup: true,
// 排序
diff --git a/packageA/pages/jfbuy/jfbuy.wxml b/packageA/pages/jfbuy/jfbuy.wxml
index ee9e04f..f0e7f24 100644
--- a/packageA/pages/jfbuy/jfbuy.wxml
+++ b/packageA/pages/jfbuy/jfbuy.wxml
@@ -7,11 +7,10 @@
-->
-
+
-
diff --git a/pages/cart/cart/cart.js b/pages/cart/cart/cart.js
index d273477..98951c4 100644
--- a/pages/cart/cart/cart.js
+++ b/pages/cart/cart/cart.js
@@ -27,8 +27,8 @@ Page({
isadd: 0, //是否可以加商品数量
card_field:"",
- bconf:null,
-
+ bconf:null,
+ btn_click:1,
},
onLoad: function() {
@@ -65,6 +65,7 @@ Page({
}
var th = this;
+ this.setData({requestData:null,is_load:0});
//调用底部导航
//t.editTabBar(th,getApp().globalData.setting.stoid,getApp().globalData.url);
this.getCardList();
@@ -170,7 +171,7 @@ Page({
var tt = ut.gettimestamp();
//如果商品下架了,或者商品是赠品,一开始都要清除
- if ((good.down_time > 0 && good.down_time < tt) || good.is_on_sale == 0 || item.is_gift) {
+ if ((good.down_time > 0 && good.down_time < tt) || good.is_on_sale == 0) {
var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
getApp().request.delete(url, {
success: function (t) {
@@ -204,13 +205,13 @@ Page({
var r_data = res.data.data;
if (!r_data.promGoodsLists) {
var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
- a.delete(url, {});
+ getApp().request.delete(url, {});
//商品已经下架
isok = 0;
}
} else {
var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
- a.delete(url, {});
+ getApp().request.delete(url, {});
//商品已经下架
isok = 0;
}
@@ -275,6 +276,7 @@ Page({
is_edit: 0
}),
th.doCheckAll(), wx.stopPullDownRefresh();
+
}
});
},
@@ -300,27 +302,42 @@ Page({
},
//-----------------点击输入修改商品数量---------------
- valueToNum: function(t) {
- var a = t.currentTarget.dataset.item;
- var b = t.currentTarget.dataset.pitems;
- a = this.data.requestData[b].goods[a];
- var e = a;
- if (a = isNaN(t.detail.value) || t.detail.value < 1 ? 1 : parseInt(t.detail.value)) {
- var s = {
- goods_num: a,
- goods_id: e.goods_id,
- id: e.id,
- store_id: oo.stoid
- };
- this.postCardList(s, t.currentTarget.dataset.item, t.currentTarget.dataset.pitems);
- }
+ valueToNum: function(t) {
+ if(!this.data.is_load) return false;
+ //控制住,避免事件响应冲突,只有input有输入的时候,才刷新
+ if(this.data.btn_click){
+ return false;
+ }
+ this.data.btn_click=1;
+
+ var a = t.currentTarget.dataset.item;
+ var b = t.currentTarget.dataset.pitems;
+ a = this.data.requestData[b].goods[a];
+ var e = a;
+ var th=this;
+
+
+
+ if (a = isNaN(t.detail.value) || t.detail.value < 1 ? 1 : parseInt(t.detail.value)) {
+ var s = {
+ goods_num: a,
+ goods_id: e.goods_id,
+ id: e.id,
+ store_id: oo.stoid
+ };
+ th.postCardList(s, t.currentTarget.dataset.item, t.currentTarget.dataset.pitems);
+ }
+
+
+
},
//-------------加数量---------------------
addNum: function(t) {
+ if(!this.data.is_load) return false;
if (this.data.up_dating == 1) return false;
this.data.up_dating = 1;
-
+
var a = t.currentTarget.dataset.item;
var b = t.currentTarget.dataset.pitems;
a = this.data.requestData[b].goods[a];
@@ -344,9 +361,14 @@ Page({
},
//-------------减数量---------------------
subNum: function(t) {
+ if(!this.data.is_load) return false;
+ if (this.data.up_dating == 1) return false;
+ this.data.up_dating = 1;
+
var a = t.currentTarget.dataset.item;
var b = t.currentTarget.dataset.pitems;
a = this.data.requestData[b].goods[a];
+ this.data.btn_click=1;
if (a.goods_num - 1 < 0) return false;
@@ -367,6 +389,8 @@ Page({
tfeel = 0,
t_num = 0,
text_arr = "";
+ this.data.btn_click=1;
+
for (var i = 0; i < dda.length; i++) {
var item = dda[i].goods;
if (!e.data.checkAllToggle) {
@@ -419,11 +443,12 @@ Page({
},
//------门店全选按钮,要判断是否门店的匹配方式一致---------
- check_th_all_item: function(ele) {
+ check_th_all_item:async function(ele) {
var e = this,
pitems = ele.currentTarget.dataset.pitems,
item = this.data.requestData[pitems].goods,
sele = this.data.requestData[pitems].selected;
+ this.data.btn_click=1;
var isok = 1,
fir = 0,
@@ -462,18 +487,19 @@ Page({
e.setData({
[txt]: Number(!sele),
});
- e.check_prom_activity(pitems);
+ await e.check_prom_activity(pitems);
this.doCheckAll();
},
//---------------单选,也要判断门店的配送方式是否一致--------------
- check_th_item: function(t) {
+ check_th_item: async function(t) {
var e = this,
item = t.currentTarget.dataset.item,
pitems = t.currentTarget.dataset.pitems;
a = this.data.requestData[pitems].goods[item];
var isok = 1,fir = 0;
var iarr = e.data.requestData[pitems].goods;
+ this.data.btn_click=1;
//当数量大于1,且是选择的时候
@@ -508,7 +534,7 @@ Page({
if(a.prom_type==3){
//判断商品是不是优惠活动
- e.check_prom_activity(pitems);
+ await e.check_prom_activity(pitems);
}
this.doCheckAll();
@@ -554,6 +580,7 @@ Page({
//----------------------更新购物数量,加减,调用接口---------------------
postCardList: function(t, item, pitem) {
+
var e = this,th=e;
var user_id = getApp().globalData.user_id;
console.log('update');
@@ -800,17 +827,18 @@ Page({
//--更新购物车---
update_cart: function(t, pitem, item) {
var e = this;
+
getApp().request.put("/api/weshop/cart/update", {
data: t,
- success: function(ee) {
+ success:async function(ee) {
var txt = "requestData[" + pitem + "].goods[" + item + "].goods_num";
- e.data.up_dating = 0
+
e.setData({
[txt]: t.goods_num,
});
- for(var i in e.data.requestData){
- e.check_prom_activity(i)
- }
+ //for(var i in e.data.requestData){
+ await e.check_prom_activity(pitem)
+ //}
e.doCheckAll();
getApp().requestCardNum(e);
}
@@ -824,6 +852,14 @@ Page({
//--------------去结算------------
async checkout() {
+
+ if(!this.data.is_load) return false;
+ if(this.data.up_dating) {
+ wx.showLoading({
+ title:"计算中"
+ })
+ }
+
var glist = ""; //用逗号隔开的
var map = new Map(); //使用map值键进行运算
var map_limit = new Map(); //使用map值键进行存储限购
@@ -1156,15 +1192,17 @@ Page({
var make_up_arr=new Array();
var th=this;
var map=new Map();
- var list=this.data.requestData[cindex];
+ var list= JSON.parse(JSON.stringify(this.data.requestData[cindex]));
//循环处理活动,看活动商品的数量,用map来出来存储,key为活动id,值是数量
- for(var i in list.goods){
+
+ for(var i=0;i {
@@ -1216,6 +1258,9 @@ Page({
}
continue;
}
+
+ t_prom_list.push(prom);
+
//---读取打折的详情---
var ob=p_item[1];var discount=null;
await getApp().request.promiseGet("/api/weshop/goods/getDiscount",{
@@ -1251,6 +1296,8 @@ Page({
gift_id:discount.gift_id
};
+
+ /*---
if(map2.has(p_item[0]+"")){
var index=map2.get(p_item[0]+"");
if( list.goods[index].goods_num!=discount.bs){
@@ -1268,7 +1315,11 @@ Page({
});
}
- }else{
+ }else{---*/
+ var url="/api/weshop/cart/delGift?store_id="+newd.store_id+"&user_id="
+ +newd.user_id+"&goods_id="+newd.goods_id+"&is_gift=1&pick_id="+newd.pick_id;
+ await getApp().request.promiseDelete(url, {})
+
var add_data=null;
await getApp().request.promisePost("/api/weshop/cart/save", { data: newd }).then(res=>{
if(res.data.code==0){
@@ -1279,37 +1330,44 @@ Page({
newd.id=add_data.id;
list.goods.push(newd);
}
- }
+ //}
}
-
-
-
- //-- 获取 --
- await getApp().request.promiseGet("/api/weshop/promgoodslist/list",{
- data:{prom_id:prom.id}
- }).then(res=>{
- if(res.data.code==0){
- var list=res.data.data;
- for(var i in list){
- var item=list[i];
- if(item.prom_type==0){
- if(ob.price{
+ if(res.data.code==0){
+ var list=res.data.data;
+ for(var i in list){
+ var item=list[i];
+ if(item.prom_type==0){
+ if(ob.price0){
@@ -1332,5 +1390,9 @@ Page({
if(!url || url=='') return;
if(url[0]!='/') url='/'+url;
getApp().goto(url);
- }
+ },
+
+ refresh_input:function(){
+ this.data.btn_click=0;
+ }
});
\ No newline at end of file
diff --git a/pages/cart/cart/cart.wxml b/pages/cart/cart/cart.wxml
index 3afb2e6..25882b7 100644
--- a/pages/cart/cart/cart.wxml
+++ b/pages/cart/cart/cart.wxml
@@ -79,7 +79,9 @@
一
-
+
+
diff --git a/pages/cart/cart2/cart2.js b/pages/cart/cart2/cart2.js
index 591ce75..0367d4f 100644
--- a/pages/cart/cart2/cart2.js
+++ b/pages/cart/cart2/cart2.js
@@ -317,41 +317,54 @@ Page({
//----------------展示页面,是再获取用户信息之后--------------
show_page:function(){
var th=this,ta = this.data.param;
- th.setData({
- userinfo: getApp().globalData.userInfo,});
-
- //选获取地址
- th.getuser_addr(function(addr){
- th.setData({user_addr: addr});
- //--------------------------立即购买------------------
- if(ta.is_bnow== 1){
- //读取门店
- to.get_allsto(function (e) {
- th.setData({ allsto: e });
- //获取立即购买的商品信息
- th.get_buy_goods(ta.goods_id);
- });
- }else {
- //------------------------购物车结算----------------------
- //读取门店
- to.get_allsto(function (e) {
- th.setData({ allsto: e });
- //-------获取购物车已经选择的商品--------
- th.get_cart();
- })
- }
- });
- //获取提现金额
- getApp().request.get("/api/weshop/withdrawals/summoney", {
- data: { user_id: to.globalData.user_id, store_id: oo.stoid, status: 0 },
- success: function (su) {
- if (su.data.code == 0) {
- var yuer = parseFloat(th.data.userinfo.user_money -
- (th.data.userinfo.frozen_money>0?th.data.userinfo.frozen_money:0) - su.data.data.summoney).toFixed(2);
- th.setData({ txmon: su.data.data.summoney, yuer: yuer });
- }
- }
- });
+ //th.setData({ userinfo: getApp().globalData.userInfo,}); //这个余额被缓存了
+
+ //会员的信息,要获取最新
+ var user=getApp().globalData.userInfo;
+ getApp().request.get("/api/weshop/users/get/" + oo.stoid + "/" + user.user_id, {
+ data:{r:Math.random()},
+ success: function (e) {
+ getApp().globalData.userInfo = e.data.data;
+ th.setData({userinfo:e.data.data});
+
+ //选获取地址
+ th.getuser_addr(function(addr){
+ th.setData({user_addr: addr});
+ //--------------------------立即购买------------------
+ if(ta.is_bnow== 1){
+ //读取门店
+ to.get_allsto(function (e) {
+ th.setData({ allsto: e });
+ //获取立即购买的商品信息
+ th.get_buy_goods(ta.goods_id);
+ });
+ }else {
+ //------------------------购物车结算----------------------
+ //读取门店
+ to.get_allsto(function (e) {
+ th.setData({ allsto: e });
+ //-------获取购物车已经选择的商品--------
+ th.get_cart();
+ })
+ }
+ });
+
+ //获取提现金额
+ getApp().request.get("/api/weshop/withdrawals/summoney", {
+ data: { user_id: to.globalData.user_id, store_id: oo.stoid, status: 0 },
+ success: function (su) {
+ if (su.data.code == 0) {
+ var yuer = parseFloat(th.data.userinfo.user_money -
+ (th.data.userinfo.frozen_money>0?th.data.userinfo.frozen_money:0) - su.data.data.summoney).toFixed(2);
+ th.setData({ txmon: su.data.data.summoney, yuer: yuer });
+ }
+ }
+ });
+
+
+ },
+ });
+
},
diff --git a/pages/cart/cart2_inte/cart2_inte.js b/pages/cart/cart2_inte/cart2_inte.js
index 3586580..c129432 100644
--- a/pages/cart/cart2_inte/cart2_inte.js
+++ b/pages/cart/cart2_inte/cart2_inte.js
@@ -88,6 +88,54 @@ Page({
success: function (s) {
}
});
+
+ //先获取是否有关闭使用优惠券
+ getApp().getConfig2(function (ee) {
+ var json_d = JSON.parse(ee.switch_list);
+ th.data.ispt_goods=json_d.ispt_goods; //是不是平摊到单品的控制参数赋值
+ th.setData({ is_close_quan: json_d.is_close_quan,sales_rules:ee.sales_rules,rank_switch:json_d.rank_switch});
+
+ var rank_switch=json_d.rank_switch;
+ var max_price=-1;
+ var show_card=null;
+ var name="";
+ //如果有开等级卡的时候,
+ //因为都是调接口,要返回在计算
+ if(rank_switch==2){
+ //-- 获取所有的等级卡, --
+ getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?storeId=" + os.stoid,
+ {}).then(res => {
+ if(res.data.code==0){
+ var plusCard = res.data.data;
+ //-- 循环判断,拿到最贵的那张卡 --
+ for(var ih in plusCard){
+ if(plusCard[ih].IsStopBuy == true){ continue; }
+ if(max_price<0){
+ max_price=plusCard[ih].CardFee;
+ name='card'+plusCard[ih]['CorrPrice'];
+ show_card=plusCard[ih];
+ }else{
+ if(max_price {
- if(res.data.code==0){
- var plusCard = res.data.data;
- //-- 循环判断,拿到最贵的那张卡 --
- for(var ih in plusCard){
- if(plusCard[ih].IsStopBuy == true){ continue; }
- if(max_price<0){
- max_price=plusCard[ih].CardFee;
- name='card'+plusCard[ih]['CorrPrice'];
- show_card=plusCard[ih];
- }else{
- if(max_price0?th.data.userinfo.frozen_money:0) - su.data.data.summoney).toFixed(2);
- th.setData({ txmon: su.data.data.summoney, yuer: yuer });
- }
- }
- });
+ //选获取地址
+ th.getuser_addr(function(addr){
+ th.setData({user_addr: addr});
+ //--------------------------立即购买------------------
+ if(ta.is_bnow== 1){
+ //读取门店
+ to.get_allsto(function (e) {
+ th.setData({ allsto: e });
+ //获取立即购买的商品信息
+ th.get_buy_goods(ta.goods_id);
+ });
+ }
+ });
+ //获取提现金额
+ getApp().request.get("/api/weshop/withdrawals/summoney", {
+ data: { user_id: to.globalData.user_id, store_id: oo.stoid, status: 0 },
+ success: function (su) {
+ if (su.data.code == 0) {
+ var yuer = parseFloat(th.data.userinfo.user_money -
+ (th.data.userinfo.frozen_money>0?th.data.userinfo.frozen_money:0) - su.data.data.summoney).toFixed(2);
+ th.setData({ txmon: su.data.data.summoney, yuer: yuer });
+ }
+ }
+ });
+
+ },
+ })
+
+
},
//-----获取立即购买的商品信息,入口----
@@ -401,6 +411,8 @@ Page({
wx.showLoading({ title:"处理中.",})
//-----------计算商品总价--------------
var allpice = good.shop_price * good.buynum;
+ var all_integral=good.integral * good.buynum;
+
var cut_price=0;
if(good.prom_type==3 && good.prom_price!==null){
cut_price=allpice-good.prom_price;
@@ -510,14 +522,14 @@ Page({
if (th.data.bn_use_money == 1) {
if (amoney> order_m) {
order_m = order_m.toFixed(2);
- th.setData({ [txt]: order_m, [txt2]:0,[txt4]:good.integral,show_submit:1 })
+ th.setData({ [txt]: order_m, [txt2]:0,[txt4]:all_integral,show_submit:1 })
}else{
order_m =parseFloat(order_m - amoney);
order_m = order_m.toFixed(2);
- th.setData({ [txt]: amoney, [txt2]: order_m,[txt4]:good.integral,show_submit:1 })
+ th.setData({ [txt]: amoney, [txt2]: order_m,[txt4]:all_integral,show_submit:1 })
}
}else{
- th.setData({ [txt]: 0, [txt2]: order_m,[txt4]:good.integral, show_submit:1 })
+ th.setData({ [txt]: 0, [txt2]: order_m,[txt4]:all_integral, show_submit:1 })
}
wx.hideLoading();
@@ -551,6 +563,27 @@ Page({
th.data.is_summit_ing = 0;
return false;
}
+
+
+ var integrals=0;
+ var get_datas= {
+ user_id:getApp().globalData.user_id, store_id:o.stoid,
+ };
+ await getApp().request.promiseGet("/api/weshop/users/getAllPoints", {
+ data: get_datas
+ }).then(res => {
+ if(res.data.code==0){
+ integrals=res.data.data.Integral;
+ }
+ })
+
+ //判断积分的情况
+ if(th.data.formData.integral && parseFloat(th.data.formData.integral)< parseFloat(integrals) ){
+ getApp().my_warnning("积分不足",0,th);
+ th.data.is_summit_ing = 0;
+ return false;
+ }
+
var item={
'user_id': to.globalData.user_id,
@@ -826,7 +859,7 @@ Page({
//--自提就要把包邮券清理掉--
if(ty==1){
th.data.isget_by_quan={};
- if(th.data.using_quan[th.data.bn_pick] && th.data.using_quan[th.data.bn_pick].isby==1){
+ if(th.data.using_quan && th.data.using_quan[th.data.bn_pick] && th.data.using_quan[th.data.bn_pick].isby==1){
th.setData({using_quan:{}});
}
}
diff --git a/pages/cart/cart2_pt/cart2_pt.js b/pages/cart/cart2_pt/cart2_pt.js
index 447c03e..ed7c615 100644
--- a/pages/cart/cart2_pt/cart2_pt.js
+++ b/pages/cart/cart2_pt/cart2_pt.js
@@ -131,21 +131,30 @@ Page({
//----------------展示页面,是再获取用户信息之后--------------
show_page:function(){
var th=this;
- th.setData({ userinfo: to.globalData.userInfo});
- //获取立即购买的商品信息
- th.get_buy_goods();
-
- //获取提现金额
- getApp().request.get("/api/weshop/withdrawals/summoney", {
- data: { user_id: to.globalData.user_id, store_id: oo.stoid, status: 0 },
- success: function (su) {
- if (su.data.code == 0) {
- var yuer = parseFloat(th.data.userinfo.user_money -
- (th.data.userinfo.frozen_money>0?th.data.userinfo.frozen_money:0) - su.data.data.summoney).toFixed(2);
- th.setData({ txmon: su.data.data.summoney, yuer: yuer });
- }
- }
- });
+ //th.setData({ userinfo: to.globalData.userInfo}); 会员信息要时时获取
+ var user=getApp().globalData.userInfo;
+ getApp().request.get("/api/weshop/users/get/" + oo.stoid + "/" + user.user_id, {
+ data:{r:Math.random()},
+ success: function (e) {
+
+ getApp().globalData.userInfo = e.data.data;
+ th.setData({userinfo:e.data.data});
+ //获取立即购买的商品信息
+ th.get_buy_goods();
+
+ //获取提现金额
+ getApp().request.get("/api/weshop/withdrawals/summoney", {
+ data: { user_id: to.globalData.user_id, store_id: oo.stoid, status: 0 },
+ success: function (su) {
+ if (su.data.code == 0) {
+ var yuer = parseFloat(th.data.userinfo.user_money -
+ (th.data.userinfo.frozen_money>0?th.data.userinfo.frozen_money:0) - su.data.data.summoney).toFixed(2);
+ th.setData({ txmon: su.data.data.summoney, yuer: yuer });
+ }
+ }
+ });
+ }
+ });
},
//-----获取立即购买的商品信息----
diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js
index a99c9eb..44e3c92 100644
--- a/pages/goods/goodsInfo/goodsInfo.js
+++ b/pages/goods/goodsInfo/goodsInfo.js
@@ -28,7 +28,7 @@ Page({
gid: "",
stoid: o.stoid,
url: o.url,
- resourceUrl: 'https://mshop-lib.yolipai.net/', //公众号那边的图片文件域名
+ resourceUrl: o.h5_url, //公众号那边的图片文件域名
iurl: o.imghost,
defaultAvatar: o.resourceUrl + "/static/images/user68.jpg",
@@ -1421,7 +1421,7 @@ Page({
}
//--判断商品是否超出活动限购--
- if (th.data.prom_buy_num != -1 && th.data.prom_buy_limit > 0) {
+ if (th.data.prom_buy_num != -1 && th.data.prom_buy_limit > 0 && !th.data.is_normal) {
if (t + th.data.prom_buy_num > th.data.prom_buy_limit) {
wx.showModal({
title: '超出商品活动限购',
@@ -2606,6 +2606,7 @@ Page({
prom_act: inte_data,
isshow: 1,
can_integral:can_integral,
+ is_shopbuy: parseInt(inte_data.is_shopbuy?inte_data.is_shopbuy:0)
});
ee.get_sto();
@@ -4560,6 +4561,7 @@ Page({
var storid = os.stoid;
var th = this;
var user=getApp().globalData.userInfo;
+ if(!user) return false;
getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => {
var plusCard = res.data.data;
var arr = [1219, 2089, 3031];
diff --git a/pages/goods/goodsInfo/goodsInfo.wxml b/pages/goods/goodsInfo/goodsInfo.wxml
index 488cdd1..c2c6c78 100644
--- a/pages/goods/goodsInfo/goodsInfo.wxml
+++ b/pages/goods/goodsInfo/goodsInfo.wxml
@@ -953,20 +953,28 @@
-
-
-
-
- {{filters.toFix(sele_g[card_field],2)}}
-
-
- {{filters.toFix(sele_g.shop_price,2)}}
-
-
- 单独购买
-
- 立即兑换
- 立即兑换
+
+
+
+
+
+ {{filters.toFix(sele_g[card_field],2)}}
+
+
+ {{filters.toFix(sele_g.shop_price,2)}}
+
+
+ 单独购买
+
+ 立即兑换
+ 立即兑换
+
+
+
+ 立即兑换
+ 立即兑换
+
+
diff --git a/pages/goods/goodsInfo/goodsInfo.wxss b/pages/goods/goodsInfo/goodsInfo.wxss
index ae50d5a..fa85c5f 100644
--- a/pages/goods/goodsInfo/goodsInfo.wxss
+++ b/pages/goods/goodsInfo/goodsInfo.wxss
@@ -422,6 +422,13 @@ border-radius: 0 56rpx 55rpx 0;
}
+.buy-btn-all{
+ background-color: #f23030;
+ height: 70rpx;
+ border-radius: 56rpx;
+}
+
+
.toTop {
position: fixed;
z-index: 3;
diff --git a/pages/user/order_detail/order_detail.wxml b/pages/user/order_detail/order_detail.wxml
index 050fc96..b9c7899 100644
--- a/pages/user/order_detail/order_detail.wxml
+++ b/pages/user/order_detail/order_detail.wxml
@@ -106,9 +106,9 @@
¥ {{order.coupon_price}}元
-
+
积分
- ¥ {{order.integral_money}}元
+ {{order.integral}}积分
diff --git a/pages/user/order_list/order_list.js b/pages/user/order_list/order_list.js
index 1b6646a..f75dc40 100644
--- a/pages/user/order_list/order_list.js
+++ b/pages/user/order_list/order_list.js
@@ -674,6 +674,9 @@ Page({
pay_next(e){
var th=this;
+
+
+
if (e.order_amount == 0) {
var dd = {
parent_sn: e.order_sn,