Commit ceabe5233bc591074ddc0832fb75a7e8df1d1c0c

Authored by 后端研发-苏泰源
2 parents 29dd6b18 821133b4

Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev

... ... @@ -430,16 +430,8 @@ App({
430 430 //获取场景值 判断是否是单页面
431 431 is_Single_page() {
432 432 let scene = wx.getLaunchOptionsSync().scene;
433   - //--先判断会员状态--
434   - if (scene == 1154) {
435   - wx.showToast({
436   - title: '请前往小程序',
437   - icon: "error",
438   - duration: 3000,
439   - })
440   - return false
441   - }
442   - return true;
  433 + //--判断是否是单页面--
  434 + return scene == 1154? false:true;
443 435 },
444 436  
445 437  
... ...
packageA/pages/jfbuy/jfbuy.js
... ... @@ -65,9 +65,6 @@ Page({
65 65 * 生命周期函数--监听页面加载
66 66 */
67 67 onLoad: function (options) {
68   - if(!getApp().is_Single_page()){
69   - return false;
70   - }
71 68 var th=this;
72 69 this.data.requestData={
73 70 store_id:oo.stoid,
... ...
packageA/pages/liveStream/liveStream.js
... ... @@ -208,17 +208,15 @@ Page({
208 208 * 生命周期函数--监听页面加载
209 209 */
210 210 onLoad: function (options) {
211   - if(!getApp().is_Single_page()){
212   - return false;
213   - }
214 211 self = this;
215   - // console.log('ppppp',this.pageTotal(4, 10));
  212 + if(getApp().is_Single_page()){
  213 + app.isLogin().then(function(data) {//进入页面前已经授权登录成功
  214 + self.setData({
  215 + userInfo: data,
  216 + });
  217 + });
  218 + }
216 219  
217   - app.isLogin().then(function(data) {//进入页面前已经授权登录成功
218   - self.setData({
219   - userInfo: data,
220   - });
221   - });
222 220 },
223 221  
224 222 /**
... ...
packageA/pages/quan_list/quan_list.wxml
... ... @@ -4,44 +4,46 @@
4 4  
5 5 <block wx:if="{{config2.couponset}}">
6 6 <view class="header">
7   - <rich-text nodes="{{config2.couponset}}" class="r_txt fs26"></rich-text>
  7 + <rich-text nodes="{{config2.couponset}}" class="r_txt fs26"></rich-text>
8 8 </view>
9 9 </block>
10 10 <view class="content">
11   - <view bindtap="go_detail" data-ind="{{index}}" class="quan_item flex fs30" wx:for="{{dataList}}">
  11 + <view bindtap="go_detail" data-ind="{{index}}" class="quan_item flex fs30" wx:for="{{dataList}}">
12 12 <!-- 左边 -->
13 13 <view class="left {{tool.get_color(index,dataList)}} flex ai-center jc-center co-w">
14 14 <view class="t-c">
15   - <view class="fs40"><text class="fs24">¥</text>{{filters.toFix(item.money,2)}}</view>
16   - <view>满{{filters.toFix(item.condition,2)}}可用</view>
  15 + <view class="fs40"><text class="fs24">¥</text>{{filters.toFix(item.money,2)}}</view>
  16 + <view>满{{filters.toFix(item.condition,2)}}可用</view>
17 17 </view>
18 18 </view>
19   - <!-- 右边 -->
  19 + <!-- 右边 -->
20 20 <view class="right fs24 co_g pding" style="background-image:url({{iurl}}/miniapp/images/coupon_img/white.png); position: relative">
21   - <view class="fs28 co_b" style="margin-top: 15rpx">{{item.name}}</view>
  21 + <view class="fs28 co_b" style="margin-top: 15rpx">{{item.name}}</view>
22 22  
23   - <view class="ellipsis-1" style="margin-top: 5rpx" wx:if="{{item.coupon_remark!=null && item.coupon_remark!=''}}">{{item.coupon_remark}}</view>
24   - <view style="margin-top: 5rpx" wx:else>所有门店通用</view>
25   - <view wx:if="{{item.endtype==0}}">有效期
26   - <text wx:if="{{item.starttype==1}}">{{filters.format_time(getcurday+3600*24*item.startdays)}}</text>
27   - <text wx:if="{{item.starttype==0 && item.use_start_time>0}}"> {{filters.format_time(item.use_start_time)}}</text>至
28   - <text wx:if="{{item.use_end_time>0}}"> {{filters.format_time(item.use_end_time)}}</text><text wx:else>不限</text>
29   - </view>
30   - <view wx:else>有效期 <text wx:if="{{item.starttype==1}}">{{filters.format_time(getcurday+3600*24*item.startdays)}}</text>
  23 + <view class="ellipsis-1" style="margin-top: 5rpx" wx:if="{{item.coupon_remark!=null && item.coupon_remark!=''}}">{{item.coupon_remark}}</view>
  24 + <view style="margin-top: 5rpx" wx:else>所有门店通用</view>
  25 + <view wx:if="{{item.endtype==0}}">有效期
  26 + <text wx:if="{{item.starttype==1}}">{{filters.format_time(getcurday+3600*24*item.startdays)}}</text>
  27 + <text wx:if="{{item.starttype==0 && item.use_start_time>0}}"> {{filters.format_time(item.use_start_time)}}</text>
  28 + 至
  29 + <text wx:if="{{item.use_end_time>0}}"> {{filters.format_time(item.use_end_time)}}</text><text wx:else>不限</text>
  30 + </view>
  31 + <view wx:else>有效期
  32 + <text wx:if="{{item.starttype==1}}">{{filters.format_time(getcurday+3600*24*item.startdays)}}</text>
31 33 <text wx:else>{{filters.format_time(getcurday)}}</text>
32 34
33   - <text wx:if="{{item.days>0}}">{{filters.format_time(getcurday+3600*24*item.days)}}</text>
34   - <text wx:else>不限</text>
35   -
36   - </view>
37   - <view>每人限领:<text wx:if="{{item.everyone_num>0}}">{{item.everyone_num}}</text><text wx:else>不限</text></view>
38   - <!-- 领取按钮 -->
39   - <view data-ind="{{index}}" data-cid="{{item.id}}" catchtap="get_quan">
  35 + <text wx:if="{{item.days>0}}">{{filters.format_time(getcurday+3600*24*item.days+3600*24*item.startdays)}}</text>
  36 + <text wx:else>不限</text>
  37 +
  38 + </view>
  39 + <view>每人限领:<text wx:if="{{item.everyone_num>0}}">{{item.everyone_num}}</text><text wx:else>不限</text></view>
  40 + <!-- 领取按钮 -->
  41 + <view data-ind="{{index}}" data-cid="{{item.id}}" catchtap="get_quan">
40 42 <view wx:if="{{item.everyone_num>0 && item.lqnum>=item.everyone_num}}" class="btn flex jc-center ai-center is_get">已领取</view>
41 43 <view wx:else class="btn flex jc-center ai-center">立即领取</view>
42   - </view>
  44 + </view>
43 45 </view>
44   - </view>
  46 + </view>
45 47 </view>
46 48  
47 49 <view wx:if="{{show_success}}">
... ... @@ -58,5 +60,4 @@
58 60 </view>
59 61  
60 62 <warn id="warn"></warn>
61   -<nav_box id="nav"></nav_box>
62   -
  63 +<nav_box id="nav"></nav_box>
63 64 \ No newline at end of file
... ...
packageA/pages/quan_pro/quan_pro.wxml
... ... @@ -40,7 +40,7 @@
40 40 <view wx:else class="lower fs30">有效期
41 41 <text wx:if="{{ q_data.starttype==1}}"> {{filters.format_time(getcurday+3600*24*q_data.startdays)}}</text>
42 42 <text wx:else>{{filters.format_time(getcurday)}}</text>至
43   - <text wx:if="{{q_data.days>0}}"> {{filters.format_time(getcurday+3600*24*q_data.days)}}</text><text wx:else>不限</text>
  43 + <text wx:if="{{q_data.days>0}}"> {{filters.format_time(getcurday+3600*24*q_data.days+3600*24*q_data.startdays)}}</text><text wx:else>不限</text>
44 44 </view>
45 45 </block>
46 46  
... ...
packageB/pages/zuhegou/index/index.js
... ... @@ -123,9 +123,7 @@ Page({
123 123 * 生命周期函数--监听页面加载
124 124 */
125 125 onLoad: function (options) {
126   - if(!getApp().is_Single_page()){
127   - return false;
128   - }
  126 +
129 127 console.log(options, 111);
130 128 self = this;
131 129 var the_id = options.id;
... ... @@ -160,8 +158,10 @@ Page({
160 158 //如果有会员的时候
161 159 var userInfo = getApp().globalData.userInfo;
162 160 if (!userInfo) {
163   - getApp().goto("/pages/togoin/togoin");
164   - return false;
  161 + if(getApp().is_Single_page()){
  162 + getApp().goto("/pages/togoin/togoin");
  163 + return false;
  164 + }
165 165 }
166 166 },
167 167  
... ...
packageB/pages/zuhegou/preindex/index.js
... ... @@ -123,9 +123,6 @@ Page({
123 123 * 生命周期函数--监听页面加载
124 124 */
125 125 onLoad: function (options) {
126   - if(!getApp().is_Single_page()){
127   - return false;
128   - }
129 126 console.log(options, 111);
130 127 self = this;
131 128 var the_id = options.id;
... ... @@ -160,8 +157,10 @@ Page({
160 157 //如果有会员的时候
161 158 var userInfo = getApp().globalData.userInfo;
162 159 if (!userInfo) {
163   - getApp().goto("/pages/togoin/togoin");
164   - return false;
  160 + if(getApp().is_Single_page()){
  161 + getApp().goto("/pages/togoin/togoin");
  162 + return false;
  163 + }
165 164 }
166 165 },
167 166  
... ...
packageC/pages/luckyGo/luckyGo_goodsInfo/buy_pt.wxml
... ... @@ -5,7 +5,7 @@
5 5  
6 6 <!-- 商品名称 -->
7 7 <view class="spec-goods">
8   - <image class="wh100 spec-img xc-distance-bottom" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image>
  8 + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image>
9 9 <view class="spec-goods-info">
10 10 <view class="spec-goods-name ellipsis-1">{{sele_g.goods_name}}</view>
11 11 <view class="flex ai_end xc-val-money {{sele_g[card_field]}}" >
... ...
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
... ... @@ -285,9 +285,7 @@ Page({
285 285  
286 286 //------初始化加载----------
287 287 onLoad: function (t) {
288   - if(!getApp().is_Single_page()){
289   - return false;
290   - }
  288 +
291 289 // console.log('onload');
292 290 if(t && t.group_id) {
293 291 this.data.group_id = t.group_id;
... ... @@ -534,10 +532,13 @@ Page({
534 532 //--先判断会员登陆状态--
535 533 var user_info = getApp().globalData.userInfo;
536 534 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  535 +
  536 + if(getApp().is_Single_page()){
537 537 wx.navigateTo({
538   - url: '/pages/togoin/togoin',
539   - })
  538 + url: '/pages/togoin/togoin',
  539 + })
540 540 return false;
  541 + }
541 542 }
542 543  
543 544 },
... ...
packageC/pages/presell/goodsInfo/goodsInfo.wxml
... ... @@ -527,7 +527,7 @@
527 527 <view class="">{{filters.format_time(presellForm.end_time,2)}} 预售结束</view>
528 528 <!-- <view class="">08.30 23:59:59 开始发货</view> -->
529 529 <view class="" wx:if="{{presellForm.delivery_type==1}}">{{filters.format_time(presellForm.delivery_date,2)}} 开始发货</view>
530   - <view class="" wx:else>付款{{presellForm.delivery_daynum}} 天发货</view>
  530 + <view class="" wx:else>付款{{presellForm.delivery_daynum}} 天发货</view>
531 531 </view>
532 532  
533 533 <view class="line" bindtap="openSpecModel" data-ind="2" style="margin-left: 10rpx; padding-left: 10rpx">
... ...
pages/activity/pind_list/pind_list.js
... ... @@ -22,9 +22,6 @@ Page({
22 22  
23 23 //------初始化加载----------
24 24 onLoad: function (t) {
25   - if(!getApp().is_Single_page()){
26   - return false;
27   - }
28 25 wx.setNavigationBarTitle({
29 26 title: "天天拼单",
30 27 })
... ...
pages/activity/seckill_list/seckill_list.js
... ... @@ -21,9 +21,6 @@ Page({
21 21  
22 22 //------初始化加载----------
23 23 onLoad: function (t) {
24   - if(!getApp().is_Single_page()){
25   - return false;
26   - }
27 24 wx.setNavigationBarTitle({
28 25 title: "商品秒杀",
29 26 })
... ...
pages/cart/cart2/cart2.js
... ... @@ -1378,6 +1378,15 @@ Page({
1378 1378 wx.showLoading({
1379 1379 title: "处理中."
1380 1380 })
  1381 +
  1382 + //是不是区域包邮
  1383 + th.data.is_area_by=0;
  1384 + //当不是区域不包邮的时候,没有不包邮商品的时候
  1385 + th.data.free1=0;
  1386 + th.data.cut_o_shipping_price=0;
  1387 + th.data.cut_goods_piece=0;
  1388 + th.data.cut_goods_weight=0;
  1389 +
1381 1390 var all_price = 0; //所有的商品总价
1382 1391 var all_shipping_m = 0; //所有的物流总价
1383 1392 var all_total_m = 0; //所有的订单应付总价
... ... @@ -1391,6 +1400,9 @@ Page({
1391 1400  
1392 1401 var umoney = th.data.userinfo.user_money - th.data.txmon - (th.data.userinfo.frozen_money ? th.data.userinfo.frozen_money : 0);
1393 1402 var freight_free = ee.freight_free; //全场满多少包邮
  1403 + var free1=freight_free;
  1404 +
  1405 +
1394 1406 var weight_free = ee.weight_free; //多少kg内包邮
1395 1407 var no_ex_id = ee.no_ex_id;
1396 1408 var no_ex_good = null;
... ... @@ -1503,16 +1515,6 @@ Page({
1503 1515 }
1504 1516 o_price += item[j].goods_price * item[j].goods_num;
1505 1517  
1506   - //判断是否有设置限制重量包邮,先看商品有没有包邮
1507   - if (item[j]['is_past'] !== 1 && item[j]['exp_sum_type'] == 2) {
1508   - if (goods_weight < 0) goods_weight = 0;
1509   - //累积商品重量 每种商品的重量 * 数量
1510   - goods_weight += item[j]['weight'] * item[j]['goods_num'];
1511   - if (weight_free > 0) {
1512   - out_of_weight = (weight_free * 1000) - goods_weight;
1513   - }
1514   - }
1515   -
1516 1518 }
1517 1519 //判断是不是有组合购的金额
1518 1520 var f_o_price = o_price;
... ... @@ -1564,12 +1566,14 @@ Page({
1564 1566  
1565 1567 th.data.is_no_past = 1; //不包邮标识符
1566 1568  
  1569 + var no_ex_good_arr = null;
1567 1570 //--有不包邮区域,且不免运费,全场的计算,要减到优惠金额 和券的金额--
1568 1571 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)) {
1569 1572 //如果有设置不包邮区域的时候
1570 1573 if (by_qc.region_list != "" && by_qc.region_list != null && by_qc.region_list != undefined) {
1571 1574 if (th.check_by_area(by_qc.region_list)) {
1572 1575 freight_free = 0;
  1576 + th.data.is_area_by=1;
1573 1577 //goods_weight = -1;
1574 1578 //out_of_weight = 0;
1575 1579 th.data.is_no_by[pickid] = 1;
... ... @@ -1580,11 +1584,61 @@ Page({
1580 1584 freight_free = 0;
1581 1585 //goods_weight = -1;
1582 1586 //out_of_weight = 0;
1583   - th.data.is_no_by[pickid] = 1;
  1587 + //th.data.is_no_by[pickid] = 1;
1584 1588 no_ex_good = by_qc.goods_list;
  1589 + if (no_ex_good) no_ex_good_arr = no_ex_good.split(',');
1585 1590 }
1586 1591 }
1587 1592  
  1593 +
  1594 +
  1595 +
  1596 + var is_in_no_ex_goods_arr=0;
  1597 + var by_g_weight=0;
  1598 + //--------循环计算商品总物流-----------
  1599 + for (var jo = 0; jo < item.length; jo++) {
  1600 + //----------------如果是选择了物流---------------------
  1601 + if (cart_item.exp_type == 0 && item[jo].is_free_shipping == 0 && th.data.user_addr != null){
  1602 +
  1603 + //判断是否有设置限制重量包邮,先看商品有没有包邮
  1604 + if(!no_ex_good_arr || no_ex_good_arr.indexOf(item[jo].goods_id + '')== -1){
  1605 + if(!th.data.is_area_by) th.data.free1=free1;
  1606 + //此时是 模板里面没有不包邮商品列表或者是 该商品没有再不包邮商品列表礼包
  1607 + if (item[jo]['is_past'] !== 1 && item[jo]['exp_sum_type'] == 2) {
  1608 + if (goods_weight < 0) goods_weight = 0;
  1609 + //累积商品重量 每种商品的重量 * 数量
  1610 + goods_weight += item[jo]['weight'] * item[jo]['goods_num'];
  1611 + by_g_weight+=item[jo]['weight'] * item[jo]['goods_num'];
  1612 + if (weight_free > 0) {
  1613 + out_of_weight = (weight_free * 1000) - by_g_weight;
  1614 + }else{
  1615 + out_of_weight= -by_g_weight;
  1616 + }
  1617 + }
  1618 + }
  1619 + //这个是在不包邮列表礼包
  1620 + else if(no_ex_good_arr.indexOf(item[jo].goods_id + '') > -1){
  1621 + is_in_no_ex_goods_arr=1;
  1622 + if (item[jo]['is_past'] !== 1 && item[jo]['exp_sum_type'] == 2) {
  1623 + if (goods_weight < 0) goods_weight = 0;
  1624 + //累积商品重量 每种商品的重量 * 数量
  1625 + goods_weight += item[jo]['weight'] * item[jo]['goods_num'];
  1626 + }
  1627 +
  1628 + }
  1629 + }
  1630 + }
  1631 +
  1632 + //当商品没有超出的时候
  1633 + if(out_of_weight>=0){
  1634 + out_of_weight= -by_g_weight;
  1635 + }else{
  1636 + out_of_weight= -weight_free * 1000;
  1637 + }
  1638 +
  1639 + //所有的商品都不在不包邮商品列表,freight_free为0的时候,以及不是区域包邮
  1640 + if(!is_in_no_ex_goods_arr && !freight_free && !th.data.is_area_by) freight_free=free1;
  1641 +
1588 1642 //--如果是物流,且选择了地址,就要开始显示包邮券,且包邮券也已经优惠了优惠活动的金额--
1589 1643 if (cart_item.exp_type == 0 && th.data.user_addr != null && !cart_item.is_xz_yh) {
1590 1644 //看是不是有调用过包邮券
... ... @@ -1669,23 +1723,20 @@ Page({
1669 1723 if (no_ex_good) {
1670 1724 is_good_no_by = th.check_by_goods(no_ex_good, item[j].goods_id);
1671 1725 }
1672   -
1673 1726 //如果达到全场包邮的条件,同时,没有地区不包邮,或者商品不包邮 并且没有超出重量
  1727 + /*--
1674 1728 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 ) {
1675 1729 continue;
1676   - }
1677   -
  1730 + }--*/
1678 1731 //--如果是包邮券使用的情况下,如果商品是包邮的,那么就不进行计算--
1679 1732 if (th.data.using_quan[pickid] && th.data.using_quan[pickid].isby == 1 && !is_good_no_by) {
1680 1733 continue;
1681 1734 }
1682 1735  
1683   - var no_ex_good_arr = null;
1684   - if (no_ex_good) no_ex_good_arr = no_ex_good.split(',');
1685   -
  1736 + //var no_ex_good_arr = null;
  1737 + //if (no_ex_good) no_ex_good_arr = no_ex_good.split(',');
1686 1738 //----------------如果是选择了物流---------------------
1687   - 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)) {
1688   -
  1739 + if (cart_item.exp_type == 0 && item[j].is_free_shipping == 0) {
1689 1740 //如果地址不为空
1690 1741 if (th.data.user_addr != null) {
1691 1742 switch (item[j]['exp_sum_type']) {
... ... @@ -1693,14 +1744,6 @@ Page({
1693 1744 //统一运费
1694 1745 o_shipping_price += item[j]['uniform_exp_sum'];
1695 1746 break;
1696   - // case 2:
1697   - // if (goods_weight < 0) goods_weight = 0;
1698   - // //累积商品重量 每种商品的重量 * 数量
1699   - // goods_weight += item[j]['weight'] * item[j]['goods_num'];
1700   - // if (weight_free > 0) {
1701   - // out_of_weight = (weight_free * 1000) - goods_weight;
1702   - // }
1703   - // break;
1704 1747 case 3:
1705 1748 if (goods_piece < 0) goods_piece = 0;
1706 1749 //累积商品数量
... ... @@ -1708,12 +1751,28 @@ Page({
1708 1751 break;
1709 1752 }
1710 1753 }
1711   - }else{
1712 1754  
  1755 +
  1756 + if(!no_ex_good_arr || no_ex_good_arr.indexOf(item[j].goods_id + '')== -1){
  1757 + switch (item[j]['exp_sum_type']) {
  1758 + case 1:
  1759 + //统一运费
  1760 + th.data.cut_o_shipping_price += item[j]['uniform_exp_sum'];
  1761 + break;
  1762 + case 3:
  1763 + //累积商品数量
  1764 + th.data.cut_goods_piece += item[j]['goods_num'];
  1765 + break;
  1766 + }
  1767 + }
  1768 +
  1769 +
  1770 + }else{
  1771 + /*--
1713 1772 if(item[j]['exp_sum_type']==2 && out_of_weight!==0){
1714 1773 goods_weight = -1;
1715 1774 out_of_weight = 0;
1716   - }
  1775 + }--*/
1717 1776 }
1718 1777 }
1719 1778  
... ... @@ -1753,8 +1812,6 @@ Page({
1753 1812 o_condition = o_price_no_zh - quan_price;
1754 1813 }
1755 1814  
1756   -
1757   -
1758 1815 var order_m = 0;
1759 1816 //---判断是不是有订单优惠---
1760 1817 await getApp().request.promiseGet("/api/weshop/promorder/getOrderPromotion", {
... ... @@ -3124,6 +3181,14 @@ Page({
3124 3181 var fw_price = 0, fp_price = 0;
3125 3182 item = item.config;
3126 3183 if (item == null) return o_shipping_price;
  3184 +
  3185 + //------超出重量----------
  3186 + if (out_of_weight < 0 && o_price >= freight_free && !th.data.is_no_by[pickid]) {
  3187 + goods_weight=goods_weight+ out_of_weight;
  3188 + if(goods_weight==0) goods_weight=-1;
  3189 + }
  3190 +
  3191 +
3127 3192 //------按重量----------
3128 3193 if (goods_weight >= 0 && item['money']) {
3129 3194 fw_price = parseFloat(item['money']);
... ... @@ -3133,16 +3198,13 @@ Page({
3133 3198 fw_price = fw_price + n * parseFloat(item['add_money']);
3134 3199 }
3135 3200 }
3136   - //------超出重量----------
3137   - if (out_of_weight < 0 && o_price >= freight_free && !th.data.is_no_by[pickid]) {
3138   - fw_price = parseFloat(item['money']);
3139   - var out_of_weight = Math.abs(out_of_weight);
3140   - if (out_of_weight > item['first_weight']) {
3141   - var fw = out_of_weight - item['first_weight'];
3142   - var n = Math.ceil(fw / item['second_weight'])
3143   - fw_price = fw_price + n * parseFloat(item['add_money']);
3144   - }
3145   - }
  3201 +
  3202 + if(th.data.free1 && freight_free<=0) freight_free=th.data.free1;
  3203 +
  3204 +
  3205 + //当有包邮和不包邮混合在一起的时候,件数要重新计算
  3206 + if(freight_free>0 && o_price >= freight_free && goods_piece>0 && th.data.cut_goods_piece)
  3207 + goods_piece=goods_piece-th.data.cut_goods_piece;
3146 3208 //------按件数----------
3147 3209 if (goods_piece > 0 && item['piecemoney']) {
3148 3210 fp_price = parseFloat(item['piecemoney']);
... ... @@ -3152,6 +3214,9 @@ Page({
3152 3214 fp_price = fp_price + m * parseFloat(item['add_piecemoney']);
3153 3215 }
3154 3216 }
  3217 + //当有包邮和不包邮混合在一起的时候,统一运费要重新计算
  3218 + if(freight_free>0 && o_price >= freight_free && th.data.cut_o_shipping_price && price>0) price=price-th.data.cut_o_shipping_price;
  3219 +
3155 3220 var rspice = parseFloat(price + fw_price + fp_price);
3156 3221 return rspice;
3157 3222 },
... ...
pages/giftpack/buygiftpack/giftpackbuy.js
... ... @@ -29,9 +29,7 @@ Page({
29 29 first_leader: e.globalData.first_leader || 0, // 推荐人ID
30 30 },
31 31 onLoad: function (options) {
32   - if(!getApp().is_Single_page()){
33   - return false;
34   - }
  32 +
35 33 var th = this;
36 34 var my_confirm = th.selectComponent("#my_confirm"); //组件的id
37 35 my_confirm.open_cancel(0);
... ... @@ -73,15 +71,17 @@ Page({
73 71 });
74 72 }
75 73 })
76   -
  74 +
77 75  
78 76 },
79 77 onShow: function () {
80 78 //--先判断会员状态--
81 79 var user_info = getApp().globalData.userInfo;
82 80 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
83   - getApp().goto('/pages/togoin/togoin');
84   - return false;
  81 + if(getApp().is_Single_page()){
  82 + getApp().goto('/pages/togoin/togoin');
  83 + return false;
  84 + }
85 85 }
86 86 this.getList();
87 87  
... ...
pages/giftpack/giftpacklist/giftpacklist.js
... ... @@ -32,9 +32,6 @@ Page({
32 32 first_leader: e.globalData.first_leader || 0, // 推荐人ID
33 33 },
34 34 onLoad: function (options) {
35   - if(!getApp().is_Single_page()){
36   - return false;
37   - }
38 35 var th = this;
39 36 th.setData({
40 37 isBuy: options.isBuy,
... ... @@ -65,13 +62,11 @@ Page({
65 62 onShow: function () {
66 63 //--先判断会员状态--
67 64 var user_info = getApp().globalData.userInfo;
68   -
69   - if(!getApp().is_Single_page()){
70   - return false;
71   - }
72 65 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
73   - getApp().goto('/pages/togoin/togoin');
74   - return false;
  66 + if(getApp().is_Single_page()){
  67 + getApp().goto('/pages/togoin/togoin');
  68 + return false;
  69 + }
75 70 }
76 71 if (this.data.isBuy == 0) {
77 72 this.GetMyGiftList();
... ...
pages/giftpack/mygiftpack/mygiftpack.js
... ... @@ -30,9 +30,6 @@ Page({
30 30 },
31 31  
32 32 onLoad: function(options) {
33   - if(!getApp().is_Single_page()){
34   - return false;
35   - }
36 33 var th = this;
37 34 th.setData({
38 35 getStorageID: a.stoid,
... ... @@ -79,8 +76,12 @@ Page({
79 76 //--先判断会员状态--
80 77 var user_info = getApp().globalData.userInfo;
81 78 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
82   - getApp().goto('/pages/togoin/togoin');
83   - return false;
  79 + if(getApp().is_Single_page()){
  80 + getApp().goto('/pages/togoin/togoin');
  81 + return false;
  82 + }
  83 + // getApp().goto('/pages/togoin/togoin');
  84 + // return false;
84 85 }
85 86 this.getList();
86 87  
... ...
pages/goods/categoryList/categoryList.js
... ... @@ -93,9 +93,6 @@ Page({
93 93  
94 94  
95 95 onLoad: function(tt) {
96   - if(!getApp().is_Single_page()){
97   - return false;
98   - }
99 96 var that = this;
100 97 var first_leader=tt.first_leader;
101 98 if(first_leader){
... ...
pages/goods/goodsInfo/buy_flash_normal.wxml
... ... @@ -3,7 +3,7 @@
3 3 <view class="pding">
4 4 <icon bindtap="closeSpecModal_flash_normal" class="modal-close" color="black" size="22" type="cancel"></icon>
5 5 <view class="spec-goods">
6   - <image class="wh100 spec-img xc-distance-bottom" src="{{sele_g.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image>
  6 + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{sele_g.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image>
7 7 <view class="spec-goods-info">
8 8 <view class="spec-goods-name ellipsis-2">{{sele_g.goods_name}}</view>
9 9 <view class="flex ai_end xc-val-money">
... ...
pages/goods/goodsInfo/buy_integral.wxml
... ... @@ -3,7 +3,7 @@
3 3 <view class="pding">
4 4 <icon bindtap="closeSpecModal_inte" class="modal-close" color="black" size="22" type="cancel"></icon>
5 5 <view class="spec-goods">
6   - <image class="wh100 spec-img xc-distance-bottom" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image>
  6 + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image>
7 7 <view class="spec-goods-info">
8 8 <view class="spec-goods-name ellipsis-2">{{data.goods_name}}</view>
9 9 <view class="flex ai_end xc-val-money">
... ...
pages/goods/goodsInfo/buy_integral_normal.wxml
... ... @@ -3,7 +3,7 @@
3 3 <view class="pding">
4 4 <icon bindtap="closeSpecModal_inte_normal" class="modal-close" color="black" size="22" type="cancel"></icon>
5 5 <view class="spec-goods">
6   - <image class="wh100 spec-img xc-distance-bottom" src="{{sele_g.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image>
  6 + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{sele_g.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image>
7 7 <view class="spec-goods-info">
8 8 <view class="spec-goods-name ellipsis-2">{{sele_g.goods_name}}</view>
9 9 <view class="flex ai_end xc-val-money">
... ...
pages/goods/goodsInfo/buy_pt.wxml
... ... @@ -5,7 +5,7 @@
5 5  
6 6 <!-- 商品名称 -->
7 7 <view class="spec-goods">
8   - <image class="wh100 spec-img xc-distance-bottom" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image>
  8 + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image>
9 9 <view class="spec-goods-info">
10 10 <view class="spec-goods-name ellipsis-1">{{sele_g.goods_name}}</view>
11 11 <view class="flex ai_end xc-val-money {{sele_g[card_field]}}" >
... ...
pages/goods/goodsInfo/goodsInfo.js
... ... @@ -4519,12 +4519,44 @@ Page({
4519 4519 if (quan_list) {
4520 4520 for (var ind in quan_list) {
4521 4521 var ep = quan_list[ind];
4522   - var start = ut.formatTime(ep.use_start_time, "yyyy-MM-dd");
4523   - var end = ut.formatTime(ep.use_end_time, "yyyy-MM-dd");
4524   - start = start.replace("00:00:00", "");
4525   - end = end.replace("00:00:00", "");
  4522 + var start = "";
  4523 + var end = "";
  4524 + if(ep.endtype == 1){
  4525 + if(ep.starttype == 1) {
  4526 + start = ut.formatTime(ut.gettimestamp()+3600*24*ep.startdays,"yyyy-MM-dd");
  4527 + }else{
  4528 + start = ut.formatTime(ut.gettimestamp(),"yyyy-MM-dd");
  4529 + }
  4530 + if(ep.days > 0) {
  4531 + end = ut.formatTime(ut.gettimestamp()+3600*24*ep.startdays+3600*24*ep.days,"yyyy-MM-dd");
  4532 + }else{
  4533 + end = "不限";
  4534 + }
  4535 + }else {
  4536 + if(ep.starttype == 1 ){
  4537 + start = ut.formatTime(ut.gettimestamp()+3600*24*ep.startdays,"yyyy-MM-dd");
  4538 + }else{
  4539 + if(ep.starttype == 0 && ep.use_start_time >0) {
  4540 + start = ut.formatTime(ep.use_start_time ,"yyyy-MM-dd");
  4541 + }else{
  4542 + start = "不限"
  4543 + }
  4544 + }
  4545 +
  4546 + if(ep.use_end_time > 0 ) {
  4547 + end = ut.formatTime(ep.use_end_time ,"yyyy-MM-dd");
  4548 + }else{
  4549 + end = "不限"
  4550 + }
  4551 + }
4526 4552 quan_list[ind].start = start;
4527 4553 quan_list[ind].end = end;
  4554 + // var start = ut.formatTime(ep.use_start_time, "yyyy-MM-dd");
  4555 + // var end = ut.formatTime(ep.use_end_time, "yyyy-MM-dd");
  4556 + // start = start.replace("00:00:00", "");
  4557 + // end = end.replace("00:00:00", "");
  4558 + // quan_list[ind].start = start;
  4559 + // quan_list[ind].end = end;
4528 4560 }
4529 4561 }
4530 4562  
... ...
pages/goods/goodsInfo/goodsInfo.wxml
... ... @@ -294,7 +294,7 @@
294 294 <view class="co-red" wx:if="{{prom_type==0 || prom_type==3}}">
295 295  
296 296 <view class="market-price flex" style="align-items: baseline;">
297   - <block wx:if="{{card_field && data[card_field]>0}}">
  297 + <block wx:if="{{card_field && data[card_field]>0 && is_no_plus}}">
298 298 <view class="flex ai-center grade-card-frame">
299 299 <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image>
300 300 <view class="fs24 white view card-name ellipsis-1">{{card_name}}</view>
... ... @@ -1469,7 +1469,7 @@
1469 1469 <view class="top-frame">
1470 1470 <view class="xc-coupon-frame ">
1471 1471 <!-- -单张的券- -->
1472   - <view class="rel" wx:for="{{quan_list}}" wx:key="{{index}}">
  1472 + <view class="rel" wx:for="{{quan_list}}" wx:key="id">
1473 1473 <view class="coupon flex">
1474 1474 <view class="circle xc-circular-one"></view>
1475 1475 <view class="xc-coupon-left ">
... ...
pages/index/index/index.js
... ... @@ -88,9 +88,6 @@ Page({
88 88 },
89 89  
90 90 onLoad: async function (tt) {
91   - if(!getApp().is_Single_page()){
92   - return false;
93   - }
94 91 var th = this;
95 92 var first_leader = tt.first_leader;
96 93 if (!first_leader && tt.scene) {
... ...
pages/store/index.wxss
1   -/* .box{
  1 +.box{
2 2 padding: 10px;
3 3 border-bottom: 10px solid #f5f5f5;
4 4 color: #000000;
... ... @@ -44,7 +44,7 @@ position: relative;
44 44 .sear_inp{width: 490rpx; background-color:#eaeaea; height: 80rpx; border-radius:5rpx; margin: 25rpx;}
45 45 .sear_inp input{width: 400rpx;}
46 46 .select{height: 80rpx; width: 220rpx;background-color:#eaeaea; margin:25rpx; font-size: 28rpx; line-height: 80rpx;text-align: center }
47   -.sear_btn{ width: 50rpx; height: 100%; display: flex; align-items: center;} */
  47 +.sear_btn{ width: 50rpx; height: 100%; display: flex; align-items: center;}
48 48  
49 49 .border-bottom {
50 50 border-bottom: 2rpx solid #e0e0e0;
... ...
pages/template/index.js
... ... @@ -15,9 +15,6 @@ Page({
15 15 },
16 16  
17 17 onLoad: function(e) {
18   - if(!getApp().is_Single_page()){
19   - return false;
20   - }
21 18 var th = this;
22 19 this.data.temp_id=e.scene;
23 20 if(!this.data.temp_id)
... ...
pages/user/assistance/assistance.js
... ... @@ -39,9 +39,6 @@ Page({
39 39 * 生命周期函数--监听页面加载
40 40 */
41 41 onLoad: function(options) {
42   - if(!getApp().is_Single_page()){
43   - return false;
44   - }
45 42 var th = this;
46 43 var nav_b = th.selectComponent("#nav_b"); //组件的id
47 44 nav_b.set_name("助力", "/pages/user/assistance/assistance");
... ... @@ -56,8 +53,10 @@ Page({
56 53 //--先判断会员状态--
57 54 var user_info = getApp().globalData.userInfo;
58 55 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
59   - getApp().goto('/pages/togoin/togoin');
60   - return false;
  56 + if(getApp().is_Single_page()){
  57 + getApp().goto('/pages/togoin/togoin');
  58 + return false;
  59 + }
61 60 }
62 61  
63 62 var th = this;
... ...
pages/user/index/index.js
... ... @@ -25,6 +25,7 @@ Page({
25 25 txmon: 0,
26 26 byquan: 0,
27 27 yuer: 0,
  28 + is_no_plus:1,
28 29 currentPage: 1,
29 30 recommend_list: [],
30 31 tc_hide: true,
... ... @@ -134,7 +135,21 @@ Page({
134 135 }
135 136 })
136 137  
137   -
  138 + //调用接口判断商家plus有没有过期
  139 + rq.promiseGet("/store/storemoduleendtime/page?store_id=" + os.stoid + "&type=3", {}).then(res => {
  140 + if (res.data.code == 0) {
  141 + var arr = res.data.data.pageData;
  142 + if (arr.length > 0) {
  143 + var item = arr[0];
  144 + if (item.is_sy == 0) {
  145 + var now = Date.parse(new Date()); now = now / 1000;
  146 + if (item.end_time < now) {
  147 + th.setData({ is_no_plus: 0 })
  148 + }
  149 + }
  150 + }
  151 + }
  152 + })
138 153 var th=this;
139 154  
140 155 // 判断是否开启美业
... ...
pages/user/index/index.wxml
... ... @@ -69,7 +69,7 @@
69 69 </image>
70 70  
71 71 </view>
72   - <view class="xc-add-member-frame flex-level rel addplus" wx:if="{{is_dengji==2 && show_buy_plus}}">
  72 + <view class="xc-add-member-frame flex-level rel addplus" wx:if="{{is_dengji==2 && show_buy_plus && is_no_plus}}">
73 73 <view class="xc-add-member flex-center-around ">
74 74 <view class="flex jc-center ai-center">
75 75 <image class="xc-icon" src="{{iurl}}/miniapp/images/user/user_vip.png"></image>
... ...
pages/user/userinfo/userinfo.js
... ... @@ -49,6 +49,7 @@ Page({
49 49 fir_pick_index: 0,
50 50 sec_pick_index: 0,
51 51 is_gps: 1,
  52 + is_no_plus:1,
52 53 lon: 0,
53 54 only_pk: 0,
54 55 open_ind_store: 0, //哪里打开的门店列表的控制属性
... ... @@ -608,6 +609,7 @@ Page({
608 609 },
609 610 //------初始化加载----------
610 611 onLoad: function(t) {
  612 + let th= this;
611 613 var user = getApp().globalData.userInfo;
612 614 if (user.card_field != '' && user.card_field != null && user.card_field != undefined && user.card_expiredate) {
613 615 var now = ut.gettimestamp();
... ... @@ -618,6 +620,21 @@ Page({
618 620 this.puls_user();
619 621 }
620 622 }
  623 + //调用接口判断商家plus有没有过期
  624 + getApp().request.promiseGet("/store/storemoduleendtime/page?store_id=" + r.stoid + "&type=3", {}).then(res => {
  625 + if (res.data.code == 0) {
  626 + var arr = res.data.data.pageData;
  627 + if (arr.length > 0) {
  628 + var item = arr[0];
  629 + if (item.is_sy == 0) {
  630 + var now = Date.parse(new Date()); now = now / 1000;
  631 + if (item.end_time < now) {
  632 + th.setData({ is_no_plus: 0 })
  633 + }
  634 + }
  635 + }
  636 + }
  637 + })
621 638 this.initial_user();
622 639  
623 640 // 获取用户昵称
... ...
pages/user/userinfo/userinfo.wxml
... ... @@ -11,17 +11,15 @@
11 11  
12 12 <view class="flex-center vipmax">
13 13 <view>
14   -
15 14 <view>
16 15 <view class="ellipsis-2 Nickname" style="font-size: 31rpx">
17 16 <view style="float:left;">{{user.nickname}}</view>
18 17 <button bindtap="getUserProfile" style="margin-left:10rpx;float:left;width: 200rpx;height:50rpx;font-size:20rpx;" class="flex-center fs30 confirmtext"> 点击更新头像昵称 </button>
19 18 </view>
20   -
21 19 </view>
22 20  
23 21 <view class="flex fs22 vip">
24   - <block wx:if="{{isBool&&gradename}}">
  22 + <block wx:if="{{isBool && gradename}}">
25 23 <navigator url="/pages/user/userqy/userqy">
26 24 <view class="flex-center AncrownMax">
27 25 <image class="Ancrown" src="{{iurl}}/miniapp/images/userqy/user_userqy_huang.png"></image>
... ... @@ -29,7 +27,7 @@
29 27 </view>
30 28 </navigator>
31 29 </block>
32   - <block wx:if="{{pulscardname && rank_switch > 0 }}">
  30 + <block wx:if="{{pulscardname && rank_switch > 0 && is_no_plus}}">
33 31 <navigator url="/pages/user/plus/plus">
34 32 <view class="flex-center plusMax">
35 33 <image class="fuls" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image>
... ...