Commit 3952011f6b477abb25a382622564e2f93b7ceb66
Merge refs/remotes/origin/dev into refs/heads/dev
Showing
12 changed files
with
2445 additions
and
202 deletions
app.json
| @@ -168,6 +168,7 @@ | @@ -168,6 +168,7 @@ | ||
| 168 | "pages/goods/goodsList/goodsList", | 168 | "pages/goods/goodsList/goodsList", | 
| 169 | "pages/payForAnother/payForAnother", | 169 | "pages/payForAnother/payForAnother", | 
| 170 | "pages/luckyGo/luckyGo_cart/luckyGo_cart", | 170 | "pages/luckyGo/luckyGo_cart/luckyGo_cart", | 
| 171 | + "pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct", | ||
| 171 | "pages/luckyGo/luckyGo_list/luckyGo_list", | 172 | "pages/luckyGo/luckyGo_list/luckyGo_list", | 
| 172 | "pages/luckyGo/luckyGo_order/luckyGo_order", | 173 | "pages/luckyGo/luckyGo_order/luckyGo_order", | 
| 173 | "pages/luckyGo/luckyGo_details/luckyGo_details", | 174 | "pages/luckyGo/luckyGo_details/luckyGo_details", | 
packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart.js
| @@ -139,10 +139,7 @@ Page({ | @@ -139,10 +139,7 @@ Page({ | ||
| 139 | success: function (s) { | 139 | success: function (s) { | 
| 140 | } | 140 | } | 
| 141 | }); | 141 | }); | 
| 142 | - | ||
| 143 | - // console.log('t=======================>', t); | ||
| 144 | - | ||
| 145 | - | 142 | + | 
| 146 | 143 | ||
| 147 | }, | 144 | }, | 
| 148 | onUnload: function () { | 145 | onUnload: function () { | 
| @@ -808,13 +805,12 @@ Page({ | @@ -808,13 +805,12 @@ Page({ | ||
| 808 | } | 805 | } | 
| 809 | } | 806 | } | 
| 810 | 807 | ||
| 811 | - | 808 | + | 
| 812 | gd.prom_type=gg.prom_type; | 809 | gd.prom_type=gg.prom_type; | 
| 813 | gd.prom_id=gg.prom_id; | 810 | gd.prom_id=gg.prom_id; | 
| 814 | - | 811 | + | 
| 815 | switch (gd.prom_type) { | 812 | switch (gd.prom_type) { | 
| 816 | case 0: | 813 | case 0: | 
| 817 | - case 2: | ||
| 818 | case 3: | 814 | case 3: | 
| 819 | case 4: | 815 | case 4: | 
| 820 | case 5: | 816 | case 5: | 
| @@ -987,6 +983,7 @@ Page({ | @@ -987,6 +983,7 @@ Page({ | ||
| 987 | //t.data.data.shop_price = tt.data.data.prom_price; | 983 | //t.data.data.shop_price = tt.data.data.prom_price; | 
| 988 | t.data.data.shop_price = tt.data.data.prom_user_price; | 984 | t.data.data.shop_price = tt.data.data.prom_user_price; | 
| 989 | th.data.ckeck_quan_price=0; | 985 | th.data.ckeck_quan_price=0; | 
| 986 | + gd.is_xz_yh=1; | ||
| 990 | } else { | 987 | } else { | 
| 991 | t.data.data.prom_id = 0; | 988 | t.data.data.prom_id = 0; | 
| 992 | t.data.data.prom_type = 0; | 989 | t.data.data.prom_type = 0; | 
| @@ -1013,6 +1010,45 @@ Page({ | @@ -1013,6 +1010,45 @@ Page({ | ||
| 1013 | }); | 1010 | }); | 
| 1014 | 1011 | ||
| 1015 | break; | 1012 | break; | 
| 1013 | + | ||
| 1014 | + case 2: //--- 团购 --- | ||
| 1015 | + var quanlist = null; | ||
| 1016 | + getApp().request.get("/api/weshop/goods/groupBuy/getActInfo/" +os.stoid + "/" +gd.goods_id+"/"+ gd.prom_id, { | ||
| 1017 | + success: async function (tt) { | ||
| 1018 | + if (tt.data.code == 0) { | ||
| 1019 | + //t.data.data.shop_price = tt.data.data.prom_price; | ||
| 1020 | + t.data.data.shop_price = tt.data.data.price; | ||
| 1021 | + } else { | ||
| 1022 | + t.data.data.prom_id = 0; | ||
| 1023 | + t.data.data.prom_type = 0; | ||
| 1024 | + } | ||
| 1025 | + | ||
| 1026 | + if(tt.data.data.isQuan){ | ||
| 1027 | + th.data.ckeck_quan_price = t.data.data.shop_price * gg.goods_num; | ||
| 1028 | + th.data.check_quan_price_list = t.data.data.shop_price * gg.goods_num + ""; | ||
| 1029 | + th.data.check_quan_ware_list = t.data.data.erpwareid + ""; | ||
| 1030 | + }else{ | ||
| 1031 | + gd.is_xz_yh=1; | ||
| 1032 | + } | ||
| 1033 | + | ||
| 1034 | + th.setData({ | ||
| 1035 | + bn_goods: gd, | ||
| 1036 | + bn_pickname: gg.pick_name, | ||
| 1037 | + bn_exp_type: et, | ||
| 1038 | + index: m_wind, | ||
| 1039 | + bn_pick: gg.pick_id, | ||
| 1040 | + bn_t_exp_t: distr_t, | ||
| 1041 | + bn_exp_type: et | ||
| 1042 | + }); | ||
| 1043 | + | ||
| 1044 | + //-- 计算价格 -- | ||
| 1045 | + th.calculatePrice2(); | ||
| 1046 | + //获取优惠券,如果有券的钱,就调用 | ||
| 1047 | + if(th.data.ckeck_quan_price>0) th.get_buy_now_quan(); | ||
| 1048 | + } | ||
| 1049 | + }); | ||
| 1050 | + | ||
| 1051 | + break; | ||
| 1016 | } | 1052 | } | 
| 1017 | }, | 1053 | }, | 
| 1018 | }); | 1054 | }); | 
| @@ -1389,7 +1425,7 @@ Page({ | @@ -1389,7 +1425,7 @@ Page({ | ||
| 1389 | } | 1425 | } | 
| 1390 | 1426 | ||
| 1391 | //--如果是物流,且选择了地址,就要开始显示包邮券,且包邮券也已经优惠了优惠活动的金额-- | 1427 | //--如果是物流,且选择了地址,就要开始显示包邮券,且包邮券也已经优惠了优惠活动的金额-- | 
| 1392 | - if (cart_item.exp_type == 0 && th.data.user_addr != null) { | 1428 | + if (cart_item.exp_type == 0 && th.data.user_addr != null && !cart_item.is_xz_yh) { | 
| 1393 | //看是不是有调用过包邮券 | 1429 | //看是不是有调用过包邮券 | 
| 1394 | if (!th.data.isget_by_quan[pickid]) { | 1430 | if (!th.data.isget_by_quan[pickid]) { | 
| 1395 | //--判断要不要显示包邮券,调用接口,因为有for循环--- | 1431 | //--判断要不要显示包邮券,调用接口,因为有for循环--- | 
| @@ -1397,7 +1433,8 @@ Page({ | @@ -1397,7 +1433,8 @@ Page({ | ||
| 1397 | data: { | 1433 | data: { | 
| 1398 | store_id: os.stoid, | 1434 | store_id: os.stoid, | 
| 1399 | isuse: 0, | 1435 | isuse: 0, | 
| 1400 | - condition: q_conditin, | 1436 | + //condition: q_conditin, | 
| 1437 | + condition:cart_item.ckeck_quan_price, | ||
| 1401 | user_id: getApp().globalData.user_id, | 1438 | user_id: getApp().globalData.user_id, | 
| 1402 | pageSize: 2000 | 1439 | pageSize: 2000 | 
| 1403 | } | 1440 | } | 
| @@ -1422,10 +1459,10 @@ Page({ | @@ -1422,10 +1459,10 @@ Page({ | ||
| 1422 | } | 1459 | } | 
| 1423 | if (arr) { | 1460 | if (arr) { | 
| 1424 | th.data.get_by_quan_list_cart[pickid] = arr; | 1461 | th.data.get_by_quan_list_cart[pickid] = arr; | 
| 1425 | - //th.setData({get_by_quan_list_cart:th.data.get_by_quan_list_cart}); | ||
| 1426 | - if (th.data.is_b_now) { | ||
| 1427 | - th.setData({get_by_quan_list: arr}); | ||
| 1428 | - } | 1462 | + th.setData({get_by_quan_list_cart:th.data.get_by_quan_list_cart}); | 
| 1463 | + //if (th.data.is_b_now) { | ||
| 1464 | + // th.setData({get_by_quan_list: arr}); | ||
| 1465 | + //} | ||
| 1429 | } | 1466 | } | 
| 1430 | th.data.isget_by_quan[pickid] = 1; | 1467 | th.data.isget_by_quan[pickid] = 1; | 
| 1431 | } | 1468 | } | 
| @@ -2030,29 +2067,9 @@ Page({ | @@ -2030,29 +2067,9 @@ Page({ | ||
| 2030 | }); | 2067 | }); | 
| 2031 | }); | 2068 | }); | 
| 2032 | }, | 2069 | }, | 
| 2033 | - | ||
| 2034 | - | ||
| 2035 | - submitConfirm(e) { | ||
| 2036 | - var th = this; | ||
| 2037 | - wx.showModal({ | ||
| 2038 | - title: '温馨提示', | ||
| 2039 | - content: this.data.param.alert, | ||
| 2040 | - success (res) { | ||
| 2041 | - if (res.confirm) { | ||
| 2042 | - console.log('用户点击确定'); | ||
| 2043 | - th.submitForm(e); | ||
| 2044 | - } else if (res.cancel) { | ||
| 2045 | - console.log('用户点击取消') | ||
| 2046 | - } | ||
| 2047 | - } | ||
| 2048 | - }) | ||
| 2049 | - }, | ||
| 2050 | 2070 | ||
| 2051 | //--------------------提交订单----------------------- | 2071 | //--------------------提交订单----------------------- | 
| 2052 | - async submitForm(t) { | ||
| 2053 | - | ||
| 2054 | - | ||
| 2055 | - | 2072 | + async submitForm(t){ | 
| 2056 | var sub_value = t; | 2073 | var sub_value = t; | 
| 2057 | 2074 | ||
| 2058 | if (this.data.is_summit_ing == 1) return false; //--提交中退出-- | 2075 | if (this.data.is_summit_ing == 1) return false; //--提交中退出-- | 
| @@ -2178,10 +2195,8 @@ Page({ | @@ -2178,10 +2195,8 @@ Page({ | ||
| 2178 | 'goods_price': th.data.bn_goods.shop_price, | 2195 | 'goods_price': th.data.bn_goods.shop_price, | 
| 2179 | 'member_goods_price': th.data.bn_goods.shop_price, | 2196 | 'member_goods_price': th.data.bn_goods.shop_price, | 
| 2180 | 'store_id': oo.stoid, | 2197 | 'store_id': oo.stoid, | 
| 2181 | - //'prom_type': th.data.bn_goods.prom_type, //促销活动类型 | ||
| 2182 | - 'prom_type': 9, //促销活动类型 | ||
| 2183 | - 'prom_id': th.data.param.group_id, //促销活动id | ||
| 2184 | - // 'prom_id': 118, | 2198 | + 'prom_type': th.data.bn_goods.prom_type, //促销活动类型 | 
| 2199 | + 'prom_id': th.data.bn_goods.prom_id, //促销活动id | ||
| 2185 | }; | 2200 | }; | 
| 2186 | 2201 | ||
| 2187 | //-- 把导购的信息填入-- | 2202 | //-- 把导购的信息填入-- | 
| @@ -2445,6 +2460,7 @@ Page({ | @@ -2445,6 +2460,7 @@ Page({ | ||
| 2445 | //--判断活动的类型-- | 2460 | //--判断活动的类型-- | 
| 2446 | switch (g_item.prom_type) { | 2461 | switch (g_item.prom_type) { | 
| 2447 | case 1: | 2462 | case 1: | 
| 2463 | + case 2: | ||
| 2448 | goods.prom_type = g_item.prom_type; | 2464 | goods.prom_type = g_item.prom_type; | 
| 2449 | goods.prom_id = g_item.prom_id; | 2465 | goods.prom_id = g_item.prom_id; | 
| 2450 | break; | 2466 | break; | 
| @@ -2583,42 +2599,19 @@ Page({ | @@ -2583,42 +2599,19 @@ Page({ | ||
| 2583 | var dd = { | 2599 | var dd = { | 
| 2584 | parent_sn: data.data, | 2600 | parent_sn: data.data, | 
| 2585 | store_id: oo.stoid, | 2601 | store_id: oo.stoid, | 
| 2586 | - type: 1, | 2602 | + type: 2, | 
| 2587 | }; | 2603 | }; | 
| 2588 | - wx.showLoading({ | ||
| 2589 | - title: '支付中', | ||
| 2590 | - mask: true, | ||
| 2591 | - }); | ||
| 2592 | a.post("/api/weshop/order/pay/createOrder", { | 2604 | a.post("/api/weshop/order/pay/createOrder", { | 
| 2593 | data: dd, | 2605 | data: dd, | 
| 2594 | - isShowLoading: false, | ||
| 2595 | success: function (t) { | 2606 | success: function (t) { | 
| 2596 | //console.log(t); | 2607 | //console.log(t); | 
| 2597 | - wx.hideLoading(); | ||
| 2598 | if (t.data.code == 0) { | 2608 | if (t.data.code == 0) { | 
| 2599 | //app.my_warnning("支付成功",1,th); | 2609 | //app.my_warnning("支付成功",1,th); | 
| 2600 | //setTimeout(function () { | 2610 | //setTimeout(function () { | 
| 2601 | th.setData({isclose: 0}); | 2611 | th.setData({isclose: 0}); | 
| 2602 | - | ||
| 2603 | - wx.showToast({ | ||
| 2604 | - title: '支付成功', | ||
| 2605 | - icon: 'success', | ||
| 2606 | - duration: 2000, | ||
| 2607 | - success: function() { | ||
| 2608 | - // 幸运购 | ||
| 2609 | - setTimeout(function() { | ||
| 2610 | - wx.redirectTo({ | ||
| 2611 | - url: "/packageC/pages/luckyGo/luckyGo_details/luckyGo_details?type=1&ordersn=" + data.data + "&group_id=" + th.data.param.group_id + "&goods_id=" + th.data.param.goods_id + "&goods_name=" + th.data.bn_goods.goods_name, | ||
| 2612 | - }); | ||
| 2613 | - }, 0); | ||
| 2614 | - | ||
| 2615 | - }, | ||
| 2616 | - }) | ||
| 2617 | - | ||
| 2618 | - // wx.redirectTo({ | ||
| 2619 | - // url: "/pages/payment/pay_success/pay_success?type=1&order_sn=" + data.data, | ||
| 2620 | - // }) | ||
| 2621 | - | 2612 | + wx.redirectTo({ | 
| 2613 | + url: "/pages/payment/pay_success/pay_success?type=2&order_sn=" + data.data, | ||
| 2614 | + }) | ||
| 2622 | //}, 1000) | 2615 | //}, 1000) | 
| 2623 | } | 2616 | } | 
| 2624 | }, | 2617 | }, | 
| @@ -3441,6 +3434,19 @@ Page({ | @@ -3441,6 +3434,19 @@ Page({ | ||
| 3441 | if (gd.prom_type == 1 || gd.is_gift || gd.prom_type == 7) { | 3434 | if (gd.prom_type == 1 || gd.is_gift || gd.prom_type == 7) { | 
| 3442 | continue; | 3435 | continue; | 
| 3443 | } | 3436 | } | 
| 3437 | + | ||
| 3438 | + //--如果是团购,要判断有没有限制使用优惠券 | ||
| 3439 | + if(gd.prom_type == 2){ | ||
| 3440 | + var prom1=null; | ||
| 3441 | + await getApp().request.promiseGet("/api/weshop/goods/groupBuy/getActInfo/" + os.stoid + "/" + gd.goods_id + "/" + gd.prom_id, { | ||
| 3442 | + }).then(res => { | ||
| 3443 | + if (res.data.code == 0) prom1 = res.data.data; | ||
| 3444 | + }) | ||
| 3445 | + if(!prom1.isQuan){ | ||
| 3446 | + continue; | ||
| 3447 | + } | ||
| 3448 | + } | ||
| 3449 | + | ||
| 3444 | //如果有限制使用优惠券,就要返回 | 3450 | //如果有限制使用优惠券,就要返回 | 
| 3445 | if (gd.prom_type == 3) { | 3451 | if (gd.prom_type == 3) { | 
| 3446 | if (th.data.prom_goods_map[pickup_id][gd.prom_id].is_xz_yh) continue; | 3452 | if (th.data.prom_goods_map[pickup_id][gd.prom_id].is_xz_yh) continue; | 
| @@ -3479,6 +3485,7 @@ Page({ | @@ -3479,6 +3485,7 @@ Page({ | ||
| 3479 | arr[ind].ckeck_quan_price = ckeck_quan_price - cut_price; | 3485 | arr[ind].ckeck_quan_price = ckeck_quan_price - cut_price; | 
| 3480 | arr[ind].check_quan_ware_list = check_quan_ware_list; | 3486 | arr[ind].check_quan_ware_list = check_quan_ware_list; | 
| 3481 | arr[ind].check_quan_price_list = check_quan_price_list; | 3487 | arr[ind].check_quan_price_list = check_quan_price_list; | 
| 3488 | + arr[ind].is_xz_yh = is_xz_yh; | ||
| 3482 | 3489 | ||
| 3483 | //是否关闭使用优惠券 | 3490 | //是否关闭使用优惠券 | 
| 3484 | if (th.data.is_close_quan != 1 && !is_xz_yh) { | 3491 | if (th.data.is_close_quan != 1 && !is_xz_yh) { | 
| @@ -3488,7 +3495,7 @@ Page({ | @@ -3488,7 +3495,7 @@ Page({ | ||
| 3488 | data: { | 3495 | data: { | 
| 3489 | storeId: oo.stoid, | 3496 | storeId: oo.stoid, | 
| 3490 | userId: app.globalData.user_id, | 3497 | userId: app.globalData.user_id, | 
| 3491 | - BuySum: ckeck_quan_price, | 3498 | + BuySum: arr[ind].ckeck_quan_price, | 
| 3492 | WareIds: check_quan_ware_list, | 3499 | WareIds: check_quan_ware_list, | 
| 3493 | pageSize: 100 | 3500 | pageSize: 100 | 
| 3494 | } | 3501 | } | 
| @@ -3843,7 +3850,6 @@ Page({ | @@ -3843,7 +3850,6 @@ Page({ | ||
| 3843 | } | 3850 | } | 
| 3844 | }, | 3851 | }, | 
| 3845 | 3852 | ||
| 3846 | - | ||
| 3847 | //取消使用线下取价 | 3853 | //取消使用线下取价 | 
| 3848 | cancle_offline: function () { | 3854 | cancle_offline: function () { | 
| 3849 | //判断是不是立即购买 | 3855 | //判断是不是立即购买 | 
packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart.json
packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart.wxml
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | <wxs src="filter.wxs" module="util"></wxs> | 2 | <wxs src="filter.wxs" module="util"></wxs> | 
| 3 | <wxs module="filters" src="../../../../utils/filter.wxs"></wxs> | 3 | <wxs module="filters" src="../../../../utils/filter.wxs"></wxs> | 
| 4 | 4 | ||
| 5 | -<form bindsubmit="submitConfirm"> | 5 | +<form bindsubmit="submitForm"> | 
| 6 | <view class="container"> | 6 | <view class="container"> | 
| 7 | 7 | ||
| 8 | <!-- 立即购买的时候 --> | 8 | <!-- 立即购买的时候 --> | 
| @@ -268,6 +268,7 @@ | @@ -268,6 +268,7 @@ | ||
| 268 | </view> | 268 | </view> | 
| 269 | 269 | ||
| 270 | <!-- ---商品名称规格---- --> | 270 | <!-- ---商品名称规格---- --> | 
| 271 | + <!-- 幸运购 --> | ||
| 271 | <view class="order-num flex-space-between"> | 272 | <view class="order-num flex-space-between"> | 
| 272 | <view class="co-red">¥<text class="fs36">{{filters.toFix(bn_goods.shop_price,2)}}</text></view> | 273 | <view class="co-red">¥<text class="fs36">{{filters.toFix(bn_goods.shop_price,2)}}</text></view> | 
| 273 | <view class="goods-num">x{{bn_goods.buynum}}</view> | 274 | <view class="goods-num">x{{bn_goods.buynum}}</view> | 
| @@ -426,6 +427,7 @@ | @@ -426,6 +427,7 @@ | ||
| 426 | <view>优惠活动</view> | 427 | <view>优惠活动</view> | 
| 427 | <view class="co-red">- ¥ {{filters.toFix(formData.cut_price,2)}}元</view> | 428 | <view class="co-red">- ¥ {{filters.toFix(formData.cut_price,2)}}元</view> | 
| 428 | </view> | 429 | </view> | 
| 430 | + | ||
| 429 | <!-- 组合购优惠金额 --> | 431 | <!-- 组合购优惠金额 --> | 
| 430 | <view class="item" wx:if="{{formData.zh_cut_price>0 || formData.zh_cut_price<0}}"> | 432 | <view class="item" wx:if="{{formData.zh_cut_price>0 || formData.zh_cut_price<0}}"> | 
| 431 | <view>组合购优惠</view> | 433 | <view>组合购优惠</view> | 
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
0 → 100644
| 1 | +var t = getApp(),app=t, a = t.request, e = require("../../../../utils/common.js"), | ||
| 2 | + s = require("../../../../utils/util.js"), o = require("../../../../utils/md5.js"), to = getApp(); | ||
| 3 | +var oo=t.globalData.setting,os=oo; | ||
| 4 | +var regeneratorRuntime = require('../../../../utils/runtime.js'); | ||
| 5 | +var util_pay = require("../../../../utils/pay.js"); | ||
| 6 | + | ||
| 7 | +Page({ | ||
| 8 | + data: { | ||
| 9 | + prom_type: 9, | ||
| 10 | + | ||
| 11 | + url: t.globalData.setting.url, | ||
| 12 | + resourceUrl: t.globalData.setting.resourceUrl, | ||
| 13 | + imgUrl: t.globalData.setting.imghost, | ||
| 14 | + goods: null, | ||
| 15 | + order: null, | ||
| 16 | + orderPrices: null, | ||
| 17 | + coupons: null, | ||
| 18 | + coupon: null, | ||
| 19 | + invoiceToggle: !0, | ||
| 20 | + payWithUserMoney: !0, | ||
| 21 | + payWithPoints: !0, | ||
| 22 | + maxWord: 0, | ||
| 23 | + enterAddressPage: !1, | ||
| 24 | + firstEnter: !0, | ||
| 25 | + //页面获取的参数 | ||
| 26 | + param:null, | ||
| 27 | + postdata:null, | ||
| 28 | + //提交订单的格式 | ||
| 29 | + formData: { | ||
| 30 | + order_amount:0,//支付金额 | ||
| 31 | + total_amount:0,//总价 | ||
| 32 | + all_price:0,//商品卖的总价 | ||
| 33 | + pay_points: 0,//使用积分 | ||
| 34 | + user_money: 0,//使用余额 | ||
| 35 | + couponCode: "",//使用优惠券(多单就用逗号隔开) | ||
| 36 | + shipping_price:0,//物流费用 | ||
| 37 | + }, | ||
| 38 | + | ||
| 39 | + /*----------------立即购买---------------------*/ | ||
| 40 | + is_b_now:0, //0是购物车结算 1立即购买 | ||
| 41 | + bn_goods:null, //立即购买时候的调用商品 | ||
| 42 | + bn_use_money:0,//是否使用余额 | ||
| 43 | + bn_exp_type:1, //0是物流 1自提 | ||
| 44 | + bn_pick:0, //选择的门店 | ||
| 45 | + bn_pickname: "", //选择的门店名称 | ||
| 46 | + bn_t_exp_t:0, //判断商品和门店一起决定的物流自提的方式0 都可以 1自提 2物流 | ||
| 47 | + /*------------------------*/ | ||
| 48 | + user_addr:null,//物流 | ||
| 49 | + userinfo:null, //获取会员 | ||
| 50 | + /*----------物流选择--------*/ | ||
| 51 | + wu_arr:null, | ||
| 52 | + index:0, | ||
| 53 | + | ||
| 54 | + //判断页面是返回回来的还是 首次进入的 | ||
| 55 | + isclose:1, | ||
| 56 | + kt_type:0, //开团类型 | ||
| 57 | + is_pt_tz:0,//是否开团团长 | ||
| 58 | + qh:'', //期号 | ||
| 59 | + pt_listno:'',//期号 | ||
| 60 | + is_normal:0, | ||
| 61 | + is_express:0,//选择物流的控制器 | ||
| 62 | + yuer:0, | ||
| 63 | + | ||
| 64 | + rank_switch:0, //是不是开同等级卡 | ||
| 65 | + show_card:null, //显示的等级卡 | ||
| 66 | + card_name:'', //显示的卡的名称 | ||
| 67 | + card_cut_price:null,//减价多少钱 | ||
| 68 | + }, | ||
| 69 | + onLoad: function(t) { | ||
| 70 | + // console.log("onLoad_pt_cart"); | ||
| 71 | + var th = this; this.setData({ | ||
| 72 | + is_b_now: t.is_bnow == undefined ? 0 : t.is_bnow, | ||
| 73 | + param: t, | ||
| 74 | + }); | ||
| 75 | + var appD=getApp().get_b_now(); | ||
| 76 | + | ||
| 77 | + th.data.postdata=appD; | ||
| 78 | + //如果期号有值 | ||
| 79 | + if(appD.qh){ | ||
| 80 | + th.data.qh=appD.qh; | ||
| 81 | + th.data.pt_listno=appD.qh; | ||
| 82 | + } | ||
| 83 | + //th.data.kt_type=appD.kt_type; | ||
| 84 | + th.setData({kt_type:appD.kt_type}); | ||
| 85 | + if(appD.is_pt_tz) th.data.is_pt_tz=appD.is_pt_tz; | ||
| 86 | + // th.data.param=t; | ||
| 87 | + //先获取物流,再获取用户信息,再展示页面 | ||
| 88 | + //th.get_wuliu(th.get_info(th.show_page)); | ||
| 89 | + }, | ||
| 90 | + onUnload: function () { this.setData({ isclose: 1 })}, | ||
| 91 | + | ||
| 92 | + //------获取会员信息-----先获取用户信息,在进行下一步--- | ||
| 93 | + get_info:function(func){ | ||
| 94 | + var user_id = t.globalData.user_id; | ||
| 95 | + to.auth.get_u(func); | ||
| 96 | + }, | ||
| 97 | + | ||
| 98 | + //-------------------获取物流--------------- | ||
| 99 | + get_wuliu(func) { | ||
| 100 | + var th = this; | ||
| 101 | + console.log("getwuliu4545"); | ||
| 102 | + to.getwuliu(function (e) { | ||
| 103 | + if (th.data.is_default_logistics) { | ||
| 104 | + //如果第一个不是开启默认,说明要让用户自己选 | ||
| 105 | + if (!e[0].is_default) { | ||
| 106 | + th.setData({ is_default_logistics: 0 }); | ||
| 107 | + } | ||
| 108 | + } | ||
| 109 | + th.setData({ wu_arr: e }) | ||
| 110 | + typeof func == "function" && func(); | ||
| 111 | + }) | ||
| 112 | + }, | ||
| 113 | + | ||
| 114 | + //------获取会员收货地址----- | ||
| 115 | + getuser_addr:function(func){ | ||
| 116 | + if (to.globalData.baddr!=null){ | ||
| 117 | + var user_addr = to.globalData.baddr; | ||
| 118 | + to.globalData.baddr=null; | ||
| 119 | + func(user_addr); | ||
| 120 | + }else{ | ||
| 121 | + a.get("/api/weshop/useraddress/page", { | ||
| 122 | + data: { user_id: to.globalData.user_id, store_id: oo.stoid, pageSize: 600 }, | ||
| 123 | + success: function (su) { | ||
| 124 | + | ||
| 125 | + var user_addr = su.data.data.pageData; | ||
| 126 | + var item = null; | ||
| 127 | + var def_item=null; | ||
| 128 | + for (var i = 0; i < user_addr.length; i++) { | ||
| 129 | + if (user_addr[i]['is_default'] == 1) { def_item = user_addr[i]; } | ||
| 130 | + if (user_addr[i]['is_pickup'] == 1) { item = user_addr[i]; } | ||
| 131 | + } | ||
| 132 | + if (item == null) item = def_item; | ||
| 133 | + if (item == null) item = user_addr[0]; | ||
| 134 | + if (item == undefined) item = null; | ||
| 135 | + func(item); | ||
| 136 | + } | ||
| 137 | + }); | ||
| 138 | + } | ||
| 139 | + }, | ||
| 140 | + //----------------展示页面,是再获取用户信息之后-------------- | ||
| 141 | + show_page:function(){ | ||
| 142 | + var th=this; | ||
| 143 | + //th.setData({ userinfo: to.globalData.userInfo}); 会员信息要时时获取 | ||
| 144 | + var user=getApp().globalData.userInfo; | ||
| 145 | + getApp().request.get("/api/weshop/users/get/" + oo.stoid + "/" + user.user_id, { | ||
| 146 | + data:{r:Math.random()}, | ||
| 147 | + success: function (e) { | ||
| 148 | + | ||
| 149 | + getApp().globalData.userInfo = e.data.data; | ||
| 150 | + th.setData({userinfo:e.data.data}); | ||
| 151 | + //获取立即购买的商品信息 | ||
| 152 | + th.get_buy_goods(); | ||
| 153 | + | ||
| 154 | + //获取提现金额 | ||
| 155 | + getApp().request.get("/api/weshop/withdrawals/summoney", { | ||
| 156 | + data: { user_id: to.globalData.user_id, store_id: oo.stoid, status: 0 }, | ||
| 157 | + success: function (su) { | ||
| 158 | + if (su.data.code == 0) { | ||
| 159 | + var yuer = parseFloat(th.data.userinfo.user_money - | ||
| 160 | + (th.data.userinfo.frozen_money>0?th.data.userinfo.frozen_money:0) - su.data.data.summoney).toFixed(2); | ||
| 161 | + if(yuer<0) yuer=0; | ||
| 162 | + th.setData({ txmon: su.data.data.summoney, yuer: yuer }); | ||
| 163 | + } | ||
| 164 | + } | ||
| 165 | + }); | ||
| 166 | + } | ||
| 167 | + }); | ||
| 168 | + }, | ||
| 169 | + | ||
| 170 | + //-----获取立即购买的商品信息---- | ||
| 171 | + get_buy_goods: function (){ | ||
| 172 | + var th=this,a=getApp().request; | ||
| 173 | + var gg = th.data.postdata; | ||
| 174 | + //调用商品 | ||
| 175 | + a.get("/api/weshop/goods/get/" + oo.stoid+"/"+gg.goods_id, { | ||
| 176 | + success: function (t) { | ||
| 177 | + var gd = t.data.data; | ||
| 178 | + if(!gd) return false; | ||
| 179 | + | ||
| 180 | + t.data.data.original_img = oo.imghost + t.data.data.original_img; | ||
| 181 | + t.data.data['buynum'] = gg.goods_num; | ||
| 182 | + console.log(t.data.data); | ||
| 183 | + var distr_t = 0, et = 0 | ||
| 184 | + if (t.data.data.distr_type == 0) { | ||
| 185 | + distr_t = gg.pick_dis; | ||
| 186 | + } else { | ||
| 187 | + distr_t = t.data.data.distr_type; | ||
| 188 | + } | ||
| 189 | + switch (distr_t) { | ||
| 190 | + case 0: | ||
| 191 | + et = 1; | ||
| 192 | + //-- 系统后台有设置要默认的 -- | ||
| 193 | + if(th.data.json_d.pickupway && th.data.json_d.pickupway==1) et=0; | ||
| 194 | + break; | ||
| 195 | + case 1: | ||
| 196 | + et = 1; | ||
| 197 | + break; | ||
| 198 | + case 2: | ||
| 199 | + et = 0; | ||
| 200 | + break; | ||
| 201 | + } | ||
| 202 | + | ||
| 203 | + t.data.data.shop_price=gg.goods_price; | ||
| 204 | + //--如果是普通购买的时候-- | ||
| 205 | + if(gg.is_normal==1){ | ||
| 206 | + t.data.data.prom_id = 0; | ||
| 207 | + t.data.data.prom_type = 0; | ||
| 208 | + t.data.data.is_normal=0; | ||
| 209 | + | ||
| 210 | + var gd=t.data.data; | ||
| 211 | + //-- 用商品的手店价来显示 -- | ||
| 212 | + gg.goods_price=gd.shop_price; | ||
| 213 | + //---是不是购买等级卡成功的返回---等级卡显示的判断--- | ||
| 214 | + var is_card_back=getApp().globalData.is_card_back; | ||
| 215 | + if(is_card_back){ | ||
| 216 | + gg.goods_price=gd[th.data.card_name]; | ||
| 217 | + t.data.data.shop_price=gg.goods_price; | ||
| 218 | + getApp().globalData.is_card_back=0; | ||
| 219 | + th.setData({card_cut_price:0}); | ||
| 220 | + }else{ | ||
| 221 | + //--- 商品不能是搭配购,商家等级卡开通的情况下, 会员不是等级会员的情况, 商品有设置等级卡价格,同时等级卡价格小于商品的价格 | ||
| 222 | + if(th.data.card_name && gd[th.data.card_name]>0 && gg.goods_price>gd[th.data.card_name] && !th.data.userinfo.card_field){ | ||
| 223 | + var cut_p= gg.goods_price-gd[th.data.card_name]; | ||
| 224 | + th.setData({card_cut_price:cut_p}); | ||
| 225 | + } | ||
| 226 | + } | ||
| 227 | + | ||
| 228 | + if(th.data.bn_goods){ | ||
| 229 | + et=th.data.bn_exp_type; | ||
| 230 | + } | ||
| 231 | + | ||
| 232 | + | ||
| 233 | + th.setData({ | ||
| 234 | + bn_goods: t.data.data, bn_pickname: gg.pick_name, | ||
| 235 | + bn_pick: gg.pick_id, bn_t_exp_t: distr_t, is_normal:1,bn_exp_type:et | ||
| 236 | + }); | ||
| 237 | + | ||
| 238 | + | ||
| 239 | + | ||
| 240 | + th.calculatePrice2(); | ||
| 241 | + }else{ | ||
| 242 | + | ||
| 243 | + //--阶梯团很特殊,不能用总表来拿价格-- | ||
| 244 | + getApp().request.get("/api/weshop/teamlist/get/"+oo.stoid+"/"+gd.prom_id, { | ||
| 245 | + success: function (tt) { | ||
| 246 | + | ||
| 247 | + if (tt.data.code == 0) { | ||
| 248 | + var pt_data=tt.data.data; | ||
| 249 | + var now=s.gettimestamp(); | ||
| 250 | + | ||
| 251 | + if(pt_data.is_end==1){ | ||
| 252 | + t.data.data.prom_id = 0; | ||
| 253 | + t.data.data.prom_type = 0; | ||
| 254 | + // t.data.data.is_normal=1; | ||
| 255 | + }else if(now>pt_data.end_time){ | ||
| 256 | + t.data.data.prom_id = 0; | ||
| 257 | + t.data.data.prom_type = 0; | ||
| 258 | + // t.data.data.is_normal=1; | ||
| 259 | + }else{ | ||
| 260 | + t.data.data.shop_price = tt.data.data.price; //活动价格 | ||
| 261 | + t.data.data.is_normal=0; | ||
| 262 | + if(pt_data.kttype==3){ | ||
| 263 | + t.data.data.shop_price = tt.data.data.yf_price; //用定金来购买 | ||
| 264 | + } | ||
| 265 | + } | ||
| 266 | + } else { | ||
| 267 | + t.data.data.prom_id = 0; | ||
| 268 | + t.data.data.prom_type = 0; | ||
| 269 | + // t.data.data.is_normal=1; | ||
| 270 | + } | ||
| 271 | + | ||
| 272 | + if(th.data.bn_goods){ | ||
| 273 | + et=th.data.bn_exp_type; | ||
| 274 | + } | ||
| 275 | + | ||
| 276 | + th.setData({ | ||
| 277 | + bn_goods: t.data.data, bn_pickname: gg.pick_name, | ||
| 278 | + bn_pick: gg.pick_id, bn_t_exp_t: distr_t,bn_exp_type:et | ||
| 279 | + }); | ||
| 280 | + | ||
| 281 | + | ||
| 282 | + //计算价格 | ||
| 283 | + th.calculatePrice2(); | ||
| 284 | + } | ||
| 285 | + }); | ||
| 286 | + } | ||
| 287 | + } | ||
| 288 | + }); | ||
| 289 | + }, | ||
| 290 | + | ||
| 291 | + //----------子页返回父页触发---------- | ||
| 292 | + onShow: function () { | ||
| 293 | + var th = this; | ||
| 294 | + | ||
| 295 | + if (th.data.isclose == 0) { | ||
| 296 | + wx.navigateTo({ | ||
| 297 | + url: "/pages/index/index/index" | ||
| 298 | + }) | ||
| 299 | + } else { | ||
| 300 | + this.getuser_addr(function (ie) { | ||
| 301 | + //更换地址回来要重新调用计算价钱的接口 | ||
| 302 | + th.setData({ user_addr: ie }); | ||
| 303 | + if (!th.data.user_addr || th.data.user_addr.address_id != ie.address_id) { | ||
| 304 | + th.setData({ add_back: 1 }); | ||
| 305 | + if (this.data.bn_goods) th.calculatePrice2(); | ||
| 306 | + } | ||
| 307 | + }) | ||
| 308 | + //--更新默认地址--,看一下是不是跳到地址页面 | ||
| 309 | + if (!getApp().globalData.is_cart_old) { | ||
| 310 | + this.update_code(); | ||
| 311 | + } else { | ||
| 312 | + getApp().globalData.is_cart_old = 0; | ||
| 313 | + } | ||
| 314 | + } | ||
| 315 | + | ||
| 316 | + | ||
| 317 | + //先获取是否有关闭使用优惠券 | ||
| 318 | + getApp().getConfig2(function (ee) { | ||
| 319 | + var json_d = JSON.parse(ee.switch_list); | ||
| 320 | + th.data.json_d = json_d; | ||
| 321 | + th.data.ispt_goods = json_d.ispt_goods; //是不是平摊到单品的控制参数赋值 | ||
| 322 | + var is_default_logistics = json_d.is_default_logistics; | ||
| 323 | + | ||
| 324 | + th.setData({ is_close_quan: json_d.is_close_quan, sales_rules: ee.sales_rules, rank_switch: json_d.rank_switch, is_default_logistics: is_default_logistics }); | ||
| 325 | + | ||
| 326 | + var rank_switch = json_d.rank_switch; | ||
| 327 | + var max_price = -1; | ||
| 328 | + var show_card = null; | ||
| 329 | + var name = ""; | ||
| 330 | + //如果有开等级卡的时候, | ||
| 331 | + //因为都是调接口,要返回在计算 | ||
| 332 | + if (rank_switch == 2) { | ||
| 333 | + //-- 获取所有的等级卡, -- | ||
| 334 | + getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?storeId=" + os.stoid, | ||
| 335 | + {}).then(res => { | ||
| 336 | + if (res.data.code == 0) { | ||
| 337 | + var plusCard = res.data.data; | ||
| 338 | + //-- 循环判断,拿到最贵的那张卡 -- | ||
| 339 | + for (var ih in plusCard) { | ||
| 340 | + if (plusCard[ih].IsStopBuy == true) { continue; } | ||
| 341 | + if (max_price < 0) { | ||
| 342 | + max_price = plusCard[ih].CardFee; | ||
| 343 | + name = 'card' + plusCard[ih]['CorrPrice']; | ||
| 344 | + show_card = plusCard[ih]; | ||
| 345 | + } else { | ||
| 346 | + if (max_price < plusCard[ih].CardFee) { | ||
| 347 | + max_price = plusCard[ih].CardFee; | ||
| 348 | + name = 'card' + plusCard[ih]['CorrPrice']; | ||
| 349 | + show_card = plusCard[ih]; | ||
| 350 | + } | ||
| 351 | + } | ||
| 352 | + } | ||
| 353 | + | ||
| 354 | + if (show_card) { | ||
| 355 | + name = name.toLowerCase(); | ||
| 356 | + th.setData({ card_name: name, show_card: show_card }) | ||
| 357 | + } | ||
| 358 | + } | ||
| 359 | + //-----先获取物流,再获取用户信息,再展示页面----- | ||
| 360 | + th.get_wuliu(th.get_info(th.show_page)); | ||
| 361 | + }) | ||
| 362 | + } else { | ||
| 363 | + //-----先获取物流,再获取用户信息,再展示页面----- | ||
| 364 | + th.get_wuliu(th.get_info(th.show_page)); | ||
| 365 | + } | ||
| 366 | + }, 1) | ||
| 367 | + | ||
| 368 | + }, | ||
| 369 | + //---------------检查是否有收货地址------------------- | ||
| 370 | + checkAddressList: function() { | ||
| 371 | + var t = this; | ||
| 372 | + return !(!this.data.order || null == this.data.order.userAddress) || (wx.showModal({ | ||
| 373 | + title: "请先填写或选择收货地址~", | ||
| 374 | + success: function(a) { | ||
| 375 | + a.confirm ? t.enterAddressPage() : wx.navigateBack(); | ||
| 376 | + }, | ||
| 377 | + fail: function() { | ||
| 378 | + wx.navigateBack(); | ||
| 379 | + } | ||
| 380 | + }), !1); | ||
| 381 | + }, | ||
| 382 | + showInvoice: function() { | ||
| 383 | + this.setData({ | ||
| 384 | + invoiceToggle: !this.data.invoiceToggle | ||
| 385 | + }); | ||
| 386 | + }, | ||
| 387 | + keyUpChangePay1: function(t) { | ||
| 388 | + this.setData({ | ||
| 389 | + payWithUserMoney: !(t.detail.value.length > 0) | ||
| 390 | + }); | ||
| 391 | + }, | ||
| 392 | + keyUpChangePay2: function(t) { | ||
| 393 | + this.setData({ | ||
| 394 | + payWithPoints: !(t.detail.value.length > 0) | ||
| 395 | + }); | ||
| 396 | + }, | ||
| 397 | + keyUpChangeNum: function(t) { | ||
| 398 | + this.setData({ | ||
| 399 | + maxWord: t.detail.value.length | ||
| 400 | + }); | ||
| 401 | + }, | ||
| 402 | + //---------计算立即购买---------- | ||
| 403 | + calculatePrice2: function () { | ||
| 404 | + console.log('calculatePrice2'); | ||
| 405 | + var th = this, good = this.data.bn_goods; | ||
| 406 | + //-----------计算商品总价-------------- | ||
| 407 | + var allpice = good.shop_price * good.buynum; | ||
| 408 | + allpice=parseFloat(allpice).toFixed(2); | ||
| 409 | + var txt = "formData.all_price"; | ||
| 410 | + th.setData({ [txt]: allpice, }); | ||
| 411 | + console.log(th.data.formData); | ||
| 412 | + | ||
| 413 | + to.getConfig2(function (ee) { | ||
| 414 | + to.getwuliuprice(function (rs) { | ||
| 415 | + console.log('calculatePrice2222'); | ||
| 416 | + console.log(rs); | ||
| 417 | + var o_shipping_price = 0, goods_weight = -1, goods_piece = -1; | ||
| 418 | + //-----------当地址不为空,且是物流时,计算物流费用,同时阶梯团不计算拼团价格---------- | ||
| 419 | + if (th.data.user_addr != null && th.data.bn_exp_type == 0 && good.is_free_shipping == 0 && (th.data.kt_type!=3 || th.data.bn_goods.is_normal==1) ){ | ||
| 420 | + switch (good['exp_sum_type']) { | ||
| 421 | + case 1: | ||
| 422 | + //统一运费 | ||
| 423 | + o_shipping_price += good['uniform_exp_sum']; break; | ||
| 424 | + case 2: | ||
| 425 | + if (goods_weight < 0) goods_weight = 0; | ||
| 426 | + //累积商品重量 每种商品的重量 * 数量 | ||
| 427 | + goods_weight += good['weight'] * good['buynum'];break; | ||
| 428 | + case 3: | ||
| 429 | + if (goods_piece < 0) goods_piece = 0; | ||
| 430 | + //累积商品数量 | ||
| 431 | + goods_piece += good['buynum']; break; | ||
| 432 | + } | ||
| 433 | + | ||
| 434 | + console.log(o_shipping_price + ":" + goods_weight + ":" + goods_piece); | ||
| 435 | + console.log(th.data.wu_arr); | ||
| 436 | + var code = th.data.wu_arr[th.data.index].code; | ||
| 437 | + var freight_free = ee.freight_free; //全场满多少包邮 | ||
| 438 | + var shipping_price= | ||
| 439 | + th.calculatewuliu(code, o_shipping_price, goods_weight, | ||
| 440 | + goods_piece, th.data.user_addr, freight_free, allpice, rs); | ||
| 441 | + | ||
| 442 | + shipping_price = parseFloat(shipping_price).toFixed(2); | ||
| 443 | + var wl_txt = "formData.shipping_price"; | ||
| 444 | + th.setData({ [wl_txt]: shipping_price, }) | ||
| 445 | + | ||
| 446 | + }else{ | ||
| 447 | + var wl_txt = "formData.shipping_price"; | ||
| 448 | + th.setData({ [wl_txt]: 0, }) | ||
| 449 | + } | ||
| 450 | + //-----------------总价----------------- | ||
| 451 | + // 幸运购 | ||
| 452 | + // var total_m = parseFloat(allpice) + parseFloat( th.data.formData.shipping_price); | ||
| 453 | + var total_m = parseFloat(th.data.param.goods_price) + parseFloat( th.data.formData.shipping_price); | ||
| 454 | + total_m = parseFloat(total_m).toFixed(2); | ||
| 455 | + | ||
| 456 | + var atxt= "formData.total_amount"; | ||
| 457 | + th.setData({ [atxt]: total_m, }) | ||
| 458 | + var order_m = total_m; | ||
| 459 | + | ||
| 460 | + var txt = "formData.user_money"; | ||
| 461 | + var txt2 = "formData.order_amount"; | ||
| 462 | + //--------------如果使用余额--------------------- | ||
| 463 | + if (th.data.bn_use_money == 1 && th.data.yuer>0) { | ||
| 464 | + if ( parseFloat(th.data.yuer) > total_m) { | ||
| 465 | + th.setData({ [txt]: total_m, [txt2]:0 }) | ||
| 466 | + }else{ | ||
| 467 | + order_m = parseFloat(order_m) - parseFloat(th.data.yuer); | ||
| 468 | + order_m = order_m.toFixed(2); | ||
| 469 | + th.setData({ [txt]: th.data.yuer, [txt2]: order_m }) | ||
| 470 | + } | ||
| 471 | + }else{ | ||
| 472 | + th.setData({ [txt]: 0, [txt2]: order_m }) | ||
| 473 | + } | ||
| 474 | + | ||
| 475 | + }); | ||
| 476 | + }); | ||
| 477 | + }, | ||
| 478 | + | ||
| 479 | + | ||
| 480 | + submitConfirm(e) { | ||
| 481 | + var th = this; | ||
| 482 | + wx.showModal({ | ||
| 483 | + title: '温馨提示', | ||
| 484 | + content: this.data.param.alert, | ||
| 485 | + success (res) { | ||
| 486 | + if (res.confirm) { | ||
| 487 | + console.log('用户点击确定'); | ||
| 488 | + th.submitForm(e); | ||
| 489 | + } else if (res.cancel) { | ||
| 490 | + console.log('用户点击取消') | ||
| 491 | + } | ||
| 492 | + } | ||
| 493 | + }) | ||
| 494 | + }, | ||
| 495 | + | ||
| 496 | + | ||
| 497 | + //--------------------提交订单----------------------- | ||
| 498 | + submitForm: async function(t){ | ||
| 499 | + if(this.data.is_summit_ing==1) return false; //--提交中退出-- | ||
| 500 | + this.data.is_summit_ing=1; | ||
| 501 | + | ||
| 502 | + var th=this,pdata=new Array(); | ||
| 503 | + var ff=true; | ||
| 504 | + //------------立即购买------------- | ||
| 505 | + console.log("buy_new"); | ||
| 506 | + | ||
| 507 | + //如果不是阶梯团,或者是普通购买,商家选择了物流,以及地址为空的时候 | ||
| 508 | + if(th.data.bn_exp_type == 0 && th.data.user_addr==null && (th.data.kt_type!=3 || th.data.bn_goods.is_normal==1) ){ | ||
| 509 | + ff = false; | ||
| 510 | + getApp().my_warnning("请选择收货地址",0,this); | ||
| 511 | + this.data.is_summit_ing = 0; | ||
| 512 | + } | ||
| 513 | + if (!ff) return false; | ||
| 514 | + var addr = th.data.user_addr; | ||
| 515 | + if (th.data.bn_exp_type == 1) addr=null; | ||
| 516 | + | ||
| 517 | + console.log(th.data.formData); | ||
| 518 | + console.log(th.data.wu_arr); | ||
| 519 | + console.log(th.data.bn_exp_type); | ||
| 520 | + | ||
| 521 | + if(th.data.bn_exp_type==0 && (th.data.kt_type!=3 || th.data.bn_goods.is_normal==1)) { | ||
| 522 | + if (th.data.wu_arr == null || th.data.wu_arr.length <= 0) { | ||
| 523 | + getApp().my_warnning("读取物流失败",0,this); | ||
| 524 | + this.data.is_summit_ing = 0; | ||
| 525 | + return false; | ||
| 526 | + } | ||
| 527 | + } | ||
| 528 | + | ||
| 529 | + //阶梯团强制带1,自提~~~ | ||
| 530 | + if(th.data.kt_type==3 ){ | ||
| 531 | + th.data.bn_exp_type=1; | ||
| 532 | + } | ||
| 533 | + | ||
| 534 | + var item={ | ||
| 535 | + 'user_id': to.globalData.user_id, | ||
| 536 | + 'consignee': addr == null ? "" : addr.consignee, | ||
| 537 | + 'province': addr == null ? 0 : addr.province, | ||
| 538 | + 'city': addr == null ? 0 : addr.city, | ||
| 539 | + 'district': addr == null ? 0 : addr.district, | ||
| 540 | + 'twon': addr == null ? 0 : addr.twon, | ||
| 541 | + 'address': addr == null ? "": addr.address, | ||
| 542 | + 'more_address': addr == null ? "" : addr.more_address, | ||
| 543 | + 'mobile': addr == null ? th.data.userinfo.mobile:addr.mobile, | ||
| 544 | + 'email':'', | ||
| 545 | + 'invoice_title':'', | ||
| 546 | + 'goods_price': th.data.param.goods_price, //商品总价 | ||
| 547 | + //'goods_price': th.data.formData.all_price, //商品总价 | ||
| 548 | + 'shipping_price': th.data.formData.shipping_price, //物流金额 | ||
| 549 | + 'user_money': th.data.formData.user_money, //使用余额 | ||
| 550 | + 'total_amount': th.data.formData.total_amount, //订单总价 | ||
| 551 | + 'order_amount': th.data.formData.order_amount, //应付 | ||
| 552 | + 'user_note': t.detail.value.user_note, //用户备注 | ||
| 553 | + 'store_id':oo.stoid, //商家 | ||
| 554 | + 'pickup_id': th.data.bn_pick, //门店 | ||
| 555 | + 'exp_type': th.data.bn_exp_type, //配送方式 | ||
| 556 | + 'is_normal':th.data.bn_goods.is_normal, //是否是普通购买 | ||
| 557 | + 'pt_prom_id':th.data.bn_goods.prom_id, //拼单ID | ||
| 558 | + 'is_pt_tz':th.data.is_pt_tz, //开团类型 | ||
| 559 | + 'order_goods':new Array(), | ||
| 560 | + }; | ||
| 561 | + | ||
| 562 | + //如果不是阶梯团,或者是普通购买, | ||
| 563 | + if((th.data.kt_type!=3 || th.data.bn_goods.is_normal==1)){ | ||
| 564 | + item['shipping_code']= th.data.bn_exp_type == 1 ? 0 : th.data.wu_arr[th.data.index].code; | ||
| 565 | + item['shipping_name']= th.data.bn_exp_type == 1 ? '' : th.data.wu_arr[th.data.index].name; | ||
| 566 | + } | ||
| 567 | + | ||
| 568 | + if(!th.data.bn_goods.is_normal){ | ||
| 569 | + item.is_zsorder=th.data.kt_type+1; //开团类型 | ||
| 570 | + } | ||
| 571 | + //老会员成为分销下线需要的参数 | ||
| 572 | + if(getApp().globalData.first_leader && !getApp().globalData.userInfo.first_leader){ | ||
| 573 | + //判断一下分享人是不是分享商 | ||
| 574 | + await app.request.promiseGet("/api/weshop/users/get/" + os.stoid+"/"+getApp().globalData.first_leader,{}).then(res=>{ | ||
| 575 | + if(res.data.code==0){ | ||
| 576 | + var user= res.data.data; | ||
| 577 | + if(user.is_distribut==1){ | ||
| 578 | + item.first_leader=parseInt(getApp().globalData.first_leader); | ||
| 579 | + } | ||
| 580 | + } | ||
| 581 | + }) | ||
| 582 | + } | ||
| 583 | + | ||
| 584 | + if(th.data.qh!='') | ||
| 585 | + { | ||
| 586 | + item.team_qh=th.data.qh; | ||
| 587 | + item.pt_listno=th.data.qh; | ||
| 588 | + } | ||
| 589 | + | ||
| 590 | + var gg = to.get_b_now(); | ||
| 591 | + var goods={ | ||
| 592 | + 'goods_id': gg.goods_id, | ||
| 593 | + 'goods_name': gg.goods_name, | ||
| 594 | + 'goods_sn': gg.goods_sn, | ||
| 595 | + 'goods_num': gg.goods_num, | ||
| 596 | + 'market_price': th.data.bn_goods.market_price, | ||
| 597 | + 'goods_price': th.data.param.goods_price, | ||
| 598 | + // 'goods_price': th.data.bn_goods.shop_price, | ||
| 599 | + 'member_goods_price': th.data.bn_goods.shop_price, | ||
| 600 | + 'store_id': oo.stoid, | ||
| 601 | + // 'prom_type':th.data.bn_goods.prom_type, //促销活动类型 | ||
| 602 | + // 'prom_id': th.data.bn_goods.prom_id, //促销活动id | ||
| 603 | + | ||
| 604 | + 'prom_type': 9, //促销活动类型 | ||
| 605 | + 'prom_id': th.data.param.group_id, //促销活动id | ||
| 606 | + }; | ||
| 607 | + | ||
| 608 | + //--导购分享过来的id-- | ||
| 609 | + if(gg.guide_id){ | ||
| 610 | + goods.guide_id=gg.guide_id; | ||
| 611 | + goods.guide_type=gg.guide_type; | ||
| 612 | + //调用接口判断是不是会员 | ||
| 613 | + await getApp().request.promiseGet("/api/weshop/shoppingGuide/getId/"+oo.stoid+"/"+gg.guide_id,{}).then(res=>{ | ||
| 614 | + if(res.data.code==0){ | ||
| 615 | + goods.guide_name=res.data.data.salesman; | ||
| 616 | + goods.guide_sn=res.data.data.salesman_no; | ||
| 617 | + } | ||
| 618 | + }) | ||
| 619 | + } | ||
| 620 | + | ||
| 621 | + //--商品的房间号-- | ||
| 622 | + if(gg.room_id && gg.room_id>0){ | ||
| 623 | + item.room_ids=gg.room_id; | ||
| 624 | + goods.room_id=gg.room_id; | ||
| 625 | + } | ||
| 626 | + | ||
| 627 | + if(th.data.bn_goods.is_normal){goods.is_pd_normal=0;} | ||
| 628 | + | ||
| 629 | + item.order_goods.push(goods); | ||
| 630 | + pdata.push(item); | ||
| 631 | + | ||
| 632 | + if (pdata.length==0) return; | ||
| 633 | + var str = JSON.stringify(pdata); | ||
| 634 | + console.log("支付数据"); | ||
| 635 | + console.log(str); | ||
| 636 | + //return false; | ||
| 637 | + wx.showLoading({title: "加载中"}); | ||
| 638 | + wx.request({ | ||
| 639 | + url: oo.url + '/api/weshop/order/createWxdOrder', | ||
| 640 | + data: str, | ||
| 641 | + method: 'POST', | ||
| 642 | + header: { | ||
| 643 | + 'content-type': 'application/json' | ||
| 644 | + },// 设置请求的 header | ||
| 645 | + success: function (res) { | ||
| 646 | + | ||
| 647 | + wx.hideLoading(); | ||
| 648 | + if (res.statusCode == 200) { | ||
| 649 | + var data=res.data; | ||
| 650 | + if(data.code==0){ | ||
| 651 | + console.log(th.data.is_b_now); | ||
| 652 | + //如果是购物车结算,还要删除购物车 | ||
| 653 | + if (th.data.is_b_now == 0) { | ||
| 654 | + console.log(th.data.cartlist_y); | ||
| 655 | + var list = th.data.cartlist_y; | ||
| 656 | + for (var i = 0; i < list.length; i++) { | ||
| 657 | + //删除购物车 | ||
| 658 | + getApp().request.delete("/api/weshop/cart/del/" + oo.stoid + "/" + list[i].id, {}); | ||
| 659 | + } | ||
| 660 | + } | ||
| 661 | + var order_amount = 0; | ||
| 662 | + pdata.forEach(function (em, ind) { | ||
| 663 | + order_amount += em.order_amount; | ||
| 664 | + }) | ||
| 665 | + //要进行判断,如果是用微信支付,就要跳转到支付界面 | ||
| 666 | + if (order_amount > 0) { | ||
| 667 | + th.setData({ isclose: 0 }); | ||
| 668 | + //void e.jumpToCart4({ | ||
| 669 | + // order_sn: data.data, | ||
| 670 | + // type:1, | ||
| 671 | + // }, 1); | ||
| 672 | + util_pay.pay(data.data, function() { | ||
| 673 | + setTimeout(function () { | ||
| 674 | + wx.reLaunch({ | ||
| 675 | + //url: "/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data, | ||
| 676 | + url: "/pages/team/team_success/team_success?ordersn=" + data.data, | ||
| 677 | + }) | ||
| 678 | + },1000) | ||
| 679 | + }, function () { | ||
| 680 | + //支付失败 | ||
| 681 | + setTimeout(function () { | ||
| 682 | + //wx.navigateBack({ delta: 1 }) | ||
| 683 | + wx.reLaunch({ | ||
| 684 | + url: "/pages/user/order_list/order_list", | ||
| 685 | + }) | ||
| 686 | + },1000) | ||
| 687 | + | ||
| 688 | + },oo.stoid,1); | ||
| 689 | + | ||
| 690 | + } else { | ||
| 691 | + var dd = { | ||
| 692 | + parent_sn: data.data, | ||
| 693 | + store_id: oo.stoid, | ||
| 694 | + type: 1, | ||
| 695 | + }; | ||
| 696 | + wx.showLoading({ | ||
| 697 | + title: '支付中', | ||
| 698 | + mask: true, | ||
| 699 | + }); | ||
| 700 | + //return false; | ||
| 701 | + getApp().request.post("/api/weshop/order/pay/createOrder", { | ||
| 702 | + data: dd, | ||
| 703 | + success: function (t) { | ||
| 704 | + // console.log(t); | ||
| 705 | + // app.my_warnning("支付成功",1,th); | ||
| 706 | + wx.hideLoading(); | ||
| 707 | + if (t.data.code == 0) { | ||
| 708 | + | ||
| 709 | + // setTimeout(function () { | ||
| 710 | + th.setData({ isclose: 0 }); | ||
| 711 | + | ||
| 712 | + wx.showToast({ | ||
| 713 | + title: '支付成功', | ||
| 714 | + icon: 'success', | ||
| 715 | + duration: 2000, | ||
| 716 | + success: function() { | ||
| 717 | + // 幸运购 | ||
| 718 | + setTimeout(function() { | ||
| 719 | + wx.redirectTo({ | ||
| 720 | + url: "/packageC/pages/luckyGo/luckyGo_details/luckyGo_details?type=1&ordersn=" + data.data + "&group_id=" + th.data.param.group_id + "&goods_id=" + th.data.param.goods_id + "&goods_name=" + th.data.bn_goods.goods_name, | ||
| 721 | + }); | ||
| 722 | + }, 0); | ||
| 723 | + | ||
| 724 | + }, | ||
| 725 | + }) | ||
| 726 | + | ||
| 727 | + | ||
| 728 | + // if(th.data.is_normal==1){ | ||
| 729 | + // /*-- | ||
| 730 | + // wx.navigateTo({ | ||
| 731 | + // url: "/pages/user/order_list/order_list", | ||
| 732 | + // })--*/ | ||
| 733 | + | ||
| 734 | + // // var url="/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data; | ||
| 735 | + // // wx.reLaunch({ | ||
| 736 | + // // url: url | ||
| 737 | + // // }) | ||
| 738 | + | ||
| 739 | + // }else{ | ||
| 740 | + // // wx.reLaunch({ | ||
| 741 | + // // url: "/pages/team/team_success/team_success?ordersn=" + data.data, | ||
| 742 | + // // }) | ||
| 743 | + // } | ||
| 744 | + | ||
| 745 | + | ||
| 746 | + // }, 1000) | ||
| 747 | + | ||
| 748 | + } else { | ||
| 749 | + wx.showToast({ | ||
| 750 | + title: t.data.msg, | ||
| 751 | + icon: 'none', | ||
| 752 | + duration: 2000, | ||
| 753 | + success: function() { | ||
| 754 | + | ||
| 755 | + | ||
| 756 | + }, | ||
| 757 | + }) | ||
| 758 | + }; | ||
| 759 | + | ||
| 760 | + | ||
| 761 | + } | ||
| 762 | + }); | ||
| 763 | + } | ||
| 764 | + } | ||
| 765 | + else{ | ||
| 766 | + th.data.is_summit_ing=0; //是否提交中 | ||
| 767 | + getApp().confirmBox(data.msg); | ||
| 768 | + } | ||
| 769 | + } else { | ||
| 770 | + th.data.is_summit_ing=0; //是否提交中 | ||
| 771 | + console.log("index.js wx.request CheckCallUser statusCode" + res.statusCode); | ||
| 772 | + } | ||
| 773 | + }, | ||
| 774 | + fail: function () { | ||
| 775 | + th.data.is_summit_ing=0; //是否提交中 | ||
| 776 | + wx.hideLoading(); | ||
| 777 | + console.log("index.js wx.request CheckCallUser fail"); | ||
| 778 | + }, | ||
| 779 | + complete: function () {} | ||
| 780 | + }) | ||
| 781 | + }, | ||
| 782 | + useCoupon: function() { | ||
| 783 | + if (this.data.order.couponNum <= 0) { | ||
| 784 | + //return t.showWarning("无可用优惠券"); | ||
| 785 | + getApp().my_warnning("无可用优惠券",0,this); | ||
| 786 | + return; | ||
| 787 | + } | ||
| 788 | + var a = { | ||
| 789 | + lid: this.data.coupon ? this.data.coupon.id : "0" | ||
| 790 | + }; | ||
| 791 | + wx.navigateTo({ | ||
| 792 | + url: "/pages/user/checkcoupon/checkcoupon?" + s.Obj2Str(a) | ||
| 793 | + }); | ||
| 794 | + }, | ||
| 795 | + enterAddressPage: function() { | ||
| 796 | + getApp().globalData.is_cart_old=1; | ||
| 797 | + this.data.enterAddressPage = !0, wx.navigateTo({ | ||
| 798 | + url: "/pages/user/address_list/address_list" | ||
| 799 | + }); | ||
| 800 | + }, | ||
| 801 | + | ||
| 802 | + //--------立即购买时,选择自提和物流----------- | ||
| 803 | + setexptype_w:function(t){ | ||
| 804 | + var th=this; | ||
| 805 | + var ty = t.currentTarget.dataset.t,txt = t.currentTarget.dataset.txt; | ||
| 806 | + th.setData({ [txt]: ty }); | ||
| 807 | + var iszt=1; | ||
| 808 | + if(ty==0){ | ||
| 809 | + th.setData({ is_all_zt: 0 }); | ||
| 810 | + }else{ | ||
| 811 | + for(var i=0;i<th.data.cartlist.length;i++){ | ||
| 812 | + var item = th.data.cartlist[i]; | ||
| 813 | + if (item.exp_type==0){ iszt=0;break;} | ||
| 814 | + } | ||
| 815 | + th.setData({ is_all_zt: iszt }); | ||
| 816 | + } | ||
| 817 | + //----计算此时购物车的价格---- | ||
| 818 | + th.calculatePrice(); | ||
| 819 | + }, | ||
| 820 | + | ||
| 821 | + //--------立即购买时,选择自提和物流---------- | ||
| 822 | + setexptype:function(t){ | ||
| 823 | + var th=this; | ||
| 824 | + var ty = t.currentTarget.dataset.t; | ||
| 825 | + th.setData({ bn_exp_type:ty}); | ||
| 826 | + //当物流为空的时候。 | ||
| 827 | + if (ty == 0 && th.data.wu_arr==null){ | ||
| 828 | + return th.get_wuliu(th.calculatePrice2()); | ||
| 829 | + } | ||
| 830 | + th.calculatePrice2() | ||
| 831 | + console.log('setexptype'); | ||
| 832 | + }, | ||
| 833 | + | ||
| 834 | + //--------立即购买时,使用余额-------- | ||
| 835 | + set_bn_useyuer:function(){ | ||
| 836 | + var th=this; | ||
| 837 | + th.setData({ bn_use_money: !th.data.bn_use_money}); | ||
| 838 | + th.calculatePrice2(); | ||
| 839 | + }, | ||
| 840 | + set_js_useyuer:function(){ | ||
| 841 | + var th = this; | ||
| 842 | + th.setData({ js_use_money: !th.data.js_use_money }); | ||
| 843 | + th.calculatePrice(); | ||
| 844 | + }, | ||
| 845 | + | ||
| 846 | + //-------------------计算物流--------------- | ||
| 847 | + calculatewuliu:function(code, o_shipping_price, goods_weight, | ||
| 848 | + goods_piece,user_addr, freight_free, o_price, rs){ | ||
| 849 | + var price =0,th=this; | ||
| 850 | + price +=parseFloat(o_shipping_price); | ||
| 851 | + //如果是包邮 | ||
| 852 | + if (freight_free > 0 && o_price > freight_free){ return 0;} | ||
| 853 | + if (user_addr==null) { return 0; } | ||
| 854 | + //计算物流的config item; | ||
| 855 | + var item=null; | ||
| 856 | + //先根据 镇 县 区找计算的config | ||
| 857 | + item = th.get_wuliu_config(user_addr.district,code,rs); | ||
| 858 | + if (item==null) item = th.get_wuliu_config(user_addr.city, code, rs); | ||
| 859 | + if (item==null) item = th.get_wuliu_config(user_addr.province, code, rs); | ||
| 860 | + if (item == null) item = th.get_wuliu_default(code,rs); | ||
| 861 | + if (item == null) return o_shipping_price; | ||
| 862 | + var fw_price = 0, fp_price=0; | ||
| 863 | + item=item.config; | ||
| 864 | + if (item == null) return o_shipping_price; | ||
| 865 | + //------按重量---------- | ||
| 866 | + if (goods_weight>0) { | ||
| 867 | + fw_price =parseFloat(item['money']); | ||
| 868 | + if (goods_weight > item['first_weight']){ | ||
| 869 | + var fw = goods_weight - item['first_weight']; | ||
| 870 | + var n = Math.ceil(fw/item['second_weight']) | ||
| 871 | + fw_price = fw_price + n * parseFloat(item['add_money']); | ||
| 872 | + } | ||
| 873 | + } | ||
| 874 | + //------按件数---------- | ||
| 875 | + if (goods_piece > 0) { | ||
| 876 | + fp_price = parseFloat(item['piecemoney']); | ||
| 877 | + if (goods_piece > item['first_piece']) { | ||
| 878 | + var fp = goods_piece - item['first_piece']; | ||
| 879 | + var m = Math.ceil(fp / item['second_piece']) | ||
| 880 | + fp_price = fp_price + m * parseFloat(item['add_piecemoney']); | ||
| 881 | + } | ||
| 882 | + } | ||
| 883 | + var rspice =parseFloat(price + fw_price + fp_price); | ||
| 884 | + return rspice; | ||
| 885 | + }, | ||
| 886 | + | ||
| 887 | + //------------循环获取config----------- | ||
| 888 | + get_wuliu_config:function(region_id,code,rs){ | ||
| 889 | + var item=null,rslist = rs.pageData; | ||
| 890 | + for (var i = 0; i < rslist.length;i++){ | ||
| 891 | + if (rslist[i].code == code && rslist[i].region_id == region_id) { item = rslist[i];} | ||
| 892 | + } | ||
| 893 | + return item; | ||
| 894 | + }, | ||
| 895 | + //-------循环获取config,code default------- | ||
| 896 | + get_wuliu_default: function (code, rs) { | ||
| 897 | + var item = null, rslist=rs.pageData; | ||
| 898 | + for (var i = 0; i < rslist.length; i++) { | ||
| 899 | + if (rslist[i].shipping_code == code && rslist[i].is_default == 1) { item = rslist[i]; } | ||
| 900 | + } | ||
| 901 | + return item; | ||
| 902 | + }, | ||
| 903 | + | ||
| 904 | + //----------立即购买,选择物流------------- | ||
| 905 | + bindPickerChange:function(e){ | ||
| 906 | + var ind = e.detail.value | ||
| 907 | + this.setData({ index: ind }); | ||
| 908 | + this.calculatePrice2(); | ||
| 909 | + }, | ||
| 910 | + | ||
| 911 | + //----------购物车结算,选择物流------------- | ||
| 912 | + bindPickerChange_w: function (e) { | ||
| 913 | + var ind=e.detail.value, txt = e.currentTarget.dataset.txt; | ||
| 914 | + this.setData({ [txt]: ind }); | ||
| 915 | + this.calculatePrice(); | ||
| 916 | + }, | ||
| 917 | + | ||
| 918 | + cart_set_err: function (e) { | ||
| 919 | + var txt = e.currentTarget.dataset.err; | ||
| 920 | + var ob = {}; | ||
| 921 | + ob[txt] = this.data.imgUrl + "/miniapp/images/default_g_img.gif"; | ||
| 922 | + this.setData(ob); | ||
| 923 | + }, | ||
| 924 | + | ||
| 925 | + //// 开启物流的弹窗 | ||
| 926 | + show_wu_arr:function(e){ | ||
| 927 | + this.setData({ open_express: 1}); | ||
| 928 | + }, | ||
| 929 | + | ||
| 930 | + //更新下默认,在onshow里面 | ||
| 931 | + update_code(){ | ||
| 932 | + var th=this,m_wind=0,def_exp_code=getApp().globalData.userInfo.def_exp_code; | ||
| 933 | + | ||
| 934 | + var uii=setInterval(function () { | ||
| 935 | + if(th.data.wu_arr){ | ||
| 936 | + clearInterval(uii); | ||
| 937 | + for (var k = 0; k < th.data.wu_arr.length; k++) { | ||
| 938 | + var item = th.data.wu_arr[k]; | ||
| 939 | + if (def_exp_code == item.code) { | ||
| 940 | + m_wind = k; | ||
| 941 | + } | ||
| 942 | + } | ||
| 943 | + //--如果是立即购买-- | ||
| 944 | + th.setData({ index: m_wind, is_express: m_wind}); | ||
| 945 | + } | ||
| 946 | + },500) | ||
| 947 | + }, | ||
| 948 | + | ||
| 949 | + // 关闭物流的弹窗 | ||
| 950 | + close_express:function(){ | ||
| 951 | + this.setData({ open_express:0 }); | ||
| 952 | + }, | ||
| 953 | + // 选择物流 | ||
| 954 | + click_express_name:function(e){ | ||
| 955 | + var express_name = e.currentTarget.dataset.name, shippingcode = e.currentTarget.dataset.shippingcode; | ||
| 956 | + var index=e.currentTarget.dataset.idxe; | ||
| 957 | + var ob={ is_express: index, is_shipping_code: shippingcode,index:index}; | ||
| 958 | + this.setData(ob); | ||
| 959 | + }, | ||
| 960 | + | ||
| 961 | + //点击确定物流 | ||
| 962 | + determine_expres:function(e){ | ||
| 963 | + this.setData({ open_express: 0}); | ||
| 964 | + this.calculatePrice2(); | ||
| 965 | + }, | ||
| 966 | + //设置默认物流 | ||
| 967 | + select_default_logistics: function () { | ||
| 968 | + var th=this; | ||
| 969 | + var is_shipping_code=this.data.is_shipping_code | ||
| 970 | + getApp().request.put("/api/weshop/users/update",{ | ||
| 971 | + data: { user_id: getApp().globalData.user_id, store_id: oo.stoid, def_exp_code: is_shipping_code}, | ||
| 972 | + success:function(rse){ | ||
| 973 | + if (rse.data.code==0){ | ||
| 974 | + getApp().globalData.userInfo.def_exp_code=is_shipping_code; | ||
| 975 | + th.setData({ open_express: 0 }); | ||
| 976 | + //----计算此时购物车的价格,这个页面没有calculatePrice(),2021.7.19---- | ||
| 977 | + //if(th.data.is_b_now==1) th.calculatePrice2(); | ||
| 978 | + //else th.calculatePrice(); | ||
| 979 | + th.calculatePrice2(); | ||
| 980 | + } | ||
| 981 | + } | ||
| 982 | + }) | ||
| 983 | + }, | ||
| 984 | + | ||
| 985 | + | ||
| 986 | + //跳转到购买卡 | ||
| 987 | + buycard:function(){ | ||
| 988 | + getApp().goto("/pages/user/plus/plus"); | ||
| 989 | + getApp().globalData.plus_buy_back=1; | ||
| 990 | + } | ||
| 991 | +}); | 
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.json
0 → 100644
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.wxml
0 → 100644
| 1 | +<wxs module="filters" src="../../../../utils/filter.wxs"></wxs> | ||
| 2 | +<form bindsubmit="submitConfirm"> | ||
| 3 | + <view class="container"> | ||
| 4 | + | ||
| 5 | + <view class="tab-container" wx:if="{{kt_type!=3 || is_normal==1}}"> | ||
| 6 | + <view class="tab-wrapper"> | ||
| 7 | + <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}" | ||
| 8 | + data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >门店自提</view> | ||
| 9 | + | ||
| 10 | + <view hidden="{{bn_t_exp_t==1}}" bindtap='setexptype' data-t='0' class="tab {{bn_exp_type== 0 ? 'active':''}}" | ||
| 11 | + data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >快递邮寄</view> | ||
| 12 | + | ||
| 13 | + </view> | ||
| 14 | + </view> | ||
| 15 | + | ||
| 16 | + | ||
| 17 | + <!--要进行判断地址是否显示----> | ||
| 18 | + <view bindtap="enterAddressPage" class="user-mes mgt20" hidden='{{bn_exp_type==1 || kt_type==3}}'> | ||
| 19 | + <!---默认地址显示------> | ||
| 20 | + <block wx:if="{{user_addr!=null}}"> | ||
| 21 | + <view class="user-contact">收货人:{{user_addr.consignee}}{{' '}}{{user_addr.mobile}}</view> | ||
| 22 | + <view class="location"> | ||
| 23 | + <view class="address">{{user_addr.more_address}}{{' '}}{{user_addr.address}}</view> | ||
| 24 | + <view class="pos-icon"> | ||
| 25 | + <image class="wh100 bdr14" src="{{imgUrl}}/miniapp/images/goodscategory/new_position.png"></image> | ||
| 26 | + </view> | ||
| 27 | + </view> | ||
| 28 | + <view class="update-logistics"> | ||
| 29 | + <image class="arrow-rigth" src="{{imgUrl}}/miniapp/images/icon-arrowdown.png"></image> | ||
| 30 | + </view> | ||
| 31 | + </block> | ||
| 32 | + <!---先增地址------> | ||
| 33 | + <block wx:else> | ||
| 34 | + <view class="add_new"> | ||
| 35 | + <image class="addr_jia" src="{{imgUrl}}/miniapp/images/jia.png"></image>添加地址 | ||
| 36 | + </view> | ||
| 37 | + </block> | ||
| 38 | + <!-- <view class="border-img"><image class="wh100 bdr14" src="{{imgUrl}}/miniapp/images/tt.png"></image></view> --> | ||
| 39 | + </view> | ||
| 40 | + | ||
| 41 | + | ||
| 42 | + <!------立即购买--------> | ||
| 43 | + <block> | ||
| 44 | + <!-- <view class="xc-border main-top"></view> --> | ||
| 45 | + <view class="use-item bfff bdr_t-14 mgt20"> | ||
| 46 | + <image class="dp" src='{{imgUrl}}/miniapp/images/goodscategory/new_store.png'> </image> <view>{{bn_pickname}}</view></view> | ||
| 47 | + <view class="order-detail"> | ||
| 48 | + <view class="goods-img"> | ||
| 49 | + <image class="wh100 bdr14" src="{{bn_goods.original_img}}" | ||
| 50 | + binderror='cart_set_err' data-err="bn_goods.original_img"></image> | ||
| 51 | + </view> | ||
| 52 | + <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{bn_goods.goods_id}}"> | ||
| 53 | + <view class="goods-name ellipsis-2">{{bn_goods.goods_name}}</view> | ||
| 54 | + <!-- 商品属性 --> | ||
| 55 | + <view class="flex-vertical fs28 color-gray n_guige"> | ||
| 56 | + <view class="goods-color"><text>{{filters.show_gui_ge(bn_goods.goods_spec,bn_goods.goods_color)}}</text> | ||
| 57 | + </view></view> | ||
| 58 | + | ||
| 59 | + <!-----商品名称规格------> | ||
| 60 | + <view class="order-num flex-space-between"> | ||
| 61 | + <view class="co-red">¥<text class="fs36">{{filters.toFix(param.goods_price,2)}}</text></view> | ||
| 62 | + <view class="goods-num">x{{bn_goods.buynum}}</view> | ||
| 63 | + </view> | ||
| 64 | + </navigator> | ||
| 65 | + <!-- <view class="order-num"> | ||
| 66 | + <view class="co-red">¥{{bn_goods.shop_price}}</view> | ||
| 67 | + <view class="goods-num">x{{bn_goods.buynum}}</view> | ||
| 68 | + </view> --> | ||
| 69 | + </view> | ||
| 70 | + | ||
| 71 | + <!-- 如果是等级卡的商品,会员没有注册,要提醒注册 --> | ||
| 72 | + <view class="plus_buy fs28" wx:if="{{card_cut_price>0}}"> | ||
| 73 | + <view class="flex"> | ||
| 74 | + <view class="card_bg ellipsis-1" style="margin-right: 10rpx;"> | ||
| 75 | + <image src="{{imgUrl}}/miniapp/images/plus/dj_icon.png"></ image> | ||
| 76 | + <text class="card_name">{{show_card.CardName}}</text> | ||
| 77 | + </view> | ||
| 78 | + <view>立减 <text style="color:#f23030;">{{filters.toFix(card_cut_price,2) }}</text> 元</view> | ||
| 79 | + </view> | ||
| 80 | + <view> | ||
| 81 | + <text style="color: #999;margin-left: 4rpx;">vip超级会员仅需{{show_card.CardFee}}元</text> | ||
| 82 | + </view> | ||
| 83 | + <!-- 三角形 --> | ||
| 84 | + <view class="car_tri_up"></view> | ||
| 85 | + <!-- 立即开通跳转 --> | ||
| 86 | + <view bindtap="buycard" class="card_op">立即开通</view> | ||
| 87 | + </view> | ||
| 88 | + | ||
| 89 | + | ||
| 90 | + <view class="set-mes bdr_b-14"> | ||
| 91 | + <view wx:if="{{order.store_prom}}"><icon color="#f23030" size="16" type="info"></icon>{{order.store_prom}} | ||
| 92 | + </view> | ||
| 93 | + | ||
| 94 | + <!--阶梯团是不显示的--> | ||
| 95 | + <block wx:if="{{bn_exp_type==0 && !is_default_logistics}}"> | ||
| 96 | + <view class="use-item flex-space-between" wx:if="{{kt_type!=3 || is_normal==1}}"> | ||
| 97 | + <view>选择物流</view> | ||
| 98 | + <view class="flex-vertical" bindtap="show_wu_arr" data-txt='index' style="margin-right: 8rpx;"> | ||
| 99 | + <view class="logistics-name">{{wu_arr[index].name}}</view><view class="xc-right"></view> | ||
| 100 | + </view> | ||
| 101 | + </view> | ||
| 102 | + </block> | ||
| 103 | + | ||
| 104 | + <!--阶梯团是不显示的 | ||
| 105 | + <block wx:if="{{kt_type!=3 || is_normal==1 }}"> | ||
| 106 | + <view class="use-item" hidden='{{bn_exp_type==1}}'> | ||
| 107 | + <view>使用物流:</view> | ||
| 108 | + <picker bindchange="bindPickerChange" value="{{index}}" range="{{wu_arr}}" range-key="name"> | ||
| 109 | + <view >{{wu_arr[index].name}}</view> | ||
| 110 | + </picker> | ||
| 111 | + </view> | ||
| 112 | + </block>--> | ||
| 113 | + | ||
| 114 | + </view> | ||
| 115 | + | ||
| 116 | + | ||
| 117 | + <view class="coupon-mes flex-vertical"> | ||
| 118 | + <view>留言</view> | ||
| 119 | + <view class="leave-word"> | ||
| 120 | + <input placeholder-class="fs28" placeholder='给商家留言,最多100字'bindinput="keyUpChangeNum" disabled="{{disabled}}" class="word-box" maxlength="100" name="user_note"></input> | ||
| 121 | + | ||
| 122 | + </view> | ||
| 123 | + </view> | ||
| 124 | + </block> | ||
| 125 | + | ||
| 126 | + <view class="information bdr14"> | ||
| 127 | + <!-----使用余额------> | ||
| 128 | + <view class="set-mes" wx:if="{{userinfo.user_money>0 && yuer>0}}"> | ||
| 129 | + <view class="use-item" bindtap='set_bn_useyuer' style="padding-left:0;padding-right:0;"> | ||
| 130 | + <icon color="{{bn_use_money?'red':'gray'}}" size="16" type="success"></icon> | ||
| 131 | + <view class="yu_er">使用余额 :¥{{yuer}} </view> | ||
| 132 | + </view> | ||
| 133 | + </view> | ||
| 134 | + <view class="item" wx:if="{{kt_type<3 || is_normal==1}}"> | ||
| 135 | + <view>商品金额</view> | ||
| 136 | + <!-- <view class="co-red">¥ {{formData.all_price}}元</view> --> | ||
| 137 | + <view class="co-red">¥ {{param.goods_price}}元</view> | ||
| 138 | + </view> | ||
| 139 | + | ||
| 140 | + <view class="item" wx:else> | ||
| 141 | + <view>定金金额</view> | ||
| 142 | + <view class="co-red">¥ {{formData.all_price}}元</view> | ||
| 143 | + </view> | ||
| 144 | + | ||
| 145 | + <view class="item" wx:if="{{formData.shipping_price>0}}"> | ||
| 146 | + <view>配送费用</view> | ||
| 147 | + <view class="co-red">¥ {{formData.shipping_price}}元</view> | ||
| 148 | + </view> | ||
| 149 | + <view class="item" wx:if="{{formData.user_money>0}}"> | ||
| 150 | + <view>使用余额</view> | ||
| 151 | + <view class="co-red">- ¥ {{formData.user_money}}元</view> | ||
| 152 | + </view> | ||
| 153 | + | ||
| 154 | + </view> | ||
| 155 | + </view> | ||
| 156 | + | ||
| 157 | + <view class="btn-wrap"> | ||
| 158 | + <view class="pay-amount"> | ||
| 159 | + <view class="payable">应付金额:<text class="co-red">¥{{formData.order_amount}}</text></view> | ||
| 160 | + <!-- <view class="co-red big"></view> --> | ||
| 161 | + </view> | ||
| 162 | + <button class="tips-btn" formType="submit" id="submitOrder">提交订单</button> | ||
| 163 | + </view> | ||
| 164 | +</form> | ||
| 165 | + | ||
| 166 | +<!----弹起选择物流名的列表----> | ||
| 167 | +<view wx:if='{{open_express==1}}' > | ||
| 168 | + <view class="cover-layer flex-center " bindtap='close_express'> | ||
| 169 | + </view> | ||
| 170 | + | ||
| 171 | + <view class="cx-popup radius {{open_express==1?'up' : 'down'}}" > | ||
| 172 | + <view class="tops flex"> | ||
| 173 | + <view class="top-content fs32"> | ||
| 174 | + <view> | ||
| 175 | + 选择物流名字 | ||
| 176 | + </view> | ||
| 177 | + </view> | ||
| 178 | + <view class="close-frame" bindtap='close_express' > | ||
| 179 | + <view class="xc-close-express">×</view> | ||
| 180 | + </view> | ||
| 181 | + </view> | ||
| 182 | + <view class="express_list"> | ||
| 183 | + <view wx:for="{{wu_arr}}" wx:for-item="express_list" wx:for-index="idx"> | ||
| 184 | + <view class="express_list_frame" bindtap="click_express_name" | ||
| 185 | + data-shippingcode="{{express_list.shipping_code}}" | ||
| 186 | + data-name="{{express_list.name}}" data-idxe="{{idx}}"> | ||
| 187 | + | ||
| 188 | + <block wx:if="{{is_express==idx}}"> | ||
| 189 | + <view class="circle white xc-hook fs20 red-b"><text>Γ</text></view> | ||
| 190 | + </block> | ||
| 191 | + <block wx:else> | ||
| 192 | + <view class="circle xc-hooks"></view> | ||
| 193 | + </block> | ||
| 194 | + <view class="fs30">{{express_list.name}}</view> | ||
| 195 | + | ||
| 196 | + </view> | ||
| 197 | + </view> | ||
| 198 | + </view> | ||
| 199 | + <view class="flex click-buttem" > | ||
| 200 | + <view class="xc-determine flex-center" bindtap="determine_expres"> | ||
| 201 | + <view class="flex-vertical t-c">确定</view> | ||
| 202 | + </view> | ||
| 203 | + <view class="xc-confirms flex-center" bindtap="select_default_logistics"> | ||
| 204 | + <view class="flex-vertical t-c">设为默认</view> | ||
| 205 | + </view> | ||
| 206 | + </view> | ||
| 207 | + | ||
| 208 | + </view > | ||
| 209 | +</view> | ||
| 210 | + | ||
| 211 | +<warn id="warn"></warn> | 
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.wxss
0 → 100644
| 1 | +.bdr_t-14 { | ||
| 2 | + border-top-left-radius: 14rpx; | ||
| 3 | + border-top-right-radius: 14rpx; | ||
| 4 | +} | ||
| 5 | +.bdr_b-14 { | ||
| 6 | + border-bottom-left-radius: 14rpx; | ||
| 7 | + border-bottom-right-radius: 14rpx; | ||
| 8 | +} | ||
| 9 | +.bdr14 { | ||
| 10 | + border-radius: 14rpx; | ||
| 11 | +} | ||
| 12 | +.mgt20 { | ||
| 13 | + margin-top: 20rpx; | ||
| 14 | +} | ||
| 15 | +.shadow { | ||
| 16 | + box-shadow: 0 4rpx 12px #e7e9eb; | ||
| 17 | +} | ||
| 18 | +.shadow-1 { | ||
| 19 | + box-shadow: 16rpx 0px 12px #e7e9eb; | ||
| 20 | +} | ||
| 21 | + | ||
| 22 | + | ||
| 23 | +page { | ||
| 24 | + /* background-color: #FAFAFA; */ | ||
| 25 | + background-color: #F0F0F0; | ||
| 26 | + padding: 0 22rpx; | ||
| 27 | + box-sizing: border-box; | ||
| 28 | +} | ||
| 29 | +.container { | ||
| 30 | + background-color: #F0F0F0; | ||
| 31 | + /* padding-top: 28rpx; */ | ||
| 32 | + padding-bottom: 120rpx; | ||
| 33 | +} | ||
| 34 | +.user-mes { | ||
| 35 | + position: relative; | ||
| 36 | + background-color: #fff; | ||
| 37 | + font-size: 32rpx; | ||
| 38 | + color: #444; | ||
| 39 | + /* margin-top: 28rpx; */ | ||
| 40 | + border-radius: 14rpx; | ||
| 41 | +} | ||
| 42 | +.user-contact { | ||
| 43 | + padding: 24rpx 26rpx; | ||
| 44 | + font-weight: 600; | ||
| 45 | +} | ||
| 46 | + | ||
| 47 | +.location { | ||
| 48 | + position: relative; | ||
| 49 | + padding: 0 70rpx 24rpx; | ||
| 50 | +} | ||
| 51 | + | ||
| 52 | +.pos-icon { | ||
| 53 | + position: absolute; | ||
| 54 | + left: 28rpx; | ||
| 55 | + top: 6rpx; | ||
| 56 | + width: 30rpx; | ||
| 57 | + height: 36rpx; | ||
| 58 | +} | ||
| 59 | + | ||
| 60 | +.border-img { | ||
| 61 | + width: 100%; | ||
| 62 | + height: 12rpx; | ||
| 63 | +} | ||
| 64 | + | ||
| 65 | +.update-logistics { | ||
| 66 | + position: absolute; | ||
| 67 | + right: 0; | ||
| 68 | + top: 0; | ||
| 69 | + width: 80rpx; | ||
| 70 | + height: 100%; | ||
| 71 | + display: flex; | ||
| 72 | + align-items: center; | ||
| 73 | + justify-content: center; | ||
| 74 | +} | ||
| 75 | + | ||
| 76 | +.arrow-rigth { | ||
| 77 | + width: 32rpx; | ||
| 78 | + height: 32rpx; | ||
| 79 | +} | ||
| 80 | + | ||
| 81 | +.order-meg { | ||
| 82 | + margin-bottom: 20rpx; | ||
| 83 | + font-size: 28rpx; | ||
| 84 | + | ||
| 85 | +} | ||
| 86 | + | ||
| 87 | +.order-detail { | ||
| 88 | + padding: 30rpx 0; | ||
| 89 | + border-bottom: 2rpx solid #eee; | ||
| 90 | + color: #777; | ||
| 91 | + min-height: 190rpx; | ||
| 92 | + background-color: #fff; | ||
| 93 | + | ||
| 94 | +} | ||
| 95 | + | ||
| 96 | +.goods-img { | ||
| 97 | + float: left; | ||
| 98 | + width: 200rpx; | ||
| 99 | + height: 200rpx; | ||
| 100 | + margin: 0 20rpx; | ||
| 101 | +} | ||
| 102 | + | ||
| 103 | +.order-cont { | ||
| 104 | + float: left; | ||
| 105 | + width: 438rpx; | ||
| 106 | +} | ||
| 107 | + | ||
| 108 | +.goods-name { | ||
| 109 | + height: 74rpx; | ||
| 110 | + line-height: 40rpx; | ||
| 111 | + overflow: hidden; | ||
| 112 | + margin-bottom: 16rpx; | ||
| 113 | + font-size: 28rpx; | ||
| 114 | + color: #333; | ||
| 115 | + | ||
| 116 | +} | ||
| 117 | + | ||
| 118 | +.goods-color { | ||
| 119 | + font-size: 24rpx; | ||
| 120 | +} | ||
| 121 | + | ||
| 122 | +.order-num { | ||
| 123 | + margin-top: 25rpx; | ||
| 124 | + font-size: 24rpx; | ||
| 125 | + line-height: 42rpx; | ||
| 126 | +} | ||
| 127 | + | ||
| 128 | +.set-mes{ | ||
| 129 | + background-color: #fff; | ||
| 130 | + /* margin-top: 20rpx; */ | ||
| 131 | +} | ||
| 132 | +.use-item{ | ||
| 133 | + display: flex; | ||
| 134 | + align-items: center; | ||
| 135 | + height: 80rpx; | ||
| 136 | + /* border-bottom: 1px solid #ddd; */ | ||
| 137 | + font-size: 30rpx; | ||
| 138 | + /* width:95%; | ||
| 139 | +margin:auto; */ | ||
| 140 | + padding: 0 26rpx; | ||
| 141 | +} | ||
| 142 | +.use-item>view{ | ||
| 143 | + display: flex; | ||
| 144 | + /* margin-right: 12rpx; */ | ||
| 145 | +} | ||
| 146 | +.use-item.bfff{ | ||
| 147 | + background-color: #fff; | ||
| 148 | +} | ||
| 149 | +.use-item .dp{ | ||
| 150 | + display: block; | ||
| 151 | + width: 50rpx; | ||
| 152 | + height: 50rpx; | ||
| 153 | + margin-left: -6rpx; | ||
| 154 | +} | ||
| 155 | + | ||
| 156 | +.set-item { | ||
| 157 | + justify-content: space-between; | ||
| 158 | + background-color: #fff; | ||
| 159 | +} | ||
| 160 | + | ||
| 161 | +.set-btn { | ||
| 162 | + display: flex; | ||
| 163 | + font-size: 24rpx; | ||
| 164 | +} | ||
| 165 | + | ||
| 166 | +.set-mes input { | ||
| 167 | + width: 380rpx; | ||
| 168 | + height: 50rpx; | ||
| 169 | + line-height: 50rpx; | ||
| 170 | + border: 1px solid #ddd; | ||
| 171 | +} | ||
| 172 | + | ||
| 173 | +.use-btn { | ||
| 174 | + width: 100rpx; | ||
| 175 | + height: 50rpx; | ||
| 176 | + margin-left: 20rpx; | ||
| 177 | + line-height: 50rpx; | ||
| 178 | + text-align: center; | ||
| 179 | + background-color: #f23030; | ||
| 180 | + color: #fff; | ||
| 181 | +} | ||
| 182 | + | ||
| 183 | +.coupon-mes { | ||
| 184 | + /* box-sizing: border-box; */ | ||
| 185 | + height:95rpx; | ||
| 186 | + padding: 0 26rpx; | ||
| 187 | + background-color: #fff; | ||
| 188 | + font-size: 30rpx; | ||
| 189 | + color: #444; | ||
| 190 | + /* width: 100%; */ | ||
| 191 | + border-radius: 14rpx; | ||
| 192 | + margin-top: 20rpx; | ||
| 193 | + margin-bottom: 20rpx; | ||
| 194 | +} | ||
| 195 | + | ||
| 196 | +.coupon-title { | ||
| 197 | + display: flex; | ||
| 198 | + justify-content: space-between; | ||
| 199 | + align-items: center; | ||
| 200 | + height: 92rpx; | ||
| 201 | +} | ||
| 202 | + | ||
| 203 | +.coupon-title>view { | ||
| 204 | + display: flex; | ||
| 205 | +} | ||
| 206 | + | ||
| 207 | +.coupon-num { | ||
| 208 | + height: 36rpx; | ||
| 209 | + margin-left: 20rpx; | ||
| 210 | + padding: 0 16rpx; | ||
| 211 | + line-height: 36rpx; | ||
| 212 | + text-align: center; | ||
| 213 | + background-color: #f23030; | ||
| 214 | + color: #fff; | ||
| 215 | + font-size: 24rpx; | ||
| 216 | +} | ||
| 217 | + | ||
| 218 | +.leave-word { | ||
| 219 | + position: relative; | ||
| 220 | + font-size: 24rpx; | ||
| 221 | + margin-left: 20rpx; | ||
| 222 | + flex-grow: 1; | ||
| 223 | +} | ||
| 224 | + | ||
| 225 | +.word-box { | ||
| 226 | + font-size: 26rpx; | ||
| 227 | + /* width: 600rpx; */ | ||
| 228 | + padding: 10rpx; | ||
| 229 | + height: 28rpx; | ||
| 230 | + line-height: 40rpx; | ||
| 231 | +} | ||
| 232 | + | ||
| 233 | +.max-word { | ||
| 234 | + position: absolute; | ||
| 235 | + right: 0; | ||
| 236 | + bottom: 0; | ||
| 237 | +} | ||
| 238 | + | ||
| 239 | +.information { | ||
| 240 | + padding: 0 26rpx; | ||
| 241 | + background-color: #fff; | ||
| 242 | + /* margin-bottom: 120rpx; */ | ||
| 243 | +} | ||
| 244 | + | ||
| 245 | +.information .item { | ||
| 246 | + display: flex; | ||
| 247 | + justify-content: space-between; | ||
| 248 | + height: 60rpx; | ||
| 249 | + line-height: 60rpx; | ||
| 250 | + font-size: 26rpx; | ||
| 251 | + color: #777; | ||
| 252 | +} | ||
| 253 | + | ||
| 254 | +.btn-wrap { | ||
| 255 | + height: 94rpx; | ||
| 256 | + box-sizing: border-box; | ||
| 257 | + display: flex; | ||
| 258 | + justify-content: space-between; | ||
| 259 | + background-color: white; | ||
| 260 | + align-items: center; | ||
| 261 | + position: fixed; | ||
| 262 | + bottom: 0; | ||
| 263 | + left: 0; | ||
| 264 | + width: 100%; | ||
| 265 | + padding: 0 30rpx; | ||
| 266 | +} | ||
| 267 | + | ||
| 268 | +.tips-btn { | ||
| 269 | + /* float: right; | ||
| 270 | + width: 200rpx; | ||
| 271 | + height: 100rpx; | ||
| 272 | + line-height: 100rpx; | ||
| 273 | + text-align: center; | ||
| 274 | + font-size: 30rpx; | ||
| 275 | + color: #fff; | ||
| 276 | + background-color: #f23030; */ | ||
| 277 | + color: white; | ||
| 278 | + background-color: #FE4445; | ||
| 279 | + height: 72rpx; | ||
| 280 | + line-height: 72rpx; | ||
| 281 | + padding: 0 42rpx; | ||
| 282 | + border-radius: 36rpx; | ||
| 283 | + margin-left: 0; | ||
| 284 | + margin-right: 0; | ||
| 285 | +} | ||
| 286 | + | ||
| 287 | +.pay-amount { | ||
| 288 | + /* float: right; | ||
| 289 | + display: flex; | ||
| 290 | + align-items: center; | ||
| 291 | + height: 100rpx; | ||
| 292 | + font-size: 26rpx; | ||
| 293 | + margin-right: 40rpx; */ | ||
| 294 | +} | ||
| 295 | + | ||
| 296 | +.payable { | ||
| 297 | + color: #444; | ||
| 298 | + /* margin-right: 20rpx; */ | ||
| 299 | +} | ||
| 300 | + | ||
| 301 | +.shipping-modal { | ||
| 302 | + z-index: 20; | ||
| 303 | + position: fixed; | ||
| 304 | + bottom: 0; | ||
| 305 | + left: 0; | ||
| 306 | + right: 0; | ||
| 307 | + overflow-y: hidden; | ||
| 308 | + color: #666666; | ||
| 309 | + background-color: white; | ||
| 310 | +} | ||
| 311 | + | ||
| 312 | +.shipping-nav { | ||
| 313 | + text-align: center; | ||
| 314 | + font-size: 35rpx; | ||
| 315 | + padding-top: 30rpx; | ||
| 316 | +} | ||
| 317 | + | ||
| 318 | +.shipping-list { | ||
| 319 | + padding: 20rpx 30rpx 40rpx; | ||
| 320 | + font-size: 28rpx; | ||
| 321 | +} | ||
| 322 | + | ||
| 323 | +.shipping-item { | ||
| 324 | + display: block; | ||
| 325 | + padding: 20rpx 0; | ||
| 326 | +} | ||
| 327 | + | ||
| 328 | +.shipping-btn { | ||
| 329 | + width: 100%; | ||
| 330 | + color: white; | ||
| 331 | + background-color: #f23030; | ||
| 332 | + line-height: 90rpx; | ||
| 333 | + text-align: center; | ||
| 334 | + font-size: 40rpx; | ||
| 335 | +} | ||
| 336 | + | ||
| 337 | +/*----------nyf新增,地址---------*/ | ||
| 338 | +.add_new{ | ||
| 339 | + height: 90rpx; | ||
| 340 | + display: flex; | ||
| 341 | + align-items: center; | ||
| 342 | + padding: 0 26rpx; | ||
| 343 | +} | ||
| 344 | +.addr_jia{width: 45rpx; height: 45rpx; border: 1rpx solid #ddd; | ||
| 345 | + margin-right: 15rpx;vertical-align: middle;} | ||
| 346 | +.yu_er{ | ||
| 347 | + margin-left: 10rpx; | ||
| 348 | + /* margin-right: 60rpx; */ | ||
| 349 | +} | ||
| 350 | +.wuliu{margin-left: 20rpx;} | ||
| 351 | + | ||
| 352 | + | ||
| 353 | +/*---- 优惠券列表 -----*/ | ||
| 354 | +.xc-coupon-frame{ | ||
| 355 | + width: 100%; | ||
| 356 | + height: 92rpx; | ||
| 357 | + | ||
| 358 | +} | ||
| 359 | +.xc-coupon-frame .work-frame{ | ||
| 360 | + width: 100%; | ||
| 361 | + height: 100%; | ||
| 362 | + border-bottom:3rpx solid #eee; | ||
| 363 | + padding: 0 26rpx; | ||
| 364 | + background-color: white; | ||
| 365 | +} | ||
| 366 | +.xc-right{ | ||
| 367 | + width:20rpx; | ||
| 368 | + height:20rpx; | ||
| 369 | + border-top:2rpx solid #000; | ||
| 370 | + border-right:2rpx solid #000; | ||
| 371 | + transform:rotate(45deg); | ||
| 372 | + display:inline-block; | ||
| 373 | +} | ||
| 374 | + | ||
| 375 | +.xc-coupon-frame .work-frame .work{ font-size: 30rpx; line-height: 92rpx; } | ||
| 376 | +.xc-right-frame{font-size: 30rpx;line-height: 92rpx; margin-right: 10rpx } | ||
| 377 | + | ||
| 378 | +/* 自定义弹出窗口 */ | ||
| 379 | +.cx-popup{ | ||
| 380 | + width:100%; | ||
| 381 | + height:880rpx; | ||
| 382 | + background: #fff; | ||
| 383 | + z-index: 35; | ||
| 384 | + border-top-left-radius: 20rpx; | ||
| 385 | + border-top-right-radius: 20rpx; | ||
| 386 | + position:fixed; | ||
| 387 | + bottom:0; | ||
| 388 | + left: 0; | ||
| 389 | + /* padding-bottom: 25rpx; */ | ||
| 390 | +} | ||
| 391 | + | ||
| 392 | +.cx-popup .top{ | ||
| 393 | + width:95%; | ||
| 394 | + height:100rpx; | ||
| 395 | + border-bottom:3rpx solid #ddd; | ||
| 396 | + margin: auto; | ||
| 397 | + margin-top: 30rpx; | ||
| 398 | + | ||
| 399 | +} | ||
| 400 | +.xc-top-content{ | ||
| 401 | + width: 93%; | ||
| 402 | + height:85rpx; | ||
| 403 | + padding-top: 30rpx; | ||
| 404 | + font-size: 34rpx; | ||
| 405 | + font-weight: 600; | ||
| 406 | + | ||
| 407 | +} | ||
| 408 | + | ||
| 409 | + | ||
| 410 | +.xc-valid-coupon{ | ||
| 411 | + width: 90%; | ||
| 412 | + height:40rpx; | ||
| 413 | + padding-top: 24rpx; | ||
| 414 | + overflow: hidden; | ||
| 415 | +} | ||
| 416 | +.xc-frame{ | ||
| 417 | + width: 100%; | ||
| 418 | + height:60%; | ||
| 419 | +} | ||
| 420 | + | ||
| 421 | +.xc-frame .list-frame{ | ||
| 422 | + width: 95%; | ||
| 423 | + height: 100%; | ||
| 424 | + overflow-y:scroll; | ||
| 425 | + | ||
| 426 | +} | ||
| 427 | +.xc-close-frame{ | ||
| 428 | + margin-top:-10rpx; | ||
| 429 | + | ||
| 430 | +} | ||
| 431 | + | ||
| 432 | +.xc-close{ | ||
| 433 | + width: 37rpx; | ||
| 434 | +height: 37rpx; | ||
| 435 | +border-radius: 50%; | ||
| 436 | +border: 3rpx solid #333; | ||
| 437 | +text-align: center; | ||
| 438 | +line-height: 34rpx; | ||
| 439 | +font-size: 29rpx; | ||
| 440 | +color: #333; | ||
| 441 | + | ||
| 442 | +} | ||
| 443 | +.xc-money{ | ||
| 444 | + color: #af2346; | ||
| 445 | + font-size: 35rpx; | ||
| 446 | +} | ||
| 447 | + | ||
| 448 | +.xc-money-frame{ | ||
| 449 | + margin-left:35rpx; | ||
| 450 | + | ||
| 451 | +} | ||
| 452 | +.xc-coupon-effect{ | ||
| 453 | + width: 99%; | ||
| 454 | + min-height: 100rpx; | ||
| 455 | + border-bottom:3rpx solid #ddd; | ||
| 456 | + | ||
| 457 | + | ||
| 458 | +} | ||
| 459 | +.xc-goods-coupon{ | ||
| 460 | + width: 85%; | ||
| 461 | + height:100%; | ||
| 462 | + | ||
| 463 | +} | ||
| 464 | +.xc-title{ | ||
| 465 | + width:50%; | ||
| 466 | + margin-left:222rpx; | ||
| 467 | + | ||
| 468 | +} | ||
| 469 | +.xc-coupon-money0{ | ||
| 470 | + color: #c91e31; | ||
| 471 | + font-size: 35rpx; | ||
| 472 | + line-height: 40rpx; | ||
| 473 | + | ||
| 474 | +} | ||
| 475 | +.xc-coupon-money{ | ||
| 476 | + color: #c91e31; | ||
| 477 | + font-size: 35rpx; | ||
| 478 | + line-height: 40rpx; | ||
| 479 | + padding-top: 10px; | ||
| 480 | + | ||
| 481 | +} | ||
| 482 | +.xc-coupon-money1{ | ||
| 483 | + color: #444; | ||
| 484 | + font-size: 28rpx; | ||
| 485 | + line-height: 60rpx; | ||
| 486 | + | ||
| 487 | + | ||
| 488 | +} | ||
| 489 | +.xc-coupon-time{ | ||
| 490 | + height: 50rpx; | ||
| 491 | + font-size: 27rpx; | ||
| 492 | + color: #a4a4a4; | ||
| 493 | +} | ||
| 494 | +.xc-coupon-time .time{ | ||
| 495 | + margin-left: 15rpx; | ||
| 496 | + font-size: 27rpx; | ||
| 497 | +} | ||
| 498 | +.xc-coupon-selection{ | ||
| 499 | + height:100%; | ||
| 500 | +} | ||
| 501 | + | ||
| 502 | +.xc-confirm { | ||
| 503 | + width: 50%; | ||
| 504 | + border-radius: 50rpx; | ||
| 505 | + height: 80rpx; | ||
| 506 | + margin:0 auto; | ||
| 507 | + background:#d60021; | ||
| 508 | + color:#fff; | ||
| 509 | + font-size:28rpx; | ||
| 510 | + margin-top: 28rpx; | ||
| 511 | +} | ||
| 512 | + | ||
| 513 | +.up{ animation: up .7s; } | ||
| 514 | +.down{ animation: down 1s; } | ||
| 515 | +@keyframes up { 0% { transform: translateY(550rpx); } 100% { transform: translateY(0); } } | ||
| 516 | +@keyframes down { 0% { transform: translateY(0); } 100% { transform: translateY(550rpx); } } | ||
| 517 | + | ||
| 518 | +.xc-not-Selection{ | ||
| 519 | + width: 40rpx; | ||
| 520 | +height: 40rpx; | ||
| 521 | + background: #eeeeee; | ||
| 522 | +} | ||
| 523 | + | ||
| 524 | + | ||
| 525 | +.xc-close-express{ | ||
| 526 | + width: 40rpx; | ||
| 527 | +height: 40rpx; | ||
| 528 | +border-radius: 50%; | ||
| 529 | +border: 3rpx solid #333; | ||
| 530 | +text-align: center; | ||
| 531 | +font-size:32rpx; | ||
| 532 | +line-height: 38rpx; | ||
| 533 | +color: #333; | ||
| 534 | +margin-top: 5rpx; | ||
| 535 | +} | ||
| 536 | +.cx-popup .tops{ | ||
| 537 | + width: 100%; | ||
| 538 | +height: 145rpx; | ||
| 539 | +border-bottom: 3rpx solid #eee; | ||
| 540 | + | ||
| 541 | +} | ||
| 542 | +.top-content { | ||
| 543 | + width: 82%; | ||
| 544 | +padding-top: 33px; | ||
| 545 | +height: 100%; | ||
| 546 | +padding-left: 40rpx; | ||
| 547 | +} | ||
| 548 | +.close-frame{ | ||
| 549 | + margin-top: 30rpx; | ||
| 550 | + | ||
| 551 | +} | ||
| 552 | + | ||
| 553 | +.xc-hook { | ||
| 554 | +width: 33rpx; | ||
| 555 | +height: 33rpx; | ||
| 556 | +transform: rotate(-135deg); | ||
| 557 | +line-height: 35rpx; | ||
| 558 | +text-align: center; | ||
| 559 | +margin-right: 20rpx | ||
| 560 | + | ||
| 561 | + | ||
| 562 | +} | ||
| 563 | +.xc-hooks { | ||
| 564 | +width: 30rpx; | ||
| 565 | +height: 30rpx; | ||
| 566 | +border: 1rpx solid #999; | ||
| 567 | +margin-right: 20rpx; | ||
| 568 | +} | ||
| 569 | +.express_list_frame{ | ||
| 570 | + display: flex; | ||
| 571 | +height: 80rpx; | ||
| 572 | +align-items: center; | ||
| 573 | +padding-left: 40rpx; | ||
| 574 | +border-bottom: 1rpx solid #eee; | ||
| 575 | + | ||
| 576 | +} | ||
| 577 | +.express_list{ | ||
| 578 | + width: 100%; | ||
| 579 | + height: 65%; | ||
| 580 | + overflow-y: auto; | ||
| 581 | + margin-bottom: 40rpx; | ||
| 582 | + | ||
| 583 | +} | ||
| 584 | +.xc-confirms { | ||
| 585 | + box-sizing: border-box; | ||
| 586 | + width: 40%; | ||
| 587 | + border-radius: 50rpx; | ||
| 588 | + height: 80rpx; | ||
| 589 | + margin:0 auto; | ||
| 590 | + font-size:28rpx; | ||
| 591 | + background: #fff; | ||
| 592 | + color: #333; | ||
| 593 | + border: 2rpx solid #333; | ||
| 594 | +} | ||
| 595 | + | ||
| 596 | + | ||
| 597 | +/* 优惠券的改版样式 */ | ||
| 598 | +.xc-coupon-frame{ | ||
| 599 | + /* width: 710rpx; */ | ||
| 600 | + width: 100%; | ||
| 601 | + height:auto; | ||
| 602 | + margin: 0 auto; | ||
| 603 | + | ||
| 604 | +} | ||
| 605 | +.xc-coupon-frame .coupon-frame{ | ||
| 606 | + width: 100%; | ||
| 607 | + height: 200rpx; | ||
| 608 | + margin-top:10rpx; | ||
| 609 | + border-bottom: 1rpx solid #eee; | ||
| 610 | + | ||
| 611 | +} | ||
| 612 | +.xc-coupon-frame .coupon-frame .coupon-left{ | ||
| 613 | + width: 215rpx; | ||
| 614 | + height:100%; | ||
| 615 | + overflow: hidden; | ||
| 616 | +} | ||
| 617 | +.xc-money-frames{ | ||
| 618 | + width:96%; | ||
| 619 | + margin-top: -10px; | ||
| 620 | +} | ||
| 621 | + | ||
| 622 | +.xc-rmb-symbol{ | ||
| 623 | + font-size:40rpx; | ||
| 624 | + | ||
| 625 | +} | ||
| 626 | + | ||
| 627 | +.xc-rmb-val{ | ||
| 628 | + font-size:60rpx; | ||
| 629 | + | ||
| 630 | +} | ||
| 631 | +.coupon-explain{ | ||
| 632 | + font-size:25rpx; | ||
| 633 | +width:100%; | ||
| 634 | + | ||
| 635 | + | ||
| 636 | +} | ||
| 637 | +.xc-valuer{ | ||
| 638 | + margin-top:39rpx; | ||
| 639 | + margin-left:28rpx; | ||
| 640 | + font-size:25rpx; | ||
| 641 | +} | ||
| 642 | +.coupon-frame .oval{ | ||
| 643 | + width:155rpx; | ||
| 644 | + height:83rpx; | ||
| 645 | + border-radius: 50%; | ||
| 646 | + right:-78rpx; | ||
| 647 | + top:-37rpx; | ||
| 648 | +} | ||
| 649 | +.coupon-right{ | ||
| 650 | + /* width:490rpx; */ | ||
| 651 | + height: 99%; | ||
| 652 | + border-top: 1rpx solid #eaeaea; | ||
| 653 | + /* //border-bottom: 1rpx solid #eaeaea; */ | ||
| 654 | + border-right: 1rpx solid #eaeaea; | ||
| 655 | + flex-grow: 1; | ||
| 656 | +} | ||
| 657 | +.coupon-annotation{ | ||
| 658 | + width: 95%; | ||
| 659 | + height: 100%; | ||
| 660 | + | ||
| 661 | +} | ||
| 662 | +.xc-brand{ | ||
| 663 | + width:100rpx; | ||
| 664 | + height:35rpx; | ||
| 665 | + line-height: 35rpx; | ||
| 666 | + font-size:21rpx; | ||
| 667 | + border-radius:10rpx; position: relative; top:-1px; | ||
| 668 | + margin-right: 8rpx | ||
| 669 | +} | ||
| 670 | +.top-frame{ | ||
| 671 | + width:82%; | ||
| 672 | + height: 75rpx; | ||
| 673 | + margin-top:10rpx; | ||
| 674 | +} | ||
| 675 | +.top-frame .coupon-wode{ | ||
| 676 | + font-size: 25rpx; | ||
| 677 | + margin-left:10rpx; | ||
| 678 | + width:340rpx; | ||
| 679 | + height:88rpx; | ||
| 680 | +} | ||
| 681 | +.coupon-code{ | ||
| 682 | + width:60rpx; | ||
| 683 | + height:60rpx; | ||
| 684 | + margin-top:5rpx; | ||
| 685 | + | ||
| 686 | +} | ||
| 687 | +.frame{ | ||
| 688 | + width: 100% | ||
| 689 | +} | ||
| 690 | +.coupon-time{ | ||
| 691 | + font-size: 23rpx; | ||
| 692 | + line-height:33rpx; | ||
| 693 | + color: #333; | ||
| 694 | +} | ||
| 695 | + | ||
| 696 | +.clik-get{ | ||
| 697 | + width:125rpx; | ||
| 698 | + height:45rpx; | ||
| 699 | + border-radius: 25rpx; | ||
| 700 | + line-height: 45rpx; | ||
| 701 | + font-size:25rpx; | ||
| 702 | + bottom:67rpx; | ||
| 703 | + right:6px; | ||
| 704 | +} | ||
| 705 | + | ||
| 706 | +.code-img{ | ||
| 707 | + margin-left:20rpx; | ||
| 708 | +} | ||
| 709 | +.bottmo-explain{ | ||
| 710 | +top:145rpx; | ||
| 711 | +width:94%; | ||
| 712 | +border-top:1rpx dashed #eee; | ||
| 713 | +padding-top:8rpx; | ||
| 714 | +height:38rpx; | ||
| 715 | +line-height: 51rpx; | ||
| 716 | + | ||
| 717 | +} | ||
| 718 | +.font-word{ | ||
| 719 | + font-size: 22rpx; | ||
| 720 | +} | ||
| 721 | +.circle-size{ | ||
| 722 | + background: #a0a0a0; | ||
| 723 | + width: 27rpx; | ||
| 724 | + height: 27rpx; | ||
| 725 | + margin-top:13rpx; | ||
| 726 | +margin-left:8rpx; | ||
| 727 | +display: flex; | ||
| 728 | + | ||
| 729 | +align-items: center; | ||
| 730 | +} | ||
| 731 | +.xc-jiantou{ | ||
| 732 | + /* width: 9rpx; | ||
| 733 | + height: 9rpx; */ | ||
| 734 | + /* border-top: 2rpx solid #fff; | ||
| 735 | + border-right: 2rpx solid #fff; */ | ||
| 736 | + transform: rotate(-90deg); | ||
| 737 | + color: #fff; | ||
| 738 | + font-size: 15rpx; | ||
| 739 | + /* display:inline-block; | ||
| 740 | + margin-top: 6.5rpx; */ | ||
| 741 | + text-align: center; | ||
| 742 | +width: 24rpx; | ||
| 743 | +} | ||
| 744 | +.xc-buttom{ | ||
| 745 | + box-sizing: border-box; | ||
| 746 | + width:100%; | ||
| 747 | + min-height:76rpx; | ||
| 748 | + height:auto; | ||
| 749 | + line-height:40rpx; | ||
| 750 | + border-left:1rpx solid #eee; | ||
| 751 | + border-right:1rpx solid #eee; | ||
| 752 | + border-bottom:1rpx solid #eee; | ||
| 753 | +/* margin-left: 6rpx; */ | ||
| 754 | +} | ||
| 755 | + | ||
| 756 | +.goods-num{ | ||
| 757 | + font-size: 28rpx; | ||
| 758 | + color: #333; | ||
| 759 | +} | ||
| 760 | + | ||
| 761 | +.explain-coupon{ | ||
| 762 | + font-size:25rpx; | ||
| 763 | + padding: 10rpx 10rpx | ||
| 764 | +} | ||
| 765 | +.circle-frame{ | ||
| 766 | + width: 20rpx; | ||
| 767 | + height: auto; | ||
| 768 | + z-index:1; | ||
| 769 | + left:210rpx; | ||
| 770 | + | ||
| 771 | +} | ||
| 772 | +.circle-sawtooth{ | ||
| 773 | + width: 11rpx; | ||
| 774 | + height: 11rpx; | ||
| 775 | + background: #fff; | ||
| 776 | +} | ||
| 777 | + | ||
| 778 | +.red{background-color: #fe7496;} | ||
| 779 | +.green{ background-color: #22c7c1;} | ||
| 780 | +.blue{background-color:#5e82e3;} | ||
| 781 | +.g_gray{background-color: #aaaaaa} | ||
| 782 | + | ||
| 783 | +.f_text{text-align: center; height:96rpx; } | ||
| 784 | +.xc-hook.sn { | ||
| 785 | + margin-top:12%; | ||
| 786 | +width:45rpx; | ||
| 787 | +height:45rpx; | ||
| 788 | +font-size:28rpx; | ||
| 789 | +line-height:44rpx; | ||
| 790 | + | ||
| 791 | + | ||
| 792 | +} | ||
| 793 | +.xc-hooks.on{ | ||
| 794 | + margin-top:12%; | ||
| 795 | +width:42rpx; | ||
| 796 | +height:42rpx; | ||
| 797 | +} | ||
| 798 | +.may_use_coupon{ | ||
| 799 | + /* width: 95%; */ | ||
| 800 | + /* height: 68rpx; */ | ||
| 801 | + line-height:78rpx; | ||
| 802 | + padding: 0 26rpx; | ||
| 803 | + justify-content: space-between; | ||
| 804 | + align-items: center; | ||
| 805 | +} | ||
| 806 | +.determine-frame{ | ||
| 807 | + width: 100%; | ||
| 808 | + height: 130rpx; | ||
| 809 | + | ||
| 810 | +} | ||
| 811 | +.xc-determine{ | ||
| 812 | + height: 80rpx; | ||
| 813 | + width: 40%; | ||
| 814 | + border-radius: 50rpx; | ||
| 815 | +background: #d60021; | ||
| 816 | +color: #fff; | ||
| 817 | +font-size: 28rpx; | ||
| 818 | +margin: 0 auto; | ||
| 819 | + | ||
| 820 | +} | ||
| 821 | +.click-buttem{ | ||
| 822 | +width: 90%; | ||
| 823 | +margin: auto; | ||
| 824 | +} | ||
| 825 | +.logistics-name{ | ||
| 826 | + margin-right:20rpx; | ||
| 827 | +} | ||
| 828 | +.xc-border{ | ||
| 829 | + border-top:8rpx solid #eee; | ||
| 830 | +width: 100% | ||
| 831 | +} | ||
| 832 | +.main-top{ | ||
| 833 | +margin-top: 20rpx; | ||
| 834 | + | ||
| 835 | +} | ||
| 836 | +.xc-hookts{ | ||
| 837 | +border: 1rpx solid #999; | ||
| 838 | + | ||
| 839 | +} | ||
| 840 | +.xc-hookts.on{ | ||
| 841 | + width:30rpx; | ||
| 842 | +height:30rpx; | ||
| 843 | + | ||
| 844 | +} | ||
| 845 | +.xc-hookt.sn{ | ||
| 846 | + width: 32rpx; | ||
| 847 | +height: 32rpx; | ||
| 848 | +font-size: 28rpx; | ||
| 849 | +line-height: 34rpx; | ||
| 850 | +} | ||
| 851 | +.xc-hookt{ | ||
| 852 | + transform: rotate(-135deg); | ||
| 853 | +text-align: center; | ||
| 854 | + | ||
| 855 | +} | ||
| 856 | +.main-bottom{ | ||
| 857 | + margin-bottom: 20rpx; | ||
| 858 | + | ||
| 859 | +} | ||
| 860 | +.xc-hookst{ | ||
| 861 | + border: 1rpx solid #999; | ||
| 862 | + | ||
| 863 | +} | ||
| 864 | +.xc-hookst.ons{ | ||
| 865 | + width: 42rpx; | ||
| 866 | +height: 42rpx; | ||
| 867 | +margin-left: 20rpx; | ||
| 868 | + | ||
| 869 | +} | ||
| 870 | +.is_use_coupon{ | ||
| 871 | + width: 65%; | ||
| 872 | +justify-content: flex-end; | ||
| 873 | +padding-top: 10rpx; | ||
| 874 | + | ||
| 875 | + | ||
| 876 | +} | ||
| 877 | +.xc-hooka{ | ||
| 878 | + transform: rotate(-135deg); | ||
| 879 | +text-align: center; | ||
| 880 | + | ||
| 881 | +} | ||
| 882 | +.xc-hooka.sn{ | ||
| 883 | + width: 45rpx; | ||
| 884 | +height: 45rpx; | ||
| 885 | +font-size: 28rpx; | ||
| 886 | +line-height: 44rpx; | ||
| 887 | +margin-left: 20rpx; | ||
| 888 | + | ||
| 889 | +} | ||
| 890 | +.color-gray{ | ||
| 891 | + color: #808080; | ||
| 892 | +} | ||
| 893 | +.n_guige{ display: inline-block; background:rgb(236, 236, 236); color: rgb(63,63,63); padding: 3rpx 10rpx; border-radius: 3rpx } | ||
| 894 | +.gift_image{ width: 60rpx; height: 60rpx; position: absolute; top: 0; left: 0} | ||
| 895 | + | ||
| 896 | +.quan_num_show{ padding: 4rpx 6rpx; background-color:#ea5551; color:#fff; border-radius: 6rpx;margin-left:10rpx;font-size:24rpx;} | ||
| 897 | + | ||
| 898 | +.navigator-hover { | ||
| 899 | + background: none; | ||
| 900 | + opacity: 1; | ||
| 901 | +} | ||
| 902 | + | ||
| 903 | +.plus_buy{ | ||
| 904 | + background-color: #fff; | ||
| 905 | + margin:15rpx 0; | ||
| 906 | + padding: 20rpx 10rpx; | ||
| 907 | + position: relative; | ||
| 908 | +} | ||
| 909 | + | ||
| 910 | + | ||
| 911 | +.card_bg { | ||
| 912 | + box-sizing: border-box; | ||
| 913 | + padding: 2rpx 10rpx; | ||
| 914 | + height: 28rpx; | ||
| 915 | + border-radius: 26rpx; | ||
| 916 | + font-size: 18rpx; | ||
| 917 | + line-height: 28rpx; | ||
| 918 | + max-width: 210rpx; | ||
| 919 | + background: #333; | ||
| 920 | + color: #fff; | ||
| 921 | + margin-left: 8rpx; | ||
| 922 | + position:relative; | ||
| 923 | + top:7rpx; | ||
| 924 | +} | ||
| 925 | + | ||
| 926 | +.card_bg image { | ||
| 927 | + width: 19rpx; | ||
| 928 | + height: 19rpx; | ||
| 929 | + margin-right: 8rpx; | ||
| 930 | +} | ||
| 931 | + | ||
| 932 | +/* .card_bg .card_name { | ||
| 933 | + max-width: 76rpx; | ||
| 934 | + width: auto; | ||
| 935 | + overflow: hidden; | ||
| 936 | + white-space: nowrap; | ||
| 937 | +} */ | ||
| 938 | + | ||
| 939 | +.card_name { | ||
| 940 | + position: relative; | ||
| 941 | + top: -4rpx; | ||
| 942 | + margin-left: 6px; | ||
| 943 | +} | ||
| 944 | + | ||
| 945 | +.car_tri_up { | ||
| 946 | + width: 0;height: 0; | ||
| 947 | + border-left: 20rpx solid transparent; | ||
| 948 | + border-right: 20rpx solid transparent; | ||
| 949 | + border-bottom: 20rpx solid #fff; | ||
| 950 | + position: absolute; | ||
| 951 | + right: 20rpx; | ||
| 952 | + top:-10rpx | ||
| 953 | +} | ||
| 954 | +.card_op{ | ||
| 955 | + position: absolute; | ||
| 956 | + right: 20rpx; | ||
| 957 | + top:36rpx | ||
| 958 | +} | ||
| 959 | + | ||
| 960 | + | ||
| 961 | +.tab-container { | ||
| 962 | + font-size: 28rpx; | ||
| 963 | + margin-top: 20rpx; | ||
| 964 | + display: flex; | ||
| 965 | +} | ||
| 966 | + | ||
| 967 | +.tab-wrapper { | ||
| 968 | + background-color: #ccc; | ||
| 969 | + display: flex; | ||
| 970 | + border-radius: 40rpx; | ||
| 971 | + overflow: hidden; | ||
| 972 | +} | ||
| 973 | + | ||
| 974 | +.tab { | ||
| 975 | + padding: 20rpx 30rpx; | ||
| 976 | + | ||
| 977 | +} | ||
| 978 | + | ||
| 979 | + | ||
| 980 | +.tab.active { | ||
| 981 | + background-color: white; | ||
| 982 | + border-radius: 40rpx; | ||
| 983 | +} | 
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js
| @@ -343,9 +343,9 @@ Page({ | @@ -343,9 +343,9 @@ Page({ | ||
| 343 | 343 | ||
| 344 | wx.hideLoading(); | 344 | wx.hideLoading(); | 
| 345 | 345 | ||
| 346 | - wx.setNavigationBarTitle({ | ||
| 347 | - title: "拼团详情", | ||
| 348 | - }); | 346 | + // wx.setNavigationBarTitle({ | 
| 347 | + // title: "拼团详情", | ||
| 348 | + // }); | ||
| 349 | 349 | ||
| 350 | // ee.countDown2(); | 350 | // ee.countDown2(); | 
| 351 | 351 | 
packageC/pages/luckyGo/luckyGo_goodsInfo/buy_pt.wxml
| @@ -195,7 +195,7 @@ | @@ -195,7 +195,7 @@ | ||
| 195 | <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | 195 | <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | 
| 196 | </block> | 196 | </block> | 
| 197 | <block wx:else> | 197 | <block wx:else> | 
| 198 | - <view bindtap="addCart" class="spec-cart-btn spec-buy" data-action="buy">立即购买</view> | 198 | + <view bindtap="addCart_pt" class="spec-cart-btn spec-buy" data-action="buy">立即购买</view> | 
| 199 | </block> | 199 | </block> | 
| 200 | 200 | ||
| 201 | </block> | 201 | </block> | 
| @@ -212,7 +212,7 @@ | @@ -212,7 +212,7 @@ | ||
| 212 | <view class="spec-cart-btn spec-buy w100" style="background-color: #dcdcdc;color: #999;">配送不匹配</view> | 212 | <view class="spec-cart-btn spec-buy w100" style="background-color: #dcdcdc;color: #999;">配送不匹配</view> | 
| 213 | </block> | 213 | </block> | 
| 214 | <block wx:else> | 214 | <block wx:else> | 
| 215 | - <view bindtap="addCart" class="spec-cart-btn spec-buy w100" data-action="buy">确定</view> | 215 | + <view bindtap="addCart_pt" class="spec-cart-btn spec-buy w100" data-action="buy">确定</view> | 
| 216 | </block> | 216 | </block> | 
| 217 | </block> | 217 | </block> | 
| 218 | 218 | 
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
| @@ -303,7 +303,7 @@ Page({ | @@ -303,7 +303,7 @@ Page({ | ||
| 303 | prom_id, | 303 | prom_id, | 
| 304 | }); | 304 | }); | 
| 305 | } | 305 | } | 
| 306 | - console.log('type********>>',this.data.prom_type); | 306 | + // console.log('type********>>',this.data.prom_type); | 
| 307 | //-- 自定义海报 -- | 307 | //-- 自定义海报 -- | 
| 308 | // getApp().request.promiseGet("/api/weshop/goods/poster/page", { | 308 | // getApp().request.promiseGet("/api/weshop/goods/poster/page", { | 
| 309 | // data: { store_id: os.stoid, type: 1, is_use: 1 } | 309 | // data: { store_id: os.stoid, type: 1, is_use: 1 } | 
| @@ -448,7 +448,6 @@ Page({ | @@ -448,7 +448,6 @@ Page({ | ||
| 448 | var user = getApp().globalData.userInfo; | 448 | var user = getApp().globalData.userInfo; | 
| 449 | if (!user) return false; | 449 | if (!user) return false; | 
| 450 | clearInterval(ti); | 450 | clearInterval(ti); | 
| 451 | - | ||
| 452 | if (user.card_field && user['card_expiredate']) { | 451 | if (user.card_field && user['card_expiredate']) { | 
| 453 | var str = user['card_expiredate'].replace(/-/g, '/'); | 452 | var str = user['card_expiredate'].replace(/-/g, '/'); | 
| 454 | var end = new Date(str); | 453 | var end = new Date(str); | 
| @@ -1198,18 +1197,20 @@ Page({ | @@ -1198,18 +1197,20 @@ Page({ | ||
| 1198 | open_ind_store: ind | 1197 | open_ind_store: ind | 
| 1199 | }); | 1198 | }); | 
| 1200 | //如果是秒杀的话,要看redis够不够 | 1199 | //如果是秒杀的话,要看redis够不够 | 
| 1201 | - if (this.data.prom_type == 1) { | ||
| 1202 | - this.getactLen(function (num) { | ||
| 1203 | - if (num < th.data.goodsInputNum) { | ||
| 1204 | - getApp().my_warnning("秒杀库存不足!", 0, th); | ||
| 1205 | - return false; | ||
| 1206 | - } else { | ||
| 1207 | - th.add_cart_func(t); | ||
| 1208 | - } | ||
| 1209 | - }); | ||
| 1210 | - } else { | ||
| 1211 | - th.add_cart_func(t); | ||
| 1212 | - } | 1200 | + // if (this.data.prom_type == 1) { | 
| 1201 | + // this.getactLen(function (num) { | ||
| 1202 | + // if (num < th.data.goodsInputNum) { | ||
| 1203 | + // getApp().my_warnning("秒杀库存不足!", 0, th); | ||
| 1204 | + // return false; | ||
| 1205 | + // } else { | ||
| 1206 | + // th.add_cart_func(t); | ||
| 1207 | + // } | ||
| 1208 | + // }); | ||
| 1209 | + // } else { | ||
| 1210 | + // th.add_cart_func(t); | ||
| 1211 | + // } | ||
| 1212 | + | ||
| 1213 | + th.add_cart_func(t); | ||
| 1213 | }, | 1214 | }, | 
| 1214 | 1215 | ||
| 1215 | 1216 | ||
| @@ -1662,13 +1663,13 @@ Page({ | @@ -1662,13 +1663,13 @@ Page({ | ||
| 1662 | switch (condition_t) { | 1663 | switch (condition_t) { | 
| 1663 | case 0: //按钱 | 1664 | case 0: //按钱 | 
| 1664 | if (newd.goods_price >= condition_t) { | 1665 | if (newd.goods_price >= condition_t) { | 
| 1665 | - newd.prom_type = 3; | 1666 | + newd.prom_type = 9; | 
| 1666 | newd.prom_id = prom_d[i].prom_id; | 1667 | newd.prom_id = prom_d[i].prom_id; | 
| 1667 | } | 1668 | } | 
| 1668 | break | 1669 | break | 
| 1669 | case 1://按购买数量 | 1670 | case 1://按购买数量 | 
| 1670 | if (newd.goods_num >= condition_t) { | 1671 | if (newd.goods_num >= condition_t) { | 
| 1671 | - newd.prom_type = 3; | 1672 | + newd.prom_type = 9; | 
| 1672 | newd.prom_id = prom_d[i].prom_id; | 1673 | newd.prom_id = prom_d[i].prom_id; | 
| 1673 | } | 1674 | } | 
| 1674 | break; | 1675 | break; | 
| @@ -1707,6 +1708,7 @@ Page({ | @@ -1707,6 +1708,7 @@ Page({ | ||
| 1707 | // this.data.shippingCost < 0 || this.data.select.stock <= 0 || (Object.assign(e, { | 1708 | // this.data.shippingCost < 0 || this.data.select.stock <= 0 || (Object.assign(e, { | 
| 1708 | // action: "buy_now" | 1709 | // action: "buy_now" | 
| 1709 | // }), | 1710 | // }), | 
| 1711 | + var th = this; | ||
| 1710 | this.setData({ | 1712 | this.setData({ | 
| 1711 | openSpecModal: 0, | 1713 | openSpecModal: 0, | 
| 1712 | openSpecModal_inte: 0, | 1714 | openSpecModal_inte: 0, | 
| @@ -1714,34 +1716,42 @@ Page({ | @@ -1714,34 +1716,42 @@ Page({ | ||
| 1714 | openSpecModal_pt: 0, | 1716 | openSpecModal_pt: 0, | 
| 1715 | }) | 1717 | }) | 
| 1716 | 1718 | ||
| 1717 | - if (e.prom_type == 9) { | ||
| 1718 | - s.set_b_now(e); | ||
| 1719 | - var url = "/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart?is_bnow=1&goods_id=" + e.goods_id; | ||
| 1720 | - getApp().goto(url); | ||
| 1721 | - } else { | 1719 | + // if (e.prom_type == 9) { | 
| 1720 | + // s.set_b_now(e); | ||
| 1721 | + // // var url = ''; | ||
| 1722 | + // var url = "/pages/cart/cart2/cart2?is_bnow=1&goods_id=" + e.goods_id; | ||
| 1723 | + // getApp().goto(url); | ||
| 1724 | + // } else | ||
| 1725 | + | ||
| 1726 | + // if(e.prom_type == 9){ | ||
| 1727 | + if(true){ | ||
| 1722 | //要判断积分购的普通购买有没有参加优惠活动 | 1728 | //要判断积分购的普通购买有没有参加优惠活动 | 
| 1723 | - if (e.is_integral_normal == 1) { | 1729 | + if (e.is_normal == 1) { | 
| 1724 | this.check_nor_promgood(e.goods_id, function (res) { | 1730 | this.check_nor_promgood(e.goods_id, function (res) { | 
| 1725 | if (res && res.cat_id) { | 1731 | if (res && res.cat_id) { | 
| 1726 | - e.prom_type = 3; | ||
| 1727 | - e.prom_id = res.cat_id | 1732 | + e.prom_type = 0; | 
| 1733 | + e.prom_id = res.cat_id; | ||
| 1728 | } | 1734 | } | 
| 1729 | s.set_b_now(e); | 1735 | s.set_b_now(e); | 
| 1730 | /*-- | 1736 | /*-- | 
| 1731 | wx.redirectTo({ | 1737 | wx.redirectTo({ | 
| 1732 | url: "/pages/cart/cart2/cart2?is_bnow=1&goods_id=" + e.goods_id, | 1738 | url: "/pages/cart/cart2/cart2?is_bnow=1&goods_id=" + e.goods_id, | 
| 1733 | });--*/ | 1739 | });--*/ | 
| 1734 | - getApp().goto("/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart?is_bnow=1&goods_id=" + e.goods_id) | 1740 | + | 
| 1741 | + console.log('11111111111111111111111111======》'); | ||
| 1742 | + getApp().goto("/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart?is_bnow=1&goods_id=" + e.goods_id); | ||
| 1743 | + // getApp().goto("/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart?is_bnow=1&group_id=" + th.data.group_id +"&goods_id=" + e.goods_id + "&alert=" + th.data.luckGoInfo.lc_alert); | ||
| 1735 | 1744 | ||
| 1736 | }) | 1745 | }) | 
| 1737 | } else { | 1746 | } else { | 
| 1738 | - // console.log('xxxxxxxxxxxxx======》', this.data.prom_id); | ||
| 1739 | - s.set_b_now(e); | 1747 | + //console.log('222222222222222222222222222222======》'); | 
| 1748 | + //s.set_b_now(e); | ||
| 1740 | /*-- | 1749 | /*-- | 
| 1741 | wx.redirectTo({ | 1750 | wx.redirectTo({ | 
| 1742 | url: "/pages/cart/cart2/cart2?is_bnow=1&goods_id=" + e.goods_id, | 1751 | url: "/pages/cart/cart2/cart2?is_bnow=1&goods_id=" + e.goods_id, | 
| 1743 | });--*/ | 1752 | });--*/ | 
| 1744 | - getApp().goto("/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart?is_bnow=1&group_id=" + this.data.group_id +"&goods_id=" + e.goods_id + "&alert=" + this.data.luckGoInfo.lc_alert); | 1753 | + //getApp().goto("/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct?is_bnow=1&goods_id=" + e.goods_id) | 
| 1754 | + // getApp().goto("/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct?is_bnow=1&group_id=" + this.data.group_id +"&goods_id=" + e.goods_id + "&alert=" + this.data.luckGoInfo.lc_alert); | ||
| 1745 | } | 1755 | } | 
| 1746 | 1756 | ||
| 1747 | } | 1757 | } | 
| @@ -3756,6 +3766,9 @@ Page({ | @@ -3756,6 +3766,9 @@ Page({ | ||
| 3756 | 3766 | ||
| 3757 | var th = this; | 3767 | var th = this; | 
| 3758 | var ind = parseInt(e.currentTarget.dataset.ind); | 3768 | var ind = parseInt(e.currentTarget.dataset.ind); | 
| 3769 | + | ||
| 3770 | + console.log('当前ind========>>>>', ind); | ||
| 3771 | + | ||
| 3759 | //ind == 1是普通购买 | 3772 | //ind == 1是普通购买 | 
| 3760 | if (ind == 1) { | 3773 | if (ind == 1) { | 
| 3761 | //如果拼单的sku data是空的,就要先获取一下 | 3774 | //如果拼单的sku data是空的,就要先获取一下 | 
| @@ -3845,18 +3858,17 @@ Page({ | @@ -3845,18 +3858,17 @@ Page({ | ||
| 3845 | 3858 | ||
| 3846 | //-----------------拼单生成方法--------------------- | 3859 | //-----------------拼单生成方法--------------------- | 
| 3847 | addCart_pt: function () { | 3860 | addCart_pt: function () { | 
| 3848 | - var th = this; | ||
| 3849 | if (this.data.is_normal == 0) { | 3861 | if (this.data.is_normal == 0) { | 
| 3850 | //看一下有没有起购数,如果有起购数,要计算起购数 | 3862 | //看一下有没有起购数,如果有起购数,要计算起购数 | 
| 3851 | - var qnum = parseFloat(th.data.prom_act.minbuynum); | ||
| 3852 | - if (qnum > 0 && th.data.goodsInputNum < qnum) { | ||
| 3853 | - getApp().confirmBox("拼团商品至少要买" + qnum + "件!"); | ||
| 3854 | - return false; | ||
| 3855 | - } | 3863 | + // var qnum = parseFloat(th.data.prom_act.minbuynum); | 
| 3864 | + // if (qnum > 0 && th.data.goodsInputNum < qnum) { | ||
| 3865 | + // getApp().confirmBox("拼团商品至少要买" + qnum + "件!"); | ||
| 3866 | + // return false; | ||
| 3867 | + // } | ||
| 3856 | 3868 | ||
| 3857 | - th.addcart_pt_func(); | 3869 | + this.addcart_pt_func(); | 
| 3858 | } else { | 3870 | } else { | 
| 3859 | - th.addcart_pt_func(); | 3871 | + this.addcart_pt_func(); | 
| 3860 | } | 3872 | } | 
| 3861 | }, | 3873 | }, | 
| 3862 | 3874 | ||
| @@ -3868,73 +3880,75 @@ Page({ | @@ -3868,73 +3880,75 @@ Page({ | ||
| 3868 | var e = this, | 3880 | var e = this, | 
| 3869 | th = e, | 3881 | th = e, | 
| 3870 | o = this.data.sele_g; | 3882 | o = this.data.sele_g; | 
| 3871 | - if (o.store_count <= 0) return s.my_warnning("库存已为空!", 0, th); | 3883 | + // if (o.store_count <= 0) return s.my_warnning("库存已为空!", 0, th); | 
| 3872 | 3884 | ||
| 3873 | //----------添加到购物车时,要判断限购数量,-------- | 3885 | //----------添加到购物车时,要判断限购数量,-------- | 
| 3874 | e.get_buy_num(o, async function (ee) { | 3886 | e.get_buy_num(o, async function (ee) { | 
| 3875 | 3887 | ||
| 3876 | //---判断商品是否超出限购--- | 3888 | //---判断商品是否超出限购--- | 
| 3877 | - if (th.data.g_buy_num != null && th.data.sele_g.viplimited > 0) { | ||
| 3878 | - if (th.data.goodsInputNum + th.data.g_buy_num.get(th.data.sele_g.goods_id) > th.data.sele_g.viplimited) { | ||
| 3879 | - wx.showModal({ | ||
| 3880 | - title: '提示', | ||
| 3881 | - content: '超出商品限购' | ||
| 3882 | - }); | ||
| 3883 | - | ||
| 3884 | - var num = th.data.prom_buy_limit - th.data.prom_buy_num; | ||
| 3885 | - if (num < 0) num = 0; | ||
| 3886 | - th.setData({ goodsInputNum: num }) | ||
| 3887 | - return false; | ||
| 3888 | - } | ||
| 3889 | - } | 3889 | + // if (th.data.g_buy_num != null && th.data.sele_g.viplimited > 0) { | 
| 3890 | + // if (th.data.goodsInputNum + th.data.g_buy_num.get(th.data.sele_g.goods_id) > th.data.sele_g.viplimited) { | ||
| 3891 | + // wx.showModal({ | ||
| 3892 | + // title: '提示', | ||
| 3893 | + // content: '超出商品限购' | ||
| 3894 | + // }); | ||
| 3895 | + | ||
| 3896 | + // var num = th.data.prom_buy_limit - th.data.prom_buy_num; | ||
| 3897 | + // if (num < 0) num = 0; | ||
| 3898 | + // th.setData({ goodsInputNum: num }) | ||
| 3899 | + // return false; | ||
| 3900 | + // } | ||
| 3901 | + // } | ||
| 3902 | + | ||
| 3890 | //---判断商品是否超出活动限购,拼团的普通购买不计算活动的限购--- | 3903 | //---判断商品是否超出活动限购,拼团的普通购买不计算活动的限购--- | 
| 3891 | - if (th.data.prom_buy_num != -1 && th.data.prom_buy_limit > 0 && th.data.is_normal != 1) { | ||
| 3892 | - if (th.data.goodsInputNum + th.data.prom_buy_num > th.data.prom_buy_limit) { | ||
| 3893 | - wx.showModal({ | ||
| 3894 | - title: '提示', | ||
| 3895 | - content: '超出商品活动限购' | ||
| 3896 | - }); | ||
| 3897 | - | ||
| 3898 | - var num = th.data.prom_buy_limit - th.data.prom_buy_num; | ||
| 3899 | - if (num < 0) num = 0; | ||
| 3900 | - th.setData({ goodsInputNum: num }) | ||
| 3901 | - return false; | ||
| 3902 | - } | ||
| 3903 | - } | 3904 | + // if (th.data.prom_buy_num != -1 && th.data.prom_buy_limit > 0 && th.data.is_normal != 1) { | 
| 3905 | + // if (th.data.goodsInputNum + th.data.prom_buy_num > th.data.prom_buy_limit) { | ||
| 3906 | + // wx.showModal({ | ||
| 3907 | + // title: '提示', | ||
| 3908 | + // content: '超出商品活动限购' | ||
| 3909 | + // }); | ||
| 3910 | + | ||
| 3911 | + // var num = th.data.prom_buy_limit - th.data.prom_buy_num; | ||
| 3912 | + // if (num < 0) num = 0; | ||
| 3913 | + // th.setData({ goodsInputNum: num }) | ||
| 3914 | + // return false; | ||
| 3915 | + // } | ||
| 3916 | + // } | ||
| 3904 | 3917 | ||
| 3905 | var redis_num = 0 | 3918 | var redis_num = 0 | 
| 3906 | //不是普通购买的时候 | 3919 | //不是普通购买的时候 | 
| 3907 | - if (th.data.is_normal != 1) { | ||
| 3908 | - //-------判断活动是否抢光--------- | ||
| 3909 | - await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/6/" + th.data.sele_g.prom_id, { | ||
| 3910 | - 1: 1 | ||
| 3911 | - }).then(res => { | ||
| 3912 | - redis_num = res.data.data; | ||
| 3913 | - }) | ||
| 3914 | - | ||
| 3915 | - if (th.data.goodsInputNum > redis_num) { | ||
| 3916 | - wx.showModal({ | ||
| 3917 | - title: '提示', | ||
| 3918 | - content: '超出商品活动库存' | ||
| 3919 | - }); | 3920 | + // if (th.data.is_normal != 1) { | 
| 3921 | + // //-------判断活动是否抢光--------- | ||
| 3922 | + // await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/6/" + th.data.sele_g.prom_id, { | ||
| 3923 | + // 1: 1 | ||
| 3924 | + // }).then(res => { | ||
| 3925 | + // redis_num = res.data.data; | ||
| 3926 | + // }) | ||
| 3927 | + | ||
| 3928 | + // if (th.data.goodsInputNum > redis_num) { | ||
| 3929 | + // wx.showModal({ | ||
| 3930 | + // title: '提示', | ||
| 3931 | + // content: '超出商品活动库存' | ||
| 3932 | + // }); | ||
| 3933 | + | ||
| 3934 | + // th.setData({ goodsInputNum: redis_num }) | ||
| 3935 | + | ||
| 3936 | + // return false; | ||
| 3937 | + // } | ||
| 3938 | + // } | ||
| 3920 | 3939 | ||
| 3921 | - th.setData({ goodsInputNum: redis_num }) | ||
| 3922 | - | ||
| 3923 | - return false; | ||
| 3924 | - } | ||
| 3925 | - } | ||
| 3926 | - | ||
| 3927 | - if (th.data.goodsInputNum <= 0) return s.my_warnning("商品数量不能为0", 0, th); | ||
| 3928 | - if (th.data.goodsInputNum > o.store_count) { | ||
| 3929 | - th.setData({ goodsInputNum: o.store_count }) | ||
| 3930 | - return s.my_warnning("超出商品库存", 0, th); | ||
| 3931 | - } | 3940 | + // if (th.data.goodsInputNum <= 0) return s.my_warnning("商品数量不能为0", 0, th); | 
| 3941 | + // if (th.data.goodsInputNum > o.store_count) { | ||
| 3942 | + // th.setData({ goodsInputNum: o.store_count }) | ||
| 3943 | + // return s.my_warnning("超出商品库存", 0, th); | ||
| 3944 | + // } | ||
| 3932 | 3945 | ||
| 3933 | if (th.data.sto_sele_name == null || th.data.sto_sele_name == undefined) | 3946 | if (th.data.sto_sele_name == null || th.data.sto_sele_name == undefined) | 
| 3934 | this.setData({ | 3947 | this.setData({ | 
| 3935 | sto_sele_name: "" | 3948 | sto_sele_name: "" | 
| 3936 | }); | 3949 | }); | 
| 3937 | if (th.data.sto_sele_name == "") return s.my_warnning("请选择门店", 0, th); | 3950 | if (th.data.sto_sele_name == "") return s.my_warnning("请选择门店", 0, th); | 
| 3951 | + | ||
| 3938 | //--------------此时操作的数据------------ | 3952 | //--------------此时操作的数据------------ | 
| 3939 | var newd = { | 3953 | var newd = { | 
| 3940 | goods_id: o.goods_id, | 3954 | goods_id: o.goods_id, | 
| @@ -4006,10 +4020,12 @@ Page({ | @@ -4006,10 +4020,12 @@ Page({ | ||
| 4006 | th.data.sto_sele_distr = 1; | 4020 | th.data.sto_sele_distr = 1; | 
| 4007 | } | 4021 | } | 
| 4008 | 4022 | ||
| 4009 | - } else if (th.data.prom_type == 3) { | ||
| 4010 | - newd.prom_type = 0; | ||
| 4011 | - newd.prom_id = 0; | ||
| 4012 | } | 4023 | } | 
| 4024 | + | ||
| 4025 | + // else if (th.data.prom_type == 3) { | ||
| 4026 | + // newd.prom_type = 0; | ||
| 4027 | + // newd.prom_id = 0; | ||
| 4028 | + // } | ||
| 4013 | 4029 | ||
| 4014 | newd['pick_name'] = th.data.sto_sele_name; | 4030 | newd['pick_name'] = th.data.sto_sele_name; | 
| 4015 | newd['pick_dis'] = th.data.sto_sele_distr; | 4031 | newd['pick_dis'] = th.data.sto_sele_distr; | 
| @@ -4020,21 +4036,27 @@ Page({ | @@ -4020,21 +4036,27 @@ Page({ | ||
| 4020 | //判断一下有没有全局优惠活动 | 4036 | //判断一下有没有全局优惠活动 | 
| 4021 | th.check_nor_promgood(newd.goods_id, function (e) { | 4037 | th.check_nor_promgood(newd.goods_id, function (e) { | 
| 4022 | if (e && e.act_id) { | 4038 | if (e && e.act_id) { | 
| 4023 | - newd['prom_type'] = 3; | 4039 | + newd['prom_type'] = 0; | 
| 4024 | newd['prom_id'] = e.act_id; | 4040 | newd['prom_id'] = e.act_id; | 
| 4025 | } | 4041 | } | 
| 4026 | - th.buyNow(newd) | ||
| 4027 | - }) | 4042 | + console.log('aaaaa'); | 
| 4043 | + th.buyNow(newd); | ||
| 4044 | + }); | ||
| 4028 | } | 4045 | } | 
| 4029 | - else th.buyNow_pt(newd); | 4046 | + else { | 
| 4047 | + console.log('bbbb'); | ||
| 4048 | + th.buyNow_pt(newd); | ||
| 4049 | + }; | ||
| 4030 | }) | 4050 | }) | 
| 4031 | }, | 4051 | }, | 
| 4032 | //----------立即购买_pt----------- | 4052 | //----------立即购买_pt----------- | 
| 4033 | buyNow_pt: function (e) { | 4053 | buyNow_pt: function (e) { | 
| 4034 | s.set_b_now(e); | 4054 | s.set_b_now(e); | 
| 4035 | wx.navigateTo({ | 4055 | wx.navigateTo({ | 
| 4036 | - url: "/packageC/pages/luckyGo_cart/luckyGo_cart/luckyGo_cart?is_bnow=1&goods_id=" + e.goods_id, | 4056 | + url: "/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct?is_bnow=1&group_id=" + this.data.group_id +"&goods_id=" + e.goods_id + "&alert=" + this.data.luckGoInfo.lc_alert + '&goods_price=' + this.data.luckGoInfo.group_price/100, | 
| 4037 | }); | 4057 | }); | 
| 4058 | + | ||
| 4059 | + // getApp().goto("/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart?is_bnow=1&group_id=" + th.data.group_id +"&goods_id=" + e.goods_id + "&alert=" + th.data.luckGoInfo.lc_alert); | ||
| 4038 | }, | 4060 | }, | 
| 4039 | 4061 | ||
| 4040 | //-------跳转pt商品------- | 4062 | //-------跳转pt商品------- | 
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
| @@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
| 5 | 5 | ||
| 6 | 6 | ||
| 7 | <!-- 商品内容区域,普通商品,秒杀,拼团 --> | 7 | <!-- 商品内容区域,普通商品,秒杀,拼团 --> | 
| 8 | -<block> | 8 | +<block wx:if="{{isshow}}"> | 
| 9 | <view class="container"> | 9 | <view class="container"> | 
| 10 | <!-- 幸运购规则 --> | 10 | <!-- 幸运购规则 --> | 
| 11 | <view class="rules" bindtap="showRules">规则</view> | 11 | <view class="rules" bindtap="showRules">规则</view> | 
| @@ -71,7 +71,35 @@ | @@ -71,7 +71,35 @@ | ||
| 71 | </block> | 71 | </block> | 
| 72 | </view> | 72 | </view> | 
| 73 | </view> | 73 | </view> | 
| 74 | - <!-- --显示秒杀价,团购,积分购-- --> | 74 | + | 
| 75 | + <!-- --显示秒杀价 --> | ||
| 76 | + <view class="prom_show rel" wx:if="{{prom_type==1}}"> | ||
| 77 | + <image class="secondkill-img" src='{{prom_st==1? iurl+"/miniapp/images/red_jx.png":iurl+"/miniapp/images/blue_ks.png"}}'></image> | ||
| 78 | + <image class="abs spike-img" src="{{iurl}}/miniapp/images/xsmiaosha.png"></image> | ||
| 79 | + <view class="stop fs26 abs" wx:if="{{prom_st==1}}">距活动结束还有</view> | ||
| 80 | + <view class="start fs26 abs" wx:if="{{prom_st==2}}">距活动开始还有</view> | ||
| 81 | + <view class="secview flex abs fs24 xc-miaosha-time"> | ||
| 82 | + <block wx:if="djs.day"> | ||
| 83 | + <view class='day-val' style="color:{{prom_st==1?'#d40022':'#0097e0'}}"> | ||
| 84 | + {{djs.day}} | ||
| 85 | + </view> | ||
| 86 | + <view class="day white" style="color: {{prom_st==1?'#d40022':'#0097e0'}}">天</view> | ||
| 87 | + </block> | ||
| 88 | + <view class='time-val white t-c' style=" background:{{prom_st==1?'#d40022':'#0097e0'}}"> | ||
| 89 | + {{djs.hou}} | ||
| 90 | + </view> | ||
| 91 | + <view class="time" style="color: {{prom_st==1?'#d40022':'#0097e0'}}">时</view> | ||
| 92 | + <view class='time-val white t-c' style=" background:{{prom_st==1?'#d40022':'#0097e0'}}"> | ||
| 93 | + {{djs.min}} | ||
| 94 | + </view> | ||
| 95 | + <view class="time" style="color: {{prom_st==1?'#d40022':'#0097e0'}}">分</view> | ||
| 96 | + <view class='time-val white t-c' style=";background:{{prom_st==1?'#d40022':'#0097e0'}}"> | ||
| 97 | + {{djs.sec}} | ||
| 98 | + </view> | ||
| 99 | + <view class="time" style="color: {{prom_st==1?'#d40022':'#0097e0'}}">秒</view> | ||
| 100 | + </view> | ||
| 101 | + </view> | ||
| 102 | + | ||
| 75 | 103 | ||
| 76 | 104 | ||
| 77 | <!-- --拼单-- --> | 105 | <!-- --拼单-- --> | 
| @@ -82,22 +110,15 @@ | @@ -82,22 +110,15 @@ | ||
| 82 | <view class="abs xc-qt-price"> | 110 | <view class="abs xc-qt-price"> | 
| 83 | <view class="flex" style='height:40rpx; margin-top:5rpx'> | 111 | <view class="flex" style='height:40rpx; margin-top:5rpx'> | 
| 84 | <view class="flex fs35 xc-qtsign">¥</view> | 112 | <view class="flex fs35 xc-qtsign">¥</view> | 
| 85 | - <view class="fs50 val">{{filters.toFix(data.shop_price,2)}}</view> | 113 | + <!-- <view class="fs50 val">{{filters.toFix(data.shop_price,2)}}</view> --> | 
| 114 | + <view class="fs50 val">{{filters.toFix(luckGoInfo.group_price/100,2)}}</view> | ||
| 86 | </view> | 115 | </view> | 
| 87 | <view class="word-line fs20 xc-qtunit-price"> | 116 | <view class="word-line fs20 xc-qtunit-price"> | 
| 88 | - 零售价¥{{filters.toFix(data.market_price,2)}} | 117 | + 手店价¥{{filters.toFix(data.shop_price,2)}} | 
| 89 | </view> | 118 | </view> | 
| 90 | </view> | 119 | </view> | 
| 91 | 120 | ||
| 92 | - <!-- <view class="abs white xc-nanber"> | ||
| 93 | - <text class="fs22">已拼{{prom_act.buy_num}}件</text> | ||
| 94 | - <view class="flex" style='margin-top:-34rpx'> | ||
| 95 | - <view class="xc-people-img"> | ||
| 96 | - <image class="imgs" src="{{prom_st==1? iurl+'/miniapp/images/r_logo_red.png':iurl+'/miniapp/images/r_logo.png'}}"></image> | ||
| 97 | - </view> | ||
| 98 | - <view class="t-s fs20 xc-people-val">{{prom_act.ct_num}}人拼</view> | ||
| 99 | - </view> | ||
| 100 | - </view> --> | 121 | + | 
| 101 | 122 | ||
| 102 | <!-- 幸运购 --> | 123 | <!-- 幸运购 --> | 
| 103 | <view class="abs white xc-nanber"> | 124 | <view class="abs white xc-nanber"> | 
| @@ -883,13 +904,13 @@ | @@ -883,13 +904,13 @@ | ||
| 883 | <!-- 线上销售的时候,要判断库存量, 线下库存的时候不用判断 --> | 904 | <!-- 线上销售的时候,要判断库存量, 线下库存的时候不用判断 --> | 
| 884 | <block wx:if="{{(sele_g.store_count>0 && sales_rules==1) || sales_rules==2 }}"> | 905 | <block wx:if="{{(sele_g.store_count>0 && sales_rules==1) || sales_rules==2 }}"> | 
| 885 | <view class="btn-container f1"> | 906 | <view class="btn-container f1"> | 
| 886 | - <view bindtap="openSpecModel_pt" data-ind="1" class="btn-yellow flex f1 fdc jc-center"> | ||
| 887 | - <view class="lh1"><text class="rmb lh1">{{filters.toFix(data.market_price,2)}}</text></view> | 907 | + <view bindtap="openSpecModel_pt" data-ind="1" data-it="1" class="btn-yellow flex f1 fdc jc-center"> | 
| 908 | + <view class="lh1"><text class="rmb lh1">{{filters.toFix(data.shop_price,2)}}</text></view> | ||
| 888 | <view class="lh1 fs pdt4">单独购买</view> | 909 | <view class="lh1 fs pdt4">单独购买</view> | 
| 889 | </view> | 910 | </view> | 
| 890 | <!-- data-ind="2" --> | 911 | <!-- data-ind="2" --> | 
| 891 | <!-- openSpecModel_pt --> | 912 | <!-- openSpecModel_pt --> | 
| 892 | - <view class="btn-red f1 flex ai-center jc-center" bindtap="openSpecModel_pt" data-openSpecModal_ind="{{openSpecModal_ind}}" data-action="buy" data-ind="0">立即参团</view> | 913 | + <view class="btn-red f1 flex ai-center jc-center" bindtap="openSpecModel_pt"data-it="0">立即参团</view> | 
| 893 | <!-- <view class="btn-red f1 flex ai-center jc-center" bindtap="addCart" data-openSpecModal_ind="{{openSpecModal_ind}}" data-action="buy">立即参团</view> --> | 914 | <!-- <view class="btn-red f1 flex ai-center jc-center" bindtap="addCart" data-openSpecModal_ind="{{openSpecModal_ind}}" data-action="buy">立即参团</view> --> | 
| 894 | </view> | 915 | </view> | 
| 895 | <!-- <view bindtap="openSpecModel" data-ind="1" class="btn-buy flex fdc jc-center"> | 916 | <!-- <view bindtap="openSpecModel" data-ind="1" class="btn-buy flex fdc jc-center"> | 
| @@ -919,27 +940,26 @@ | @@ -919,27 +940,26 @@ | ||
| 919 | </block> | 940 | </block> | 
| 920 | </block> --> | 941 | </block> --> | 
| 921 | <!-- -----拼单------ --> | 942 | <!-- -----拼单------ --> | 
| 922 | - <block wx:if="{{prom_type == 6}}"> | 943 | + <!-- <block wx:if="{{prom_type == 6}}"> | 
| 923 | <view bindtap="openSpecModel_pt" data-it="1" data-ind="1" class="join-btn cart-btn line-h"> | 944 | <view bindtap="openSpecModel_pt" data-it="1" data-ind="1" class="join-btn cart-btn line-h"> | 
| 924 | <view class="fir-v"> | 945 | <view class="fir-v"> | 
| 925 | - <!-- ¥{{data.shop_price,2)}} --> | ||
| 926 | <block wx:if="{{card_field && sele_g[card_field]>0}}"> | 946 | <block wx:if="{{card_field && sele_g[card_field]>0}}"> | 
| 927 | {{filters.toFix(sele_g[card_field],2)}} | 947 | {{filters.toFix(sele_g[card_field],2)}} | 
| 928 | </block> | 948 | </block> | 
| 929 | <block wx:else>{{filters.toFix(sele_g.shop_price,2)}}</block> | 949 | <block wx:else>{{filters.toFix(sele_g.shop_price,2)}}</block> | 
| 930 | </view> | 950 | </view> | 
| 931 | <view>单独购买</view> | 951 | <view>单独购买</view> | 
| 932 | - </view> | ||
| 933 | - <block wx:if="{{user_order_pt_state==0}}"> | 952 | + </view> --> | 
| 953 | + <!-- <block wx:if="{{user_order_pt_state==0}}"> --> | ||
| 934 | <!-- --商家团-- --> | 954 | <!-- --商家团-- --> | 
| 935 | - <view bindtap="openSpecModel_pt" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==1}}" class="buy-btn cart-btn line-h"> | 955 | + <!-- <view bindtap="openSpecModel_pt" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==1}}" class="buy-btn cart-btn line-h"> | 
| 936 | <view class="fir-v">¥{{prom_act.price}}</view> | 956 | <view class="fir-v">¥{{prom_act.price}}</view> | 
| 937 | <view>去参团</view> | 957 | <view>去参团</view> | 
| 938 | - </view> | 958 | + </view> --> | 
| 939 | <!-- --会员团-- --> | 959 | <!-- --会员团-- --> | 
| 940 | - <view bindtap="openSpecModel_pt" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==2}}" class="buy-btn cart-btn line-h"> | 960 | + <!-- <view bindtap="openSpecModel_pt" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==2}}" class="buy-btn cart-btn line-h"> --> | 
| 941 | <!-- <view class="fir-v">¥{{prom_act.price}}</view> --> | 961 | <!-- <view class="fir-v">¥{{prom_act.price}}</view> --> | 
| 942 | - <view class="pd_top1" wx:if="{{prom_act.tz_yhjgtype>1}}"> | 962 | + <!-- <view class="pd_top1" wx:if="{{prom_act.tz_yhjgtype>1}}"> | 
| 943 | <view>一键开团</view> | 963 | <view>一键开团</view> | 
| 944 | <view wx:if="{{prom_act.tz_yhjgtype==3}}"> | 964 | <view wx:if="{{prom_act.tz_yhjgtype==3}}"> | 
| 945 | 佣金 | 965 | 佣金 | 
| @@ -952,17 +972,17 @@ | @@ -952,17 +972,17 @@ | ||
| 952 | <view class="fir-v">¥{{ filters.toFix(prom_act.price,2)}}</view> | 972 | <view class="fir-v">¥{{ filters.toFix(prom_act.price,2)}}</view> | 
| 953 | <view>一键开团</view> | 973 | <view>一键开团</view> | 
| 954 | </view> | 974 | </view> | 
| 955 | - </view> | 975 | + </view> --> | 
| 956 | <!-- -阶梯团-- --> | 976 | <!-- -阶梯团-- --> | 
| 957 | - <view bindtap="openSpecModel_pt" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==3 && user_order_pt_state!=3 }}" class="buy-btn cart-btn line-h"> | 977 | + <!-- <view bindtap="openSpecModel_pt" data-it="0" wx:if="{{prom_st==1 && !prom_r_null && prom_act.kttype==3 && user_order_pt_state!=3 }}" class="buy-btn cart-btn line-h"> | 
| 958 | <view class="fir-v">¥{{filters.toFix(prom_act.yf_price,2)}}</view> | 978 | <view class="fir-v">¥{{filters.toFix(prom_act.yf_price,2)}}</view> | 
| 959 | <view>支付定金</view> | 979 | <view>支付定金</view> | 
| 960 | </view> | 980 | </view> | 
| 961 | <view wx:if="{{prom_st==0}}" class="buy-btn cart-btn lanse">即将开始</view> | 981 | <view wx:if="{{prom_st==0}}" class="buy-btn cart-btn lanse">即将开始</view> | 
| 962 | <view wx:if="{{prom_r_null}}" class="buy-btn cart-btn huise">已抢光</view> | 982 | <view wx:if="{{prom_r_null}}" class="buy-btn cart-btn huise">已抢光</view> | 
| 963 | - <view wx:if="{{prom_st==3 && !prom_r_null}}" class="buy-btn cart-btn lanse">活动已经结束</view> | ||
| 964 | - </block> | ||
| 965 | - <block wx:else> | 983 | + <view wx:if="{{prom_st==3 && !prom_r_null}}" class="buy-btn cart-btn lanse">活动已经结束</view> --> | 
| 984 | + <!-- </block> --> | ||
| 985 | + <!-- <block wx:else> | ||
| 966 | <view bindtap="go_to_nopay" wx:if="{{user_order_pt_state==1}}" class="buy-btn cart-btn huise"> | 986 | <view bindtap="go_to_nopay" wx:if="{{user_order_pt_state==1}}" class="buy-btn cart-btn huise"> | 
| 967 | 您还未支付 | 987 | 您还未支付 | 
| 968 | </view> | 988 | </view> | 
| @@ -972,10 +992,10 @@ | @@ -972,10 +992,10 @@ | ||
| 972 | <view wx:if="{{user_order_pt_state==3}}" bindtap="go_pay_wk" class="buy-btn cart-btn"> | 992 | <view wx:if="{{user_order_pt_state==3}}" bindtap="go_pay_wk" class="buy-btn cart-btn"> | 
| 973 | 支付尾款 | 993 | 支付尾款 | 
| 974 | </view> | 994 | </view> | 
| 975 | - </block> | ||
| 976 | - </block> | 995 | + </block> --> | 
| 996 | + <!-- </block> --> | ||
| 977 | <!-- -----积分购------ --> | 997 | <!-- -----积分购------ --> | 
| 978 | - <block wx:if="{{prom_type == 4}}"> | 998 | + <!-- <block wx:if="{{prom_type == 4}}"> | 
| 979 | <block wx:if="{{is_shopbuy}}"> | 999 | <block wx:if="{{is_shopbuy}}"> | 
| 980 | <view bindtap="go_pay_integral_normal" class="join-btn cart-btn line-h"> | 1000 | <view bindtap="go_pay_integral_normal" class="join-btn cart-btn line-h"> | 
| 981 | <view class="fir-v"> | 1001 | <view class="fir-v"> | 
| @@ -999,7 +1019,7 @@ | @@ -999,7 +1019,7 @@ | ||
| 999 | 积分不足 | 1019 | 积分不足 | 
| 1000 | </view> | 1020 | </view> | 
| 1001 | </block> | 1021 | </block> | 
| 1002 | - </block> | 1022 | + </block> --> | 
| 1003 | <!-- -<view bindtap="openSpecModel" class="buy-btn cart-btn cart-btn-lg" wx:else>立即兑换</view> --> | 1023 | <!-- -<view bindtap="openSpecModel" class="buy-btn cart-btn cart-btn-lg" wx:else>立即兑换</view> --> | 
| 1004 | </view> | 1024 | </view> | 
| 1005 | <!-- 制作一个圆球导航 --> | 1025 | <!-- 制作一个圆球导航 --> | 
