diff --git a/app.js b/app.js
index f24da70..7c34f27 100644
--- a/app.js
+++ b/app.js
@@ -430,16 +430,8 @@ App({
//获取场景值 判断是否是单页面
is_Single_page() {
let scene = wx.getLaunchOptionsSync().scene;
- //--先判断会员状态--
- if (scene == 1154) {
- wx.showToast({
- title: '请前往小程序',
- icon: "error",
- duration: 3000,
- })
- return false
- }
- return true;
+ //--判断是否是单页面--
+ return scene == 1154? false:true;
},
diff --git a/packageA/pages/jfbuy/jfbuy.js b/packageA/pages/jfbuy/jfbuy.js
index de31b5b..1e5edd9 100644
--- a/packageA/pages/jfbuy/jfbuy.js
+++ b/packageA/pages/jfbuy/jfbuy.js
@@ -65,9 +65,6 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
- if(!getApp().is_Single_page()){
- return false;
- }
var th=this;
this.data.requestData={
store_id:oo.stoid,
diff --git a/packageA/pages/liveStream/liveStream.js b/packageA/pages/liveStream/liveStream.js
index 637bd7f..158e0e5 100644
--- a/packageA/pages/liveStream/liveStream.js
+++ b/packageA/pages/liveStream/liveStream.js
@@ -208,17 +208,15 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
- if(!getApp().is_Single_page()){
- return false;
- }
self = this;
- // console.log('ppppp',this.pageTotal(4, 10));
+ if(getApp().is_Single_page()){
+ app.isLogin().then(function(data) {//进入页面前已经授权登录成功
+ self.setData({
+ userInfo: data,
+ });
+ });
+ }
- app.isLogin().then(function(data) {//进入页面前已经授权登录成功
- self.setData({
- userInfo: data,
- });
- });
},
/**
diff --git a/packageA/pages/quan_list/quan_list.wxml b/packageA/pages/quan_list/quan_list.wxml
index f702d52..50866d9 100644
--- a/packageA/pages/quan_list/quan_list.wxml
+++ b/packageA/pages/quan_list/quan_list.wxml
@@ -4,44 +4,46 @@
-
+
- ¥{{filters.toFix(item.money,2)}}
- 满{{filters.toFix(item.condition,2)}}可用
+ ¥{{filters.toFix(item.money,2)}}
+ 满{{filters.toFix(item.condition,2)}}可用
-
+
- {{item.name}}
+ {{item.name}}
- {{item.coupon_remark}}
- 所有门店通用
- 有效期
- {{filters.format_time(getcurday+3600*24*item.startdays)}}
- {{filters.format_time(item.use_start_time)}}至
- {{filters.format_time(item.use_end_time)}}不限
-
- 有效期 {{filters.format_time(getcurday+3600*24*item.startdays)}}
+ {{item.coupon_remark}}
+ 所有门店通用
+ 有效期
+ {{filters.format_time(getcurday+3600*24*item.startdays)}}
+ {{filters.format_time(item.use_start_time)}}
+ 至
+ {{filters.format_time(item.use_end_time)}}不限
+
+ 有效期
+ {{filters.format_time(getcurday+3600*24*item.startdays)}}
{{filters.format_time(getcurday)}}
至
- {{filters.format_time(getcurday+3600*24*item.days)}}
- 不限
-
-
- 每人限领:{{item.everyone_num}}不限
-
-
+ {{filters.format_time(getcurday+3600*24*item.days+3600*24*item.startdays)}}
+ 不限
+
+
+ 每人限领:{{item.everyone_num}}不限
+
+
已领取
立即领取
-
+
-
+
@@ -58,5 +60,4 @@
-
-
+
\ No newline at end of file
diff --git a/packageA/pages/quan_pro/quan_pro.wxml b/packageA/pages/quan_pro/quan_pro.wxml
index 0c6bfa6..e1e45dc 100644
--- a/packageA/pages/quan_pro/quan_pro.wxml
+++ b/packageA/pages/quan_pro/quan_pro.wxml
@@ -40,7 +40,7 @@
有效期
{{filters.format_time(getcurday+3600*24*q_data.startdays)}}
{{filters.format_time(getcurday)}}至
- {{filters.format_time(getcurday+3600*24*q_data.days)}}不限
+ {{filters.format_time(getcurday+3600*24*q_data.days+3600*24*q_data.startdays)}}不限
diff --git a/packageB/pages/zuhegou/index/index.js b/packageB/pages/zuhegou/index/index.js
index babfe12..f21a4be 100644
--- a/packageB/pages/zuhegou/index/index.js
+++ b/packageB/pages/zuhegou/index/index.js
@@ -123,9 +123,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
- if(!getApp().is_Single_page()){
- return false;
- }
+
console.log(options, 111);
self = this;
var the_id = options.id;
@@ -160,8 +158,10 @@ Page({
//如果有会员的时候
var userInfo = getApp().globalData.userInfo;
if (!userInfo) {
- getApp().goto("/pages/togoin/togoin");
- return false;
+ if(getApp().is_Single_page()){
+ getApp().goto("/pages/togoin/togoin");
+ return false;
+ }
}
},
diff --git a/packageB/pages/zuhegou/preindex/index.js b/packageB/pages/zuhegou/preindex/index.js
index b875711..d8bad75 100644
--- a/packageB/pages/zuhegou/preindex/index.js
+++ b/packageB/pages/zuhegou/preindex/index.js
@@ -123,9 +123,6 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
- if(!getApp().is_Single_page()){
- return false;
- }
console.log(options, 111);
self = this;
var the_id = options.id;
@@ -160,8 +157,10 @@ Page({
//如果有会员的时候
var userInfo = getApp().globalData.userInfo;
if (!userInfo) {
- getApp().goto("/pages/togoin/togoin");
- return false;
+ if(getApp().is_Single_page()){
+ getApp().goto("/pages/togoin/togoin");
+ return false;
+ }
}
},
diff --git a/packageC/pages/luckyGo/luckyGo_goodsInfo/buy_pt.wxml b/packageC/pages/luckyGo/luckyGo_goodsInfo/buy_pt.wxml
index df0180a..a35df7b 100644
--- a/packageC/pages/luckyGo/luckyGo_goodsInfo/buy_pt.wxml
+++ b/packageC/pages/luckyGo/luckyGo_goodsInfo/buy_pt.wxml
@@ -5,7 +5,7 @@
-
+
{{sele_g.goods_name}}
diff --git a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
index def9ae0..1dbfbf4 100644
--- a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
+++ b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
@@ -285,9 +285,7 @@ Page({
//------初始化加载----------
onLoad: function (t) {
- if(!getApp().is_Single_page()){
- return false;
- }
+
// console.log('onload');
if(t && t.group_id) {
this.data.group_id = t.group_id;
@@ -534,10 +532,13 @@ Page({
//--先判断会员登陆状态--
var user_info = getApp().globalData.userInfo;
if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
+
+ if(getApp().is_Single_page()){
wx.navigateTo({
- url: '/pages/togoin/togoin',
- })
+ url: '/pages/togoin/togoin',
+ })
return false;
+ }
}
},
diff --git a/packageC/pages/presell/goodsInfo/goodsInfo.wxml b/packageC/pages/presell/goodsInfo/goodsInfo.wxml
index 3f7508d..73a884f 100644
--- a/packageC/pages/presell/goodsInfo/goodsInfo.wxml
+++ b/packageC/pages/presell/goodsInfo/goodsInfo.wxml
@@ -527,7 +527,7 @@
{{filters.format_time(presellForm.end_time,2)}} 预售结束
{{filters.format_time(presellForm.delivery_date,2)}} 开始发货
- 付款{{presellForm.delivery_daynum}} 天后发货
+ 付款{{presellForm.delivery_daynum}} 天内发货
diff --git a/pages/activity/pind_list/pind_list.js b/pages/activity/pind_list/pind_list.js
index af4770e..e6c1775 100644
--- a/pages/activity/pind_list/pind_list.js
+++ b/pages/activity/pind_list/pind_list.js
@@ -22,9 +22,6 @@ Page({
//------初始化加载----------
onLoad: function (t) {
- if(!getApp().is_Single_page()){
- return false;
- }
wx.setNavigationBarTitle({
title: "天天拼单",
})
diff --git a/pages/activity/seckill_list/seckill_list.js b/pages/activity/seckill_list/seckill_list.js
index c732c09..0c27e38 100644
--- a/pages/activity/seckill_list/seckill_list.js
+++ b/pages/activity/seckill_list/seckill_list.js
@@ -21,9 +21,6 @@ Page({
//------初始化加载----------
onLoad: function (t) {
- if(!getApp().is_Single_page()){
- return false;
- }
wx.setNavigationBarTitle({
title: "商品秒杀",
})
diff --git a/pages/cart/cart2/cart2.js b/pages/cart/cart2/cart2.js
index e4caecb..4e12a82 100644
--- a/pages/cart/cart2/cart2.js
+++ b/pages/cart/cart2/cart2.js
@@ -1378,6 +1378,15 @@ Page({
wx.showLoading({
title: "处理中."
})
+
+ //是不是区域包邮
+ th.data.is_area_by=0;
+ //当不是区域不包邮的时候,没有不包邮商品的时候
+ th.data.free1=0;
+ th.data.cut_o_shipping_price=0;
+ th.data.cut_goods_piece=0;
+ th.data.cut_goods_weight=0;
+
var all_price = 0; //所有的商品总价
var all_shipping_m = 0; //所有的物流总价
var all_total_m = 0; //所有的订单应付总价
@@ -1391,6 +1400,9 @@ Page({
var umoney = th.data.userinfo.user_money - th.data.txmon - (th.data.userinfo.frozen_money ? th.data.userinfo.frozen_money : 0);
var freight_free = ee.freight_free; //全场满多少包邮
+ var free1=freight_free;
+
+
var weight_free = ee.weight_free; //多少kg内包邮
var no_ex_id = ee.no_ex_id;
var no_ex_good = null;
@@ -1503,16 +1515,6 @@ Page({
}
o_price += item[j].goods_price * item[j].goods_num;
- //判断是否有设置限制重量包邮,先看商品有没有包邮
- if (item[j]['is_past'] !== 1 && item[j]['exp_sum_type'] == 2) {
- if (goods_weight < 0) goods_weight = 0;
- //累积商品重量 每种商品的重量 * 数量
- goods_weight += item[j]['weight'] * item[j]['goods_num'];
- if (weight_free > 0) {
- out_of_weight = (weight_free * 1000) - goods_weight;
- }
- }
-
}
//判断是不是有组合购的金额
var f_o_price = o_price;
@@ -1564,12 +1566,14 @@ Page({
th.data.is_no_past = 1; //不包邮标识符
+ var no_ex_good_arr = null;
//--有不包邮区域,且不免运费,全场的计算,要减到优惠金额 和券的金额--
if (no_ex_id && freight_free > 0 && (o_price - quan_price) >= freight_free && cart_item.exp_type == 0 && (by_qc.region_list || by_qc.goods_list)) {
//如果有设置不包邮区域的时候
if (by_qc.region_list != "" && by_qc.region_list != null && by_qc.region_list != undefined) {
if (th.check_by_area(by_qc.region_list)) {
freight_free = 0;
+ th.data.is_area_by=1;
//goods_weight = -1;
//out_of_weight = 0;
th.data.is_no_by[pickid] = 1;
@@ -1580,11 +1584,61 @@ Page({
freight_free = 0;
//goods_weight = -1;
//out_of_weight = 0;
- th.data.is_no_by[pickid] = 1;
+ //th.data.is_no_by[pickid] = 1;
no_ex_good = by_qc.goods_list;
+ if (no_ex_good) no_ex_good_arr = no_ex_good.split(',');
}
}
+
+
+
+ var is_in_no_ex_goods_arr=0;
+ var by_g_weight=0;
+ //--------循环计算商品总物流-----------
+ for (var jo = 0; jo < item.length; jo++) {
+ //----------------如果是选择了物流---------------------
+ if (cart_item.exp_type == 0 && item[jo].is_free_shipping == 0 && th.data.user_addr != null){
+
+ //判断是否有设置限制重量包邮,先看商品有没有包邮
+ if(!no_ex_good_arr || no_ex_good_arr.indexOf(item[jo].goods_id + '')== -1){
+ if(!th.data.is_area_by) th.data.free1=free1;
+ //此时是 模板里面没有不包邮商品列表或者是 该商品没有再不包邮商品列表礼包
+ if (item[jo]['is_past'] !== 1 && item[jo]['exp_sum_type'] == 2) {
+ if (goods_weight < 0) goods_weight = 0;
+ //累积商品重量 每种商品的重量 * 数量
+ goods_weight += item[jo]['weight'] * item[jo]['goods_num'];
+ by_g_weight+=item[jo]['weight'] * item[jo]['goods_num'];
+ if (weight_free > 0) {
+ out_of_weight = (weight_free * 1000) - by_g_weight;
+ }else{
+ out_of_weight= -by_g_weight;
+ }
+ }
+ }
+ //这个是在不包邮列表礼包
+ else if(no_ex_good_arr.indexOf(item[jo].goods_id + '') > -1){
+ is_in_no_ex_goods_arr=1;
+ if (item[jo]['is_past'] !== 1 && item[jo]['exp_sum_type'] == 2) {
+ if (goods_weight < 0) goods_weight = 0;
+ //累积商品重量 每种商品的重量 * 数量
+ goods_weight += item[jo]['weight'] * item[jo]['goods_num'];
+ }
+
+ }
+ }
+ }
+
+ //当商品没有超出的时候
+ if(out_of_weight>=0){
+ out_of_weight= -by_g_weight;
+ }else{
+ out_of_weight= -weight_free * 1000;
+ }
+
+ //所有的商品都不在不包邮商品列表,freight_free为0的时候,以及不是区域包邮
+ if(!is_in_no_ex_goods_arr && !freight_free && !th.data.is_area_by) freight_free=free1;
+
//--如果是物流,且选择了地址,就要开始显示包邮券,且包邮券也已经优惠了优惠活动的金额--
if (cart_item.exp_type == 0 && th.data.user_addr != null && !cart_item.is_xz_yh) {
//看是不是有调用过包邮券
@@ -1669,23 +1723,20 @@ Page({
if (no_ex_good) {
is_good_no_by = th.check_by_goods(no_ex_good, item[j].goods_id);
}
-
//如果达到全场包邮的条件,同时,没有地区不包邮,或者商品不包邮 并且没有超出重量
+ /*--
if (o_price - quan_price >= freight_free && freight_free > 0 && !is_good_no_by && th.data.is_no_by[pickid] != 1 && out_of_weight >=0 ) {
continue;
- }
-
+ }--*/
//--如果是包邮券使用的情况下,如果商品是包邮的,那么就不进行计算--
if (th.data.using_quan[pickid] && th.data.using_quan[pickid].isby == 1 && !is_good_no_by) {
continue;
}
- var no_ex_good_arr = null;
- if (no_ex_good) no_ex_good_arr = no_ex_good.split(',');
-
+ //var no_ex_good_arr = null;
+ //if (no_ex_good) no_ex_good_arr = no_ex_good.split(',');
//----------------如果是选择了物流---------------------
- if (cart_item.exp_type == 0 && item[j].is_free_shipping == 0 && (!no_ex_good_arr || no_ex_good_arr.indexOf(item[j].goods_id + '') > -1)) {
-
+ if (cart_item.exp_type == 0 && item[j].is_free_shipping == 0) {
//如果地址不为空
if (th.data.user_addr != null) {
switch (item[j]['exp_sum_type']) {
@@ -1693,14 +1744,6 @@ Page({
//统一运费
o_shipping_price += item[j]['uniform_exp_sum'];
break;
- // case 2:
- // if (goods_weight < 0) goods_weight = 0;
- // //累积商品重量 每种商品的重量 * 数量
- // goods_weight += item[j]['weight'] * item[j]['goods_num'];
- // if (weight_free > 0) {
- // out_of_weight = (weight_free * 1000) - goods_weight;
- // }
- // break;
case 3:
if (goods_piece < 0) goods_piece = 0;
//累积商品数量
@@ -1708,12 +1751,28 @@ Page({
break;
}
}
- }else{
+
+ if(!no_ex_good_arr || no_ex_good_arr.indexOf(item[j].goods_id + '')== -1){
+ switch (item[j]['exp_sum_type']) {
+ case 1:
+ //统一运费
+ th.data.cut_o_shipping_price += item[j]['uniform_exp_sum'];
+ break;
+ case 3:
+ //累积商品数量
+ th.data.cut_goods_piece += item[j]['goods_num'];
+ break;
+ }
+ }
+
+
+ }else{
+ /*--
if(item[j]['exp_sum_type']==2 && out_of_weight!==0){
goods_weight = -1;
out_of_weight = 0;
- }
+ }--*/
}
}
@@ -1753,8 +1812,6 @@ Page({
o_condition = o_price_no_zh - quan_price;
}
-
-
var order_m = 0;
//---判断是不是有订单优惠---
await getApp().request.promiseGet("/api/weshop/promorder/getOrderPromotion", {
@@ -3124,6 +3181,14 @@ Page({
var fw_price = 0, fp_price = 0;
item = item.config;
if (item == null) return o_shipping_price;
+
+ //------超出重量----------
+ if (out_of_weight < 0 && o_price >= freight_free && !th.data.is_no_by[pickid]) {
+ goods_weight=goods_weight+ out_of_weight;
+ if(goods_weight==0) goods_weight=-1;
+ }
+
+
//------按重量----------
if (goods_weight >= 0 && item['money']) {
fw_price = parseFloat(item['money']);
@@ -3133,16 +3198,13 @@ Page({
fw_price = fw_price + n * parseFloat(item['add_money']);
}
}
- //------超出重量----------
- if (out_of_weight < 0 && o_price >= freight_free && !th.data.is_no_by[pickid]) {
- fw_price = parseFloat(item['money']);
- var out_of_weight = Math.abs(out_of_weight);
- if (out_of_weight > item['first_weight']) {
- var fw = out_of_weight - item['first_weight'];
- var n = Math.ceil(fw / item['second_weight'])
- fw_price = fw_price + n * parseFloat(item['add_money']);
- }
- }
+
+ if(th.data.free1 && freight_free<=0) freight_free=th.data.free1;
+
+
+ //当有包邮和不包邮混合在一起的时候,件数要重新计算
+ if(freight_free>0 && o_price >= freight_free && goods_piece>0 && th.data.cut_goods_piece)
+ goods_piece=goods_piece-th.data.cut_goods_piece;
//------按件数----------
if (goods_piece > 0 && item['piecemoney']) {
fp_price = parseFloat(item['piecemoney']);
@@ -3152,6 +3214,9 @@ Page({
fp_price = fp_price + m * parseFloat(item['add_piecemoney']);
}
}
+ //当有包邮和不包邮混合在一起的时候,统一运费要重新计算
+ if(freight_free>0 && o_price >= freight_free && th.data.cut_o_shipping_price && price>0) price=price-th.data.cut_o_shipping_price;
+
var rspice = parseFloat(price + fw_price + fp_price);
return rspice;
},
diff --git a/pages/giftpack/buygiftpack/giftpackbuy.js b/pages/giftpack/buygiftpack/giftpackbuy.js
index 6d890ba..1b3de11 100644
--- a/pages/giftpack/buygiftpack/giftpackbuy.js
+++ b/pages/giftpack/buygiftpack/giftpackbuy.js
@@ -29,9 +29,7 @@ Page({
first_leader: e.globalData.first_leader || 0, // 推荐人ID
},
onLoad: function (options) {
- if(!getApp().is_Single_page()){
- return false;
- }
+
var th = this;
var my_confirm = th.selectComponent("#my_confirm"); //组件的id
my_confirm.open_cancel(0);
@@ -73,15 +71,17 @@ Page({
});
}
})
-
+
},
onShow: function () {
//--先判断会员状态--
var user_info = getApp().globalData.userInfo;
if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
- getApp().goto('/pages/togoin/togoin');
- return false;
+ if(getApp().is_Single_page()){
+ getApp().goto('/pages/togoin/togoin');
+ return false;
+ }
}
this.getList();
diff --git a/pages/giftpack/giftpacklist/giftpacklist.js b/pages/giftpack/giftpacklist/giftpacklist.js
index 61d9712..e19352c 100644
--- a/pages/giftpack/giftpacklist/giftpacklist.js
+++ b/pages/giftpack/giftpacklist/giftpacklist.js
@@ -32,9 +32,6 @@ Page({
first_leader: e.globalData.first_leader || 0, // 推荐人ID
},
onLoad: function (options) {
- if(!getApp().is_Single_page()){
- return false;
- }
var th = this;
th.setData({
isBuy: options.isBuy,
@@ -65,13 +62,11 @@ Page({
onShow: function () {
//--先判断会员状态--
var user_info = getApp().globalData.userInfo;
-
- if(!getApp().is_Single_page()){
- return false;
- }
if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
- getApp().goto('/pages/togoin/togoin');
- return false;
+ if(getApp().is_Single_page()){
+ getApp().goto('/pages/togoin/togoin');
+ return false;
+ }
}
if (this.data.isBuy == 0) {
this.GetMyGiftList();
diff --git a/pages/giftpack/mygiftpack/mygiftpack.js b/pages/giftpack/mygiftpack/mygiftpack.js
index 0f38239..f893a97 100644
--- a/pages/giftpack/mygiftpack/mygiftpack.js
+++ b/pages/giftpack/mygiftpack/mygiftpack.js
@@ -30,9 +30,6 @@ Page({
},
onLoad: function(options) {
- if(!getApp().is_Single_page()){
- return false;
- }
var th = this;
th.setData({
getStorageID: a.stoid,
@@ -79,8 +76,12 @@ Page({
//--先判断会员状态--
var user_info = getApp().globalData.userInfo;
if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
- getApp().goto('/pages/togoin/togoin');
- return false;
+ if(getApp().is_Single_page()){
+ getApp().goto('/pages/togoin/togoin');
+ return false;
+ }
+ // getApp().goto('/pages/togoin/togoin');
+ // return false;
}
this.getList();
diff --git a/pages/goods/categoryList/categoryList.js b/pages/goods/categoryList/categoryList.js
index d37023c..e3d1305 100644
--- a/pages/goods/categoryList/categoryList.js
+++ b/pages/goods/categoryList/categoryList.js
@@ -93,9 +93,6 @@ Page({
onLoad: function(tt) {
- if(!getApp().is_Single_page()){
- return false;
- }
var that = this;
var first_leader=tt.first_leader;
if(first_leader){
diff --git a/pages/goods/goodsInfo/buy_flash_normal.wxml b/pages/goods/goodsInfo/buy_flash_normal.wxml
index 056da29..0d15a59 100644
--- a/pages/goods/goodsInfo/buy_flash_normal.wxml
+++ b/pages/goods/goodsInfo/buy_flash_normal.wxml
@@ -3,7 +3,7 @@
-
+
{{sele_g.goods_name}}
diff --git a/pages/goods/goodsInfo/buy_integral.wxml b/pages/goods/goodsInfo/buy_integral.wxml
index 194cfb4..04b58fb 100644
--- a/pages/goods/goodsInfo/buy_integral.wxml
+++ b/pages/goods/goodsInfo/buy_integral.wxml
@@ -3,7 +3,7 @@
-
+
{{data.goods_name}}
diff --git a/pages/goods/goodsInfo/buy_integral_normal.wxml b/pages/goods/goodsInfo/buy_integral_normal.wxml
index 80a417e..9449d8b 100644
--- a/pages/goods/goodsInfo/buy_integral_normal.wxml
+++ b/pages/goods/goodsInfo/buy_integral_normal.wxml
@@ -3,7 +3,7 @@
-
+
{{sele_g.goods_name}}
diff --git a/pages/goods/goodsInfo/buy_pt.wxml b/pages/goods/goodsInfo/buy_pt.wxml
index ae9a32f..96f4d63 100644
--- a/pages/goods/goodsInfo/buy_pt.wxml
+++ b/pages/goods/goodsInfo/buy_pt.wxml
@@ -5,7 +5,7 @@
-
+
{{sele_g.goods_name}}
diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js
index e2f0c16..146b870 100644
--- a/pages/goods/goodsInfo/goodsInfo.js
+++ b/pages/goods/goodsInfo/goodsInfo.js
@@ -4519,12 +4519,44 @@ Page({
if (quan_list) {
for (var ind in quan_list) {
var ep = quan_list[ind];
- var start = ut.formatTime(ep.use_start_time, "yyyy-MM-dd");
- var end = ut.formatTime(ep.use_end_time, "yyyy-MM-dd");
- start = start.replace("00:00:00", "");
- end = end.replace("00:00:00", "");
+ var start = "";
+ var end = "";
+ if(ep.endtype == 1){
+ if(ep.starttype == 1) {
+ start = ut.formatTime(ut.gettimestamp()+3600*24*ep.startdays,"yyyy-MM-dd");
+ }else{
+ start = ut.formatTime(ut.gettimestamp(),"yyyy-MM-dd");
+ }
+ if(ep.days > 0) {
+ end = ut.formatTime(ut.gettimestamp()+3600*24*ep.startdays+3600*24*ep.days,"yyyy-MM-dd");
+ }else{
+ end = "不限";
+ }
+ }else {
+ if(ep.starttype == 1 ){
+ start = ut.formatTime(ut.gettimestamp()+3600*24*ep.startdays,"yyyy-MM-dd");
+ }else{
+ if(ep.starttype == 0 && ep.use_start_time >0) {
+ start = ut.formatTime(ep.use_start_time ,"yyyy-MM-dd");
+ }else{
+ start = "不限"
+ }
+ }
+
+ if(ep.use_end_time > 0 ) {
+ end = ut.formatTime(ep.use_end_time ,"yyyy-MM-dd");
+ }else{
+ end = "不限"
+ }
+ }
quan_list[ind].start = start;
quan_list[ind].end = end;
+ // var start = ut.formatTime(ep.use_start_time, "yyyy-MM-dd");
+ // var end = ut.formatTime(ep.use_end_time, "yyyy-MM-dd");
+ // start = start.replace("00:00:00", "");
+ // end = end.replace("00:00:00", "");
+ // quan_list[ind].start = start;
+ // quan_list[ind].end = end;
}
}
diff --git a/pages/goods/goodsInfo/goodsInfo.wxml b/pages/goods/goodsInfo/goodsInfo.wxml
index cb5243a..c755b15 100644
--- a/pages/goods/goodsInfo/goodsInfo.wxml
+++ b/pages/goods/goodsInfo/goodsInfo.wxml
@@ -294,7 +294,7 @@
-
+
{{card_name}}
@@ -1469,7 +1469,7 @@
-
+
diff --git a/pages/index/index/index.js b/pages/index/index/index.js
index 26e62c9..dedb298 100644
--- a/pages/index/index/index.js
+++ b/pages/index/index/index.js
@@ -88,9 +88,6 @@ Page({
},
onLoad: async function (tt) {
- if(!getApp().is_Single_page()){
- return false;
- }
var th = this;
var first_leader = tt.first_leader;
if (!first_leader && tt.scene) {
diff --git a/pages/store/index.wxss b/pages/store/index.wxss
index 9a03ec1..62d4aa0 100644
--- a/pages/store/index.wxss
+++ b/pages/store/index.wxss
@@ -1,4 +1,4 @@
-/* .box{
+.box{
padding: 10px;
border-bottom: 10px solid #f5f5f5;
color: #000000;
@@ -44,7 +44,7 @@ position: relative;
.sear_inp{width: 490rpx; background-color:#eaeaea; height: 80rpx; border-radius:5rpx; margin: 25rpx;}
.sear_inp input{width: 400rpx;}
.select{height: 80rpx; width: 220rpx;background-color:#eaeaea; margin:25rpx; font-size: 28rpx; line-height: 80rpx;text-align: center }
-.sear_btn{ width: 50rpx; height: 100%; display: flex; align-items: center;} */
+.sear_btn{ width: 50rpx; height: 100%; display: flex; align-items: center;}
.border-bottom {
border-bottom: 2rpx solid #e0e0e0;
diff --git a/pages/template/index.js b/pages/template/index.js
index 9a9a9d8..8a3e50c 100644
--- a/pages/template/index.js
+++ b/pages/template/index.js
@@ -15,9 +15,6 @@ Page({
},
onLoad: function(e) {
- if(!getApp().is_Single_page()){
- return false;
- }
var th = this;
this.data.temp_id=e.scene;
if(!this.data.temp_id)
diff --git a/pages/user/assistance/assistance.js b/pages/user/assistance/assistance.js
index b5541a8..5637522 100644
--- a/pages/user/assistance/assistance.js
+++ b/pages/user/assistance/assistance.js
@@ -39,9 +39,6 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
- if(!getApp().is_Single_page()){
- return false;
- }
var th = this;
var nav_b = th.selectComponent("#nav_b"); //组件的id
nav_b.set_name("助力", "/pages/user/assistance/assistance");
@@ -56,8 +53,10 @@ Page({
//--先判断会员状态--
var user_info = getApp().globalData.userInfo;
if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
- getApp().goto('/pages/togoin/togoin');
- return false;
+ if(getApp().is_Single_page()){
+ getApp().goto('/pages/togoin/togoin');
+ return false;
+ }
}
var th = this;
diff --git a/pages/user/index/index.js b/pages/user/index/index.js
index 08d61bf..d553601 100644
--- a/pages/user/index/index.js
+++ b/pages/user/index/index.js
@@ -25,6 +25,7 @@ Page({
txmon: 0,
byquan: 0,
yuer: 0,
+ is_no_plus:1,
currentPage: 1,
recommend_list: [],
tc_hide: true,
@@ -134,7 +135,21 @@ Page({
}
})
-
+ //调用接口判断商家plus有没有过期
+ rq.promiseGet("/store/storemoduleendtime/page?store_id=" + os.stoid + "&type=3", {}).then(res => {
+ if (res.data.code == 0) {
+ var arr = res.data.data.pageData;
+ if (arr.length > 0) {
+ var item = arr[0];
+ if (item.is_sy == 0) {
+ var now = Date.parse(new Date()); now = now / 1000;
+ if (item.end_time < now) {
+ th.setData({ is_no_plus: 0 })
+ }
+ }
+ }
+ }
+ })
var th=this;
// 判断是否开启美业
diff --git a/pages/user/index/index.wxml b/pages/user/index/index.wxml
index 32a1156..fc4fe8a 100644
--- a/pages/user/index/index.wxml
+++ b/pages/user/index/index.wxml
@@ -69,7 +69,7 @@
-
+
diff --git a/pages/user/userinfo/userinfo.js b/pages/user/userinfo/userinfo.js
index 4628203..6206e89 100644
--- a/pages/user/userinfo/userinfo.js
+++ b/pages/user/userinfo/userinfo.js
@@ -49,6 +49,7 @@ Page({
fir_pick_index: 0,
sec_pick_index: 0,
is_gps: 1,
+ is_no_plus:1,
lon: 0,
only_pk: 0,
open_ind_store: 0, //哪里打开的门店列表的控制属性
@@ -608,6 +609,7 @@ Page({
},
//------初始化加载----------
onLoad: function(t) {
+ let th= this;
var user = getApp().globalData.userInfo;
if (user.card_field != '' && user.card_field != null && user.card_field != undefined && user.card_expiredate) {
var now = ut.gettimestamp();
@@ -618,6 +620,21 @@ Page({
this.puls_user();
}
}
+ //调用接口判断商家plus有没有过期
+ getApp().request.promiseGet("/store/storemoduleendtime/page?store_id=" + r.stoid + "&type=3", {}).then(res => {
+ if (res.data.code == 0) {
+ var arr = res.data.data.pageData;
+ if (arr.length > 0) {
+ var item = arr[0];
+ if (item.is_sy == 0) {
+ var now = Date.parse(new Date()); now = now / 1000;
+ if (item.end_time < now) {
+ th.setData({ is_no_plus: 0 })
+ }
+ }
+ }
+ }
+ })
this.initial_user();
// 获取用户昵称
diff --git a/pages/user/userinfo/userinfo.wxml b/pages/user/userinfo/userinfo.wxml
index 5d93e3e..68cfc8b 100644
--- a/pages/user/userinfo/userinfo.wxml
+++ b/pages/user/userinfo/userinfo.wxml
@@ -11,17 +11,15 @@
-
{{user.nickname}}
-
-
+
@@ -29,7 +27,7 @@
-
+