Commit 9f9035a5a51bcd890210fb72400a19abdc9bb692
1 parent
5a439273
卡项列表和卡项详情
Showing
13 changed files
with
9988 additions
and
8 deletions
packageA/pages/cardList/cardList.js
| @@ -26,6 +26,7 @@ Page({ | @@ -26,6 +26,7 @@ Page({ | ||
| 26 | app.isLogin().then(function(data) {//进入页面前已经授权登录成功 | 26 | app.isLogin().then(function(data) {//进入页面前已经授权登录成功 |
| 27 | self.setData({ | 27 | self.setData({ |
| 28 | userInfo: data, | 28 | userInfo: data, |
| 29 | + imghost: app.globalData.setting.imghost, | ||
| 29 | }); | 30 | }); |
| 30 | }); | 31 | }); |
| 31 | }, | 32 | }, |
| @@ -52,6 +53,41 @@ Page({ | @@ -52,6 +53,41 @@ Page({ | ||
| 52 | }); | 53 | }); |
| 53 | 54 | ||
| 54 | this.getData(true, url, currentQuery); | 55 | this.getData(true, url, currentQuery); |
| 56 | + | ||
| 57 | + // app.request.promiseGet("/api/weshop/ad/page?pid=2&store_id=" + app.globalData.setting.stoid, { | ||
| 58 | + // data: { | ||
| 59 | + // enabled: 1 | ||
| 60 | + // } | ||
| 61 | + // }).then(res => { | ||
| 62 | + // console.log('res==>1', res); | ||
| 63 | + // }); | ||
| 64 | + | ||
| 65 | + | ||
| 66 | + app.request.promiseGet("/api/weshop/ad/page?pid=2&store_id=" + app.globalData.setting.stoid, { | ||
| 67 | + data: { | ||
| 68 | + enabled: 1 | ||
| 69 | + } | ||
| 70 | + }).then(res => { | ||
| 71 | + | ||
| 72 | + if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0){ | ||
| 73 | + var a = res.data.data.pageData; | ||
| 74 | + var arr = new Array(); | ||
| 75 | + for (var i = 0; i < a.length; i++) { | ||
| 76 | + var tt = { | ||
| 77 | + 'ad_code': self.data.imghost + a[i].ad_code, | ||
| 78 | + 'media_link': '', | ||
| 79 | + 'ad_weapplink':a[i].ad_weapplink | ||
| 80 | + }; | ||
| 81 | + arr.push(tt); | ||
| 82 | + } | ||
| 83 | + if (arr.length > 0) self.setData({ | ||
| 84 | + banner: arr, | ||
| 85 | + }); | ||
| 86 | + console.log('banner==>', arr); | ||
| 87 | + wx.stopPullDownRefresh(); | ||
| 88 | + } | ||
| 89 | + }) | ||
| 90 | + | ||
| 55 | }; | 91 | }; |
| 56 | }; | 92 | }; |
| 57 | }, | 93 | }, |
| @@ -81,7 +117,7 @@ Page({ | @@ -81,7 +117,7 @@ Page({ | ||
| 81 | * 页面上拉触底事件的处理函数 | 117 | * 页面上拉触底事件的处理函数 |
| 82 | */ | 118 | */ |
| 83 | onReachBottom: function () { | 119 | onReachBottom: function () { |
| 84 | - | 120 | + this.scrollToLower('/api/weshop/serviceCard/page', this.data.currentQuery); |
| 85 | }, | 121 | }, |
| 86 | 122 | ||
| 87 | /** | 123 | /** |
| @@ -172,4 +208,10 @@ Page({ | @@ -172,4 +208,10 @@ Page({ | ||
| 172 | }); | 208 | }); |
| 173 | }; | 209 | }; |
| 174 | }, | 210 | }, |
| 211 | + | ||
| 212 | + go_goods: function(e) { | ||
| 213 | + var gid = e.currentTarget.dataset.gid; | ||
| 214 | + var url = "/packageA/pages/goodsInfo/goodsInfo?goods_id=" + gid; | ||
| 215 | + app.goto(url); | ||
| 216 | + }, | ||
| 175 | }) | 217 | }) |
| 176 | \ No newline at end of file | 218 | \ No newline at end of file |
packageA/pages/cardList/cardList.json
packageA/pages/cardList/cardList.wxml
| 1 | <view class="page"> | 1 | <view class="page"> |
| 2 | <swiper class="swiper" autoplay indicator-dots circular easing-function="easeOutCubic"> | 2 | <swiper class="swiper" autoplay indicator-dots circular easing-function="easeOutCubic"> |
| 3 | - <swiper-item>123</swiper-item> | ||
| 4 | - <swiper-item>234</swiper-item> | ||
| 5 | - <swiper-item>345</swiper-item> | 3 | + <swiper-item wx:for="{{banner}}"><image src="{{item.ad_code}}" class="swiper-img"/></swiper-item> |
| 4 | + <!-- <swiper-item>234</swiper-item> | ||
| 5 | + <swiper-item>345</swiper-item> --> | ||
| 6 | </swiper> | 6 | </swiper> |
| 7 | 7 | ||
| 8 | <scroll-view class="scroll-view" scroll-y> | 8 | <scroll-view class="scroll-view" scroll-y> |
| @@ -18,14 +18,14 @@ | @@ -18,14 +18,14 @@ | ||
| 18 | </view> | 18 | </view> |
| 19 | <view class="flex space-bt ali-c"> | 19 | <view class="flex space-bt ali-c"> |
| 20 | <view class="price">{{item.money}}</view> | 20 | <view class="price">{{item.money}}</view> |
| 21 | - <view class="btn-details">卡项详情</view> | 21 | + <view class="btn-details" bindtap="go_goods" data-gid="{{item.id}}">卡项详情</view> |
| 22 | </view> | 22 | </view> |
| 23 | </view> | 23 | </view> |
| 24 | </view> | 24 | </view> |
| 25 | 25 | ||
| 26 | - <nodata class="t-c"></nodata> | 26 | + <nodata class="t-c" wx:if="{{list.pageData.length == 0 || list == null}}"></nodata> |
| 27 | </view> | 27 | </view> |
| 28 | <!-- <nodata class="t-c" wx:if="{{list.pageData.length == 0 && list.pageData}}"></nodata> --> | 28 | <!-- <nodata class="t-c" wx:if="{{list.pageData.length == 0 && list.pageData}}"></nodata> --> |
| 29 | - <view class="noMore">- 已经到底了 -</view> | 29 | + <view class="noMore" hidden="{{!noMore}}" wx:if="{{list.pageData.length !== 0}}">- 已经到底了 -</view> |
| 30 | </scroll-view> | 30 | </scroll-view> |
| 31 | </view> | 31 | </view> |
packageA/pages/cardList/cardList.wxss
| @@ -13,7 +13,7 @@ page { | @@ -13,7 +13,7 @@ page { | ||
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | .swiper { | 15 | .swiper { |
| 16 | - background-color: white; | 16 | + background-color: #f2f2f2; |
| 17 | } | 17 | } |
| 18 | 18 | ||
| 19 | .image { | 19 | .image { |
| @@ -59,4 +59,9 @@ page { | @@ -59,4 +59,9 @@ page { | ||
| 59 | 59 | ||
| 60 | .ali-c { | 60 | .ali-c { |
| 61 | align-items: center; | 61 | align-items: center; |
| 62 | +} | ||
| 63 | + | ||
| 64 | +.swiper-img { | ||
| 65 | + display: block; | ||
| 66 | + margin: auto; | ||
| 62 | } | 67 | } |
| 63 | \ No newline at end of file | 68 | \ No newline at end of file |
packageA/pages/goodsInfo/buy_integral.wxml
0 → 100644
| 1 | +<view bindtap="closeSpecModal_inte" class="cover-layer"></view> | ||
| 2 | + <view class="spec-model"> | ||
| 3 | + <view class="pding"> | ||
| 4 | + <icon bindtap="closeSpecModal_inte" class="modal-close" color="black" size="22" type="cancel"></icon> | ||
| 5 | + <view class="spec-goods"> | ||
| 6 | + <image class="wh100 spec-img xc-distance-bottom" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | ||
| 7 | + <view class="spec-goods-info"> | ||
| 8 | + <view class="spec-goods-name ellipsis-2">{{data.goods_name}}</view> | ||
| 9 | + <view class="flex ai_end xc-val-money"> | ||
| 10 | + <view class="spec-goods-price"> | ||
| 11 | + <text wx:if="{{prom_integral}}">{{prom_integral}}积分</text> | ||
| 12 | + <text wx:if="{{prom_integral && prom_price}}">+</text> | ||
| 13 | + <text wx:if="{{prom_price}}">{{prom_price}}元</text> | ||
| 14 | + <text wx:if="{{!prom_integral && !prom_price}}">0积分</text> | ||
| 15 | + </view> | ||
| 16 | + </view> | ||
| 17 | + | ||
| 18 | + | ||
| 19 | + <view class="flex"> | ||
| 20 | + <view class="spec-goods-stock">已售:{{prom_act.buy_num}}</view> | ||
| 21 | + <view class="spec-goods-stock">可售:{{prom_act.limitqty-prom_act.buy_num}}</view> | ||
| 22 | + </view> | ||
| 23 | + | ||
| 24 | + </view> | ||
| 25 | + | ||
| 26 | + <!-- 选择门店模块 --> | ||
| 27 | + <view class="flex-space-between address ai_end xc-width "> | ||
| 28 | + | ||
| 29 | + <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | ||
| 30 | + <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | ||
| 31 | + <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}"> | ||
| 32 | + 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | ||
| 33 | + | ||
| 34 | + </view> | ||
| 35 | + </view> | ||
| 36 | + | ||
| 37 | + <!-- 没有门店的时候 --> | ||
| 38 | + <view class="flex" bindtap="choice_store" wx:else> | ||
| 39 | + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | ||
| 40 | + <view class="fs30" style="color:black;">选择门店</view> | ||
| 41 | + </view> | ||
| 42 | + | ||
| 43 | + <view class="red-co fs28" bindtap="choice_store" > | ||
| 44 | + 更多门店 | ||
| 45 | + <text class="right-arrow"></text> | ||
| 46 | + </view> | ||
| 47 | + </view> | ||
| 48 | + <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> | ||
| 49 | + <block wx:else> | ||
| 50 | + <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view> | ||
| 51 | + <block wx:else> | ||
| 52 | + <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view> | ||
| 53 | + <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules==2 && prom_type==0}}">(库存不足)</view> | ||
| 54 | + </block> | ||
| 55 | + </block> | ||
| 56 | + | ||
| 57 | + <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store && def_pick_store.fulladdress}}">地址:{{def_pick_store.fulladdress}}</view> | ||
| 58 | + | ||
| 59 | + | ||
| 60 | + <!--商品的属性项目--> | ||
| 61 | + <view class="xc-goods-attribute"> | ||
| 62 | + <view hidden="{{ismend==1}}" class="spec-name">商品属性</view> | ||
| 63 | + <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> | ||
| 64 | + <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g"> | ||
| 65 | + {{item.gg}} | ||
| 66 | + </view> | ||
| 67 | + </view> | ||
| 68 | + </view> | ||
| 69 | + | ||
| 70 | + <view class="b_num"> | ||
| 71 | + <view>购买数量</view> | ||
| 72 | + <view class="count"> | ||
| 73 | + <view bindtap="subCartNum_inte" class="sub">-</view> | ||
| 74 | + <input bindblur="inputCartNum_inte" type="number" value="{{goodsInputNum}}"></input> | ||
| 75 | + <view bindtap="addCartNum_inte" class="add">+</view> | ||
| 76 | + </view> | ||
| 77 | + </view> | ||
| 78 | + </view> | ||
| 79 | + | ||
| 80 | + <!-- 按钮部分 --> | ||
| 81 | + <view class="spec-cart-btns"> | ||
| 82 | + <!-- 根本就找不到门店 --> | ||
| 83 | + <block wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> | ||
| 84 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">配送不匹配</view> | ||
| 85 | + </block> | ||
| 86 | + | ||
| 87 | + <block wx:else> | ||
| 88 | + | ||
| 89 | + <!-- 根本就找不到门店 --> | ||
| 90 | + <block wx:if="{{!only_pk && !def_pickpu_list}}"> | ||
| 91 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | ||
| 92 | + </block> | ||
| 93 | + <block wx:else> | ||
| 94 | + | ||
| 95 | + | ||
| 96 | + <block wx:if="{{only_pk.length && !only_pk.length}}"> | ||
| 97 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | ||
| 98 | + </block> | ||
| 99 | + <block wx:else> | ||
| 100 | + <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | ||
| 101 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | ||
| 102 | + </block> | ||
| 103 | + <block wx:else> | ||
| 104 | + <block wx:if="{{!def_pick_store}}"> | ||
| 105 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view> | ||
| 106 | + </block> | ||
| 107 | + <block wx:else> | ||
| 108 | + <block wx:if="{{data.store_count<=0}}"> | ||
| 109 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | ||
| 110 | + </block> | ||
| 111 | + <block wx:else> | ||
| 112 | + <view bindtap="addCart_inte" class="spec-cart-btn spec-buy" data-action="buy">立即兑换</view> | ||
| 113 | + </block> | ||
| 114 | + | ||
| 115 | + </block> | ||
| 116 | + </block> | ||
| 117 | + </block> | ||
| 118 | + </block> | ||
| 119 | + </block> | ||
| 120 | + </view> | ||
| 121 | + | ||
| 122 | + | ||
| 123 | + </view> | ||
| 124 | + </view> | ||
| 125 | + <view class="clear"></view> | ||
| 0 | \ No newline at end of file | 126 | \ No newline at end of file |
packageA/pages/goodsInfo/buy_integral_normal.wxml
0 → 100644
| 1 | +<view bindtap="closeSpecModal_inte_normal" class="cover-layer"></view> | ||
| 2 | + <view class="spec-model"> | ||
| 3 | + <view class="pding"> | ||
| 4 | + <icon bindtap="closeSpecModal_inte_normal" class="modal-close" color="black" size="22" type="cancel"></icon> | ||
| 5 | + <view class="spec-goods"> | ||
| 6 | + <image class="wh100 spec-img xc-distance-bottom" src="{{sele_g.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | ||
| 7 | + <view class="spec-goods-info"> | ||
| 8 | + <view class="spec-goods-name ellipsis-2">{{sele_g.goods_name}}</view> | ||
| 9 | + <view class="flex ai_end xc-val-money"> | ||
| 10 | + <text class="fs20">¥</text> | ||
| 11 | + <!-- 如果是等级会员,且有等级价 --> | ||
| 12 | + <block wx:if="{{card_field && sele_g[card_field]>0}}">{{sele_g[card_field]}} </block> | ||
| 13 | + <block wx:else>{{sele_g.shop_price}}</block> | ||
| 14 | + </view> | ||
| 15 | + | ||
| 16 | + <view class="flex"> | ||
| 17 | + <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view> | ||
| 18 | + <block wx:if="{{sales_rules==2}}"> | ||
| 19 | + <view class="spec-goods-stock" wx:if="{{def_pick_store && def_pick_store.CanOutQty}}">可售:{{def_pick_store.CanOutQty}}</view> | ||
| 20 | + <view class="spec-goods-stock" wx:else>可售:0</view> | ||
| 21 | + </block> | ||
| 22 | + <block wx:else><view class="spec-goods-stock">可售:{{sele_g.store_count}}</view></block> | ||
| 23 | + </view> | ||
| 24 | + | ||
| 25 | + | ||
| 26 | + </view> | ||
| 27 | + | ||
| 28 | + <!-- 选择门店模块 --> | ||
| 29 | + <view class="flex-space-between address ai_end xc-width "> | ||
| 30 | + | ||
| 31 | + <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | ||
| 32 | + <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | ||
| 33 | + <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}"> | ||
| 34 | + 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | ||
| 35 | + | ||
| 36 | + </view> | ||
| 37 | + </view> | ||
| 38 | + | ||
| 39 | + <!-- 没有门店的时候 --> | ||
| 40 | + <view class="flex" bindtap="choice_store" wx:else> | ||
| 41 | + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | ||
| 42 | + <view class="fs30" style="color:black;">选择门店</view> | ||
| 43 | + </view> | ||
| 44 | + | ||
| 45 | + <view class="red-co fs28" bindtap="choice_store" > | ||
| 46 | + 更多门店 | ||
| 47 | + <text class="right-arrow"></text> | ||
| 48 | + </view> | ||
| 49 | + </view> | ||
| 50 | + <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> | ||
| 51 | + <block wx:else> | ||
| 52 | + <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view> | ||
| 53 | + <block wx:else> | ||
| 54 | + <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view> | ||
| 55 | + <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules==2 && prom_type==0}}">(库存不足)</view> | ||
| 56 | + </block> | ||
| 57 | + </block> | ||
| 58 | + <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store && def_pick_store.fulladdress}}">地址:{{def_pick_store.fulladdress}}</view> | ||
| 59 | + | ||
| 60 | + | ||
| 61 | + <!--商品的属性项目--> | ||
| 62 | + <view class="xc-goods-attribute"> | ||
| 63 | + <view hidden="{{ismend==1}}" class="spec-name">商品属性</view> | ||
| 64 | + <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> | ||
| 65 | + <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g"> | ||
| 66 | + {{item.gg}} | ||
| 67 | + </view> | ||
| 68 | + </view> | ||
| 69 | + </view> | ||
| 70 | + | ||
| 71 | + <view class="b_num"> | ||
| 72 | + <view>购买数量</view> | ||
| 73 | + <view class="count"> | ||
| 74 | + <view bindtap="subCartNum" class="sub">-</view> | ||
| 75 | + <input bindblur="inputCartNum" type="number" value="{{goodsInputNum}}"></input> | ||
| 76 | + <view bindtap="addCartNum" class="add">+</view> | ||
| 77 | + </view> | ||
| 78 | + </view> | ||
| 79 | + </view> | ||
| 80 | + | ||
| 81 | + <!-- 按钮部分 --> | ||
| 82 | + <view class="spec-cart-btns"> | ||
| 83 | + | ||
| 84 | + | ||
| 85 | + <!-- 根本就找不到门店 --> | ||
| 86 | + <block wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> | ||
| 87 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">配送不匹配</view> | ||
| 88 | + </block> | ||
| 89 | + <block wx:else> | ||
| 90 | + <!-- 根本就找不到门店 --> | ||
| 91 | + <block wx:if="{{!only_pk && !def_pickpu_list}}"> | ||
| 92 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | ||
| 93 | + </block> | ||
| 94 | + <block wx:else> | ||
| 95 | + | ||
| 96 | + | ||
| 97 | + <block wx:if="{{only_pk.length && !only_pk.length}}"> | ||
| 98 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | ||
| 99 | + </block> | ||
| 100 | + <block wx:else> | ||
| 101 | + <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | ||
| 102 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | ||
| 103 | + </block> | ||
| 104 | + <block wx:else> | ||
| 105 | + <block wx:if="{{!def_pick_store}}"> | ||
| 106 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view> | ||
| 107 | + </block> | ||
| 108 | + <block wx:else> | ||
| 109 | + <block wx:if="{{data.store_count<=0}}"> | ||
| 110 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | ||
| 111 | + </block> | ||
| 112 | + <block wx:else> | ||
| 113 | + <view class="flex jc_sb"> | ||
| 114 | + <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | ||
| 115 | + data-action="add" style="background-color: #ffb03f;">加入购物车</view> | ||
| 116 | + <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | ||
| 117 | + data-action="buy">立即购买</view> | ||
| 118 | + </view> | ||
| 119 | + </block> | ||
| 120 | + | ||
| 121 | + </block> | ||
| 122 | + </block> | ||
| 123 | + </block> | ||
| 124 | + </block> | ||
| 125 | + </block> | ||
| 126 | + </view> | ||
| 127 | + | ||
| 128 | + | ||
| 129 | + </view> | ||
| 130 | + </view> | ||
| 131 | + <view class="clear"></view> | ||
| 0 | \ No newline at end of file | 132 | \ No newline at end of file |
packageA/pages/goodsInfo/buy_pt.wxml
0 → 100644
| 1 | +<view bindtap="closeSpecModal" class="cover-layer"></view> | ||
| 2 | + <view class="spec-model"> | ||
| 3 | + <view class="pding"> | ||
| 4 | + <icon bindtap="closeSpecModal" class="modal-close" color="gray" size="22" type="cancel"></icon> | ||
| 5 | + | ||
| 6 | + <!-- 商品名称 --> | ||
| 7 | + <view class="spec-goods"> | ||
| 8 | + <image class="wh100 spec-img xc-distance-bottom" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | ||
| 9 | + <view class="spec-goods-info"> | ||
| 10 | + <view class="spec-goods-name ellipsis-1">{{sele_g.goods_name}}</view> | ||
| 11 | + <view class="flex ai_end xc-val-money {{sele_g[card_field]}}" > | ||
| 12 | + <view class="spec-goods-price" wx:if="{{is_normal==1}}" > | ||
| 13 | + <!-- 如果是等级会员,且有等级价 --> | ||
| 14 | + <block wx:if="{{card_field && sele_g[card_field]>0}}"> | ||
| 15 | + ¥ {{sele_g[card_field]}} | ||
| 16 | + </block> | ||
| 17 | + <block wx:else> | ||
| 18 | + ¥ {{sele_g.shop_price}} | ||
| 19 | + </block> | ||
| 20 | + </view> | ||
| 21 | + <view class="spec-goods-price" wx:else>¥ {{prom_price}}</view> | ||
| 22 | + </view> | ||
| 23 | + | ||
| 24 | + <block wx:if="{{is_normal==1}}"> | ||
| 25 | + <view class="flex"> | ||
| 26 | + <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view> | ||
| 27 | + <block wx:if="{{sales_rules==2}}"> | ||
| 28 | + <view class="spec-goods-stock" wx:if="{{def_pick_store && def_pick_store.CanOutQty}}">可售:{{def_pick_store.CanOutQty}}</view> | ||
| 29 | + <view class="spec-goods-stock" wx:else>可售:0</view> | ||
| 30 | + </block> | ||
| 31 | + <block wx:else><view class="spec-goods-stock">可售:{{sele_g.store_count}}</view></block> | ||
| 32 | + </view> | ||
| 33 | + </block> | ||
| 34 | + <block wx:if="{{is_normal==0}}"> | ||
| 35 | + <view class="flex"> | ||
| 36 | + <view class="spec-goods-stock" wx:if="{{prom_st>0}}">已售:{{prom_act.buy_num}}</view> | ||
| 37 | + <view class="spec-goods-stock" wx:else >已售:{{prom_act.buy_num}}</view> | ||
| 38 | + <view class="spec-goods-stock">可售:{{prom_act.goods_num-prom_act.buy_num}}</view> | ||
| 39 | + </view> | ||
| 40 | + </block> | ||
| 41 | + </view> | ||
| 42 | + | ||
| 43 | + </view> | ||
| 44 | + | ||
| 45 | + | ||
| 46 | + <view style="clear: both"></view> | ||
| 47 | + <view style="margin-top: 20rpx"> | ||
| 48 | + <view class="flex-space-between address ai_end xc-width "> | ||
| 49 | + | ||
| 50 | + <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | ||
| 51 | + <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | ||
| 52 | + | ||
| 53 | + | ||
| 54 | + <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}"> | ||
| 55 | + 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | ||
| 56 | + | ||
| 57 | + </view> | ||
| 58 | + </view> | ||
| 59 | + | ||
| 60 | + <!-- 没有门店的时候 --> | ||
| 61 | + <view class="flex" bindtap="choice_store" wx:else> | ||
| 62 | + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | ||
| 63 | + <view class="fs28 xc-ash-9f">选择门店</view> | ||
| 64 | + </view> | ||
| 65 | + | ||
| 66 | + <view class="red-co fs28" bindtap="choice_store" > | ||
| 67 | + 更多门店 | ||
| 68 | + <text class="right-arrow"></text> | ||
| 69 | + </view> | ||
| 70 | + </view> | ||
| 71 | + <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view> | ||
| 72 | + <view class="no_store" wx:elif="{{is_normal && def_pick_store && def_pick_store.CanOutQty<=0}}">(库存不足)</view> | ||
| 73 | + <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store && def_pick_store.pickup_name}}">地址:{{def_pick_store.fulladdress}}</view> | ||
| 74 | + </view> | ||
| 75 | + <!----商品的属性项目----> | ||
| 76 | + <view> | ||
| 77 | + <view hidden="{{ismend==1}}" class="spec-name">商品属性</view> | ||
| 78 | + <block wx:if="{{is_normal==0}}"> | ||
| 79 | + <view hidden="{{ismend==1}}" class="flex"> | ||
| 80 | + <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g">{{item.gg}} | ||
| 81 | + </view> | ||
| 82 | + </view> | ||
| 83 | + </block> | ||
| 84 | + | ||
| 85 | + <block wx:else> | ||
| 86 | + <view hidden="{{ismend==1}}" class="flex"> | ||
| 87 | + <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g">{{item.gg}} | ||
| 88 | + </view> | ||
| 89 | + </view> | ||
| 90 | + </block> | ||
| 91 | + <view class="clear"></view> | ||
| 92 | + </view> | ||
| 93 | + | ||
| 94 | + | ||
| 95 | + <view> | ||
| 96 | + <!--<view bindtap="getmendian" class="quhuo logistics-item" hidden="{{ismend==1}}">--> | ||
| 97 | + <!--<view wx:if="{{sto_sele_name==''}}">取货门店--> | ||
| 98 | + <!--<text class='small'>(选择门店)</text>--> | ||
| 99 | + <!--</view>--> | ||
| 100 | + <!--<view wx:else>{{sto_sele_name}}</view>--> | ||
| 101 | + <!--<view class="item-img">--> | ||
| 102 | + <!--<image class="wh100" src="{{iurl}}/miniapp/images/icon-arrowdown.png"></image>--> | ||
| 103 | + <!--</view>--> | ||
| 104 | + <!--</view>--> | ||
| 105 | + | ||
| 106 | + | ||
| 107 | + <view class="b_num" hidden="{{ismend==1}}" style="margin-top: 20rpx"> | ||
| 108 | + <view>购买数量</view> | ||
| 109 | + <view class="count"> | ||
| 110 | + <view bindtap="subCartNum" class="sub">-</view> | ||
| 111 | + <input bindblur="inputCartNum" class="xc-val-fream" type="number" value="{{goodsInputNum}}"></input> | ||
| 112 | + <view bindtap="addCartNum" class="add">+</view> | ||
| 113 | + </view> | ||
| 114 | + </view> | ||
| 115 | + | ||
| 116 | + <view class="clear"></view> | ||
| 117 | + <!---当选取门店的时候会显示门店的选项----> | ||
| 118 | + <view hidden="{{ismend==0}}" class="sto_v"> | ||
| 119 | + <view class="title" hidden="{{is_sec_mend==1}}" bindtap="hidemend"> | ||
| 120 | + <image class="tubiao" src="{{iurl}}/miniapp/images/icon-left.png"></image>选择门店 | ||
| 121 | + </view> | ||
| 122 | + <!-----第一级显示------> | ||
| 123 | + <view class="itemlists" hidden="{{is_sec_mend==1}}"> | ||
| 124 | + <block wx:if="{{is_show_sto_cat>0}}"> | ||
| 125 | + <view wx:for="{{all_sto}}" wx:key="all_sto" class="item" bindtap="show_sec" data-index="{{index}}">{{item.name}}</view> | ||
| 126 | + </block> | ||
| 127 | + <block wx:else> | ||
| 128 | + <view wx:for="{{only_pk}}" wx:key="only_pk" class="item" bindtap="hidemend" data-p_id="{{item.pickup_id}}" data-p_name="{{item.pickup_name}}" data-p_dis="{{item.distr_type}}">{{item.pickup_name}} | ||
| 129 | + </view> | ||
| 130 | + </block> | ||
| 131 | + </view> | ||
| 132 | + <!-----第二级显示------> | ||
| 133 | + <view class="stitle" hidden="{{is_sec_mend==0}}" bindtap="hide_sec_mend"> | ||
| 134 | + <image class="tubiao" src="{{iurl}}/miniapp/images/icon-left.png"></image>{{sec_sto.name}}</view> | ||
| 135 | + <view class="itemlists" hidden="{{is_sec_mend==0}}"> | ||
| 136 | + <view wx:for="{{sec_sto.s_arr}}" wx:key="{{index}}" class="item" bindtap="hidemend" data-p_id="{{item.pickup_id}}" data-p_name="{{item.pickup_name}}" data-p_dis="{{item.distr_type}}">{{item.pickup_name}} | ||
| 137 | + </view> | ||
| 138 | + </view> | ||
| 139 | + </view> | ||
| 140 | + </view> | ||
| 141 | + </view> | ||
| 142 | + <view class="pt_qd"> | ||
| 143 | + <block wx:if="{{is_normal==1}}"> | ||
| 144 | + <!-- 按钮部分 --> | ||
| 145 | + <view class="spec-cart-btns"> | ||
| 146 | + <!-- 根本就找不到门店 --> | ||
| 147 | + <block wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> | ||
| 148 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">配送不匹配</view> | ||
| 149 | + </block> | ||
| 150 | + <block wx:else> | ||
| 151 | + | ||
| 152 | + <!-- 根本就找不到门店 --> | ||
| 153 | + <block wx:if="{{!only_pk && !def_pickpu_list}}"> | ||
| 154 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | ||
| 155 | + </block> | ||
| 156 | + <block wx:else> | ||
| 157 | + | ||
| 158 | + | ||
| 159 | + <block wx:if="{{only_pk.length && !only_pk.length}}"> | ||
| 160 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | ||
| 161 | + </block> | ||
| 162 | + <block wx:else> | ||
| 163 | + <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | ||
| 164 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | ||
| 165 | + </block> | ||
| 166 | + <block wx:else> | ||
| 167 | + <block wx:if="{{!def_pick_store}}"> | ||
| 168 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view> | ||
| 169 | + </block> | ||
| 170 | + <block wx:else> | ||
| 171 | + <block wx:if="{{data.store_count<=0}}"> | ||
| 172 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | ||
| 173 | + </block> | ||
| 174 | + <block wx:else> | ||
| 175 | + <view bindtap="addCart_pt" class="spec-cart-btn spec-buy" data-action="buy">立即购买</view> | ||
| 176 | + </block> | ||
| 177 | + | ||
| 178 | + </block> | ||
| 179 | + </block> | ||
| 180 | + </block> | ||
| 181 | + </block> | ||
| 182 | + </block> | ||
| 183 | + </view> | ||
| 184 | + | ||
| 185 | + </block> | ||
| 186 | + <block wx:else> | ||
| 187 | + <!-- 根本就找不到门店 --> | ||
| 188 | + <block wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> | ||
| 189 | + <view class="spec-cart-btn spec-buy w100" style="background-color: #dcdcdc;color: #999;">配送不匹配</view> | ||
| 190 | + </block> | ||
| 191 | + <block wx:else> | ||
| 192 | + <view bindtap="addCart_pt" class="spec-cart-btn spec-buy w100" data-action="buy">确定</view> | ||
| 193 | + </block> | ||
| 194 | + </block> | ||
| 195 | + | ||
| 196 | + | ||
| 197 | + </view> | ||
| 198 | + </view> | ||
| 199 | + | ||
| 0 | \ No newline at end of file | 200 | \ No newline at end of file |
packageA/pages/goodsInfo/filter.wxs
0 → 100644
| 1 | +var is_has = function (text,val) { | ||
| 2 | + if(text.indexOf(","+val+",")==-1) return false; | ||
| 3 | + return true | ||
| 4 | +} | ||
| 5 | +function format_tt(ts) { | ||
| 6 | + if(ts==null || ts==undefined || ts=='') return ""; | ||
| 7 | + var d = getDate(ts*1000) | ||
| 8 | + var fm=(d.getMonth()+1)+"月"+ d.getDate()+"日"; | ||
| 9 | + return fm; | ||
| 10 | +} | ||
| 11 | +module.exports = { | ||
| 12 | + is_has: is_has, | ||
| 13 | + format_tt:format_tt | ||
| 14 | +} |
packageA/pages/goodsInfo/g_filter.wxs
0 → 100644
| 1 | +var g_filters = { | ||
| 2 | + //-- 判断是不是有等级价 -- | ||
| 3 | + is_has_rank:function(rank_switch,item){ | ||
| 4 | + if(!rank_switch) return false; | ||
| 5 | + if(item.cardprice1 || item.cardprice2 || item.cardprice3) {return true} | ||
| 6 | + return false; | ||
| 7 | + }, | ||
| 8 | + | ||
| 9 | + //-- 判断,不是等级会员时候,要显示的最低等级价和名称 -- | ||
| 10 | + get_card_price:function(goods,all_card,type){ | ||
| 11 | + var price1=parseFloat(goods['cardprice1']); | ||
| 12 | + var price2=parseFloat(goods['cardprice2']); | ||
| 13 | + var price3=parseFloat(goods['cardprice3']); | ||
| 14 | + if(!all_card){ | ||
| 15 | + if(type==0) return 0; | ||
| 16 | + return ""; | ||
| 17 | + } | ||
| 18 | + | ||
| 19 | + var arr=[]; | ||
| 20 | + var min_price= 0; | ||
| 21 | + var min_name=""; | ||
| 22 | + | ||
| 23 | + var min_price=null; | ||
| 24 | + var min_name=null; | ||
| 25 | + //---设置对应的价格名字---- | ||
| 26 | + for(var i=0;i<3;i++) { | ||
| 27 | + var vl=all_card[i]; | ||
| 28 | + if(!vl) continue; | ||
| 29 | + if(vl['CorrPrice']=="Price1" && price1>0) | ||
| 30 | + { | ||
| 31 | + if(min_price==null) { | ||
| 32 | + min_price=price1;min_name=vl['CardName']; | ||
| 33 | + } | ||
| 34 | + else if(price1<min_price) { | ||
| 35 | + min_price=price1;min_name=vl['CardName']; | ||
| 36 | + } | ||
| 37 | + } | ||
| 38 | + if(vl['CorrPrice']=="Price2" && price2>0) | ||
| 39 | + { | ||
| 40 | + if(min_price==null) { | ||
| 41 | + min_price=price2;min_name=vl['CardName']; | ||
| 42 | + } | ||
| 43 | + else if(price2<min_price) { | ||
| 44 | + min_price=price2;min_name=vl['CardName']; | ||
| 45 | + } | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + if(vl['CorrPrice']=="Price3" && price3>0) | ||
| 49 | + { | ||
| 50 | + if(min_price==null) { | ||
| 51 | + min_price=price3;min_name=vl['CardName']; | ||
| 52 | + } | ||
| 53 | + else if(price3<min_price) { | ||
| 54 | + min_price=price3;min_name=vl['CardName']; | ||
| 55 | + } | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + } | ||
| 59 | + if(min_price==null){ | ||
| 60 | + if(type==0) return 0; | ||
| 61 | + return ""; | ||
| 62 | + } | ||
| 63 | + | ||
| 64 | + //if(type==0) return arr.length; | ||
| 65 | + //--进行排序,升序--- | ||
| 66 | + /*--- | ||
| 67 | + arr.sort(function(a,b){ | ||
| 68 | + if (a.price < b.price) { | ||
| 69 | + return -1; | ||
| 70 | + } else if (a.fee == b.fee) { | ||
| 71 | + return 0; | ||
| 72 | + } else { | ||
| 73 | + return 1; | ||
| 74 | + } | ||
| 75 | + })--*/ | ||
| 76 | + //-- 获取最下价钱,和相应的卡的名称 -- | ||
| 77 | + //min_price=min.price; | ||
| 78 | + //min_name=min.name; | ||
| 79 | + if(type==0) return min_price.toFixed(2); | ||
| 80 | + if(min_name.length>4) min_name=min_name.substring(0, 8); | ||
| 81 | + return min_name; | ||
| 82 | + }, | ||
| 83 | + | ||
| 84 | + toFix: function (val, count,set) { | ||
| 85 | + if(val===undefined) return 0; | ||
| 86 | + if(val===null) return 0; | ||
| 87 | + if(val==='') return 0; | ||
| 88 | + val = parseFloat(val); | ||
| 89 | + if(set==1 && val==0) return val; | ||
| 90 | + return val.toFixed(count) | ||
| 91 | + }, | ||
| 92 | + | ||
| 93 | + //折扣数值处理,小数位数为1时,只显示1位;小数位数为2时,才显示2位; | ||
| 94 | + num: function(value) { | ||
| 95 | + if(value != 0) { | ||
| 96 | + var val = value.toFixed(2).toString(); | ||
| 97 | + if(val.indexOf('.') != -1) { | ||
| 98 | + var arrval = val.split('.'); | ||
| 99 | + if(arrval[1].length == 1 && arrval[1][0] == 0) { | ||
| 100 | + val = val.slice(0,-2); | ||
| 101 | + }; | ||
| 102 | + | ||
| 103 | + if(arrval[1].length == 2 && arrval[1][1] == 0) { | ||
| 104 | + val = val.slice(0,-1); | ||
| 105 | + }; | ||
| 106 | + }; | ||
| 107 | + return val; | ||
| 108 | + } else { | ||
| 109 | + return value.toFixed(0); | ||
| 110 | + }; | ||
| 111 | + }, | ||
| 112 | +} | ||
| 113 | +module.exports = { | ||
| 114 | + is_has_rank:g_filters.is_has_rank, | ||
| 115 | + get_card_price:g_filters.get_card_price, | ||
| 116 | + num:g_filters.num, | ||
| 117 | +} | ||
| 0 | \ No newline at end of file | 118 | \ No newline at end of file |
packageA/pages/goodsInfo/goodsInfo.js
0 → 100644
| 1 | +var t = require("../../../utils/util.js"), | ||
| 2 | + ut = t, | ||
| 3 | + e = require("../../../utils/common.js"), | ||
| 4 | + a = require("../../../utils/wxParse/wxParse.js"), | ||
| 5 | + s = getApp(), | ||
| 6 | + i = s.request, | ||
| 7 | + rq = i, | ||
| 8 | + oo = s.globalData, | ||
| 9 | + o = s.globalData.setting, | ||
| 10 | + os = o; | ||
| 11 | +//评价加载更多 | ||
| 12 | +var more = function(e) { | ||
| 13 | + return e && e.__esModule ? e : { | ||
| 14 | + default: e | ||
| 15 | + }; | ||
| 16 | + }(require("../../../utils/LoadMore.js")), | ||
| 17 | + n = new more.default(); | ||
| 18 | +var utils = require('../../../utils/util.js'); | ||
| 19 | +var regeneratorRuntime = require('../../../utils/runtime.js'); | ||
| 20 | + | ||
| 21 | +Page({ | ||
| 22 | + data: { | ||
| 23 | + start_stop: 2, //秒杀开始 结束 的控制(1正在进行,2即将开始) | ||
| 24 | + color_type: 0, //线条控制 | ||
| 25 | + color_type_one: 0, | ||
| 26 | + color_type_two: 1, | ||
| 27 | + | ||
| 28 | + gid: "", | ||
| 29 | + stoid: o.stoid, | ||
| 30 | + url: o.url, | ||
| 31 | + resourceUrl: o.h5_url, //公众号那边的图片文件域名 | ||
| 32 | + iurl: o.imghost, | ||
| 33 | + defaultAvatar: o.resourceUrl + "/static/images/user68.jpg", | ||
| 34 | + | ||
| 35 | + data: null, | ||
| 36 | + content: "", //商品详情 | ||
| 37 | + comments: null, //商品评论 | ||
| 38 | + c_curr_p: 1, //评论分页 | ||
| 39 | + com_num: 0, //评论人数 | ||
| 40 | + gallery: null, //图片滚动 | ||
| 41 | + is_collect: 0, | ||
| 42 | + collect_id: 0, | ||
| 43 | + cartGoodsNum: 0, | ||
| 44 | + specSelect: 0, | ||
| 45 | + optionItemId: 0, | ||
| 46 | + goodsInputNum: 1, | ||
| 47 | + openSpecModal: !1, | ||
| 48 | + openSpecModal_pt: !1, //拼单的弹起, | ||
| 49 | + openPromModal: !1, | ||
| 50 | + activeCategoryId: 0, | ||
| 51 | + supportPageScroll: !1, | ||
| 52 | + address: { | ||
| 53 | + address: "", | ||
| 54 | + district: 0 | ||
| 55 | + }, | ||
| 56 | + shipping: "", | ||
| 57 | + shippingCost: 0, | ||
| 58 | + enterAddressPage: !1, | ||
| 59 | + categories: [{ | ||
| 60 | + name: "商品", | ||
| 61 | + id: 0 | ||
| 62 | + }, { | ||
| 63 | + name: "详情", | ||
| 64 | + id: 1 | ||
| 65 | + }, { | ||
| 66 | + name: "评论", | ||
| 67 | + id: 2 | ||
| 68 | + }], | ||
| 69 | + activeCategoryId2: 0, | ||
| 70 | + categories2: [{ | ||
| 71 | + name: "商品详情", | ||
| 72 | + id: 0 | ||
| 73 | + }, { | ||
| 74 | + name: "规格参数", | ||
| 75 | + id: 1 | ||
| 76 | + }], | ||
| 77 | + activeCategoryId3: 1, | ||
| 78 | + categories3: [{ | ||
| 79 | + name: "全部", | ||
| 80 | + id: 1, | ||
| 81 | + num: 0 | ||
| 82 | + }, | ||
| 83 | + { | ||
| 84 | + name: "有图", | ||
| 85 | + id: 5, | ||
| 86 | + num: 0 | ||
| 87 | + }, | ||
| 88 | + | ||
| 89 | + { | ||
| 90 | + name: "好评", | ||
| 91 | + id: 2, | ||
| 92 | + num: 0 | ||
| 93 | + }, { | ||
| 94 | + name: "中评", | ||
| 95 | + id: 3, | ||
| 96 | + num: 0 | ||
| 97 | + }, { | ||
| 98 | + name: "差评", | ||
| 99 | + id: 4, | ||
| 100 | + num: 0 | ||
| 101 | + }, | ||
| 102 | + ], | ||
| 103 | + | ||
| 104 | + select: { | ||
| 105 | + price: 0, | ||
| 106 | + stock: 0, | ||
| 107 | + specName: "", | ||
| 108 | + activity: null | ||
| 109 | + }, | ||
| 110 | + | ||
| 111 | + //已选的商品(属性) | ||
| 112 | + sele_g_spec_name: '', | ||
| 113 | + sele_g_id: '', | ||
| 114 | + sele_g: null, | ||
| 115 | + //门店相关 | ||
| 116 | + ismend: 0, | ||
| 117 | + is_sec_mend: 0, | ||
| 118 | + sto_sele_name: "", //选中的门店名称 | ||
| 119 | + sto_sele_id: "", //选中的门店id | ||
| 120 | + sto_sele_distr: "", //选择的门店的配送方式 | ||
| 121 | + is_show_sto_cat: 1, //是否显示门店分类 | ||
| 122 | + only_pk: null, | ||
| 123 | + all_sto: null, | ||
| 124 | + sec_sto: null, //选择了的门店分类 | ||
| 125 | + pickpu_list: null, //读出的所有门店list | ||
| 126 | + def_pickpu_list: null, //一开始5个门店list | ||
| 127 | + sec_pick_index: 0, //第二级门店选择ID | ||
| 128 | + fir_pick_index: 0, //第一级门店选择ID | ||
| 129 | + all_pick_list:null,//所有的门店先记录起来 | ||
| 130 | + //同一条形码的所有商品 | ||
| 131 | + sku_g: null, | ||
| 132 | + sku_g_pt: null, //---拼单的普通购买--- | ||
| 133 | + //联系电话 | ||
| 134 | + mobile: '', | ||
| 135 | + //分类,品牌,国别名称 | ||
| 136 | + cat_name: '', | ||
| 137 | + brand_name: '', | ||
| 138 | + nation_name: '', | ||
| 139 | + | ||
| 140 | + //商品的活动类型 0普通 1秒杀 2团购 3优惠 4 积分购 6拼单 | ||
| 141 | + prom_type: 0, | ||
| 142 | + prom_time_text: "", | ||
| 143 | + prom_price: null, | ||
| 144 | + prom_buy_limit: 0, | ||
| 145 | + djs: null, | ||
| 146 | + prom_st: 0, | ||
| 147 | + prom_r_null: 0, | ||
| 148 | + prom_end_time: null, | ||
| 149 | + prom_start_time: null, | ||
| 150 | + prom_act: null, | ||
| 151 | + pd_xx: 0, | ||
| 152 | + is_normal: 0, //是否普通购买 | ||
| 153 | + teamgroup: null, //有多少人开团 | ||
| 154 | + grounp_tatal: 0, //有几个人开团 | ||
| 155 | + timer: [], | ||
| 156 | + | ||
| 157 | + //商品的购买次数 | ||
| 158 | + prom_buy_num: -1, | ||
| 159 | + g_buy_num: null, | ||
| 160 | + prom_goods_num: 0, //活动商品数量 | ||
| 161 | + prom_buy_num: 0, //活动商品购买数量 | ||
| 162 | + prom_redis_num: 0, //活动商品redis数量 | ||
| 163 | + | ||
| 164 | + //拼单的规则显示 | ||
| 165 | + is_show_gz: 0, | ||
| 166 | + //会员自己的购买的拼单商品的情况 | ||
| 167 | + user_order_pt_state: 0, | ||
| 168 | + //购买的订单 | ||
| 169 | + buy_order: null, | ||
| 170 | + //1加入购物车 2立即购买 | ||
| 171 | + openSpecModal_ind: 0, | ||
| 172 | + | ||
| 173 | + //---计时器开关---- | ||
| 174 | + is_timer: 1, | ||
| 175 | + isshow: 0, | ||
| 176 | + bconfig: null, //基础配置 | ||
| 177 | + | ||
| 178 | + fir_comments: null, //详情页上的评价 | ||
| 179 | + fir_quan: null, //详情页上的券 | ||
| 180 | + quan_list: null, //券列表 | ||
| 181 | + | ||
| 182 | + coupon: 0, | ||
| 183 | + //会员分享的头像 | ||
| 184 | + share_head: "", | ||
| 185 | + share_goods_img: "", | ||
| 186 | + | ||
| 187 | + //----------视频图片data参数--------- | ||
| 188 | + current: 0, //图片计数 | ||
| 189 | + swiperCurrent: 0, //轮播的下标 | ||
| 190 | + hiddenn: 0, //控制轮播计数显示 | ||
| 191 | + | ||
| 192 | + currentTab: 0, // 选择器控制参数 | ||
| 193 | + mapurl: "", | ||
| 194 | + mapurl_f_img: "", | ||
| 195 | + videopicture: 0, //视频图片的控制 | ||
| 196 | + | ||
| 197 | + video: 0, //视频图片切换器 | ||
| 198 | + index: 0, | ||
| 199 | + noon: 0, //开始视频的隐藏 | ||
| 200 | + | ||
| 201 | + screenWidth: 0, | ||
| 202 | + canvasHidden: 1, | ||
| 203 | + | ||
| 204 | + //--推荐-- | ||
| 205 | + store_config: null, | ||
| 206 | + is_show_pl: 0, //是否品类 | ||
| 207 | + is_show_pp: 0, //是否品牌 | ||
| 208 | + is_show_gb: 0, //是否国别 | ||
| 209 | + is_closecoupon: 0, | ||
| 210 | + | ||
| 211 | + //是否点赞中 | ||
| 212 | + iszaning: 0, | ||
| 213 | + | ||
| 214 | + select_store: 0, //选择更多 | ||
| 215 | + index: 1, | ||
| 216 | + more_store: 0, //选择门店 | ||
| 217 | + sort_store: 0, //门店分类 | ||
| 218 | + choice_sort_store: 0, //选择分类门店 | ||
| 219 | + new_user: 0, //新用户 | ||
| 220 | + | ||
| 221 | + def_pick_store: null, // 默认的门店 | ||
| 222 | + fir_def_store:null, //客户默认的门店的 | ||
| 223 | + lat: null, //维度 | ||
| 224 | + lon: null, //经度 | ||
| 225 | + | ||
| 226 | + is_get_local_ok: 0, //获取坐标是否完成 | ||
| 227 | + region_name: "门店分类", //区域的名字 | ||
| 228 | + is_gps: 1, | ||
| 229 | + open_ind_store: 0, //哪里打开的门店列表的控制属性 | ||
| 230 | + default_store: {}, //创建添加默认门店地址的对象 | ||
| 231 | + | ||
| 232 | + comments_no_more:0, | ||
| 233 | + get_c:0, //获取评价是不是成 | ||
| 234 | + is_collect_load:0, //是不是处理 | ||
| 235 | + is_newsales_rules:0, //是否开启最新的门店规则,此时会新读门店,当点击选择门店时会触发读取线下库存 | ||
| 236 | + sales_rules:1, //默认是线上销售 | ||
| 237 | + | ||
| 238 | + wait_for_user_store:null, | ||
| 239 | + prom_goods:null, //商品优惠列表 | ||
| 240 | + order_prom:null, //订单优惠 | ||
| 241 | + collocationGoods:null, //搭配购 | ||
| 242 | + | ||
| 243 | + poster:null, //自定义海报 | ||
| 244 | + share_b_img:'', //自定义分享的背景 | ||
| 245 | + | ||
| 246 | + showPoster: false, | ||
| 247 | + hui_condition:null, | ||
| 248 | + sto_sele_name_1:'',//分享的门店名称 | ||
| 249 | + | ||
| 250 | + }, | ||
| 251 | + | ||
| 252 | + //------初始化加载---------- | ||
| 253 | + onLoad: function(t) { | ||
| 254 | + // wx.setNavigationBarTitle({ | ||
| 255 | + // title: "商品详情", | ||
| 256 | + // }) | ||
| 257 | + var ee = this, | ||
| 258 | + that = ee, | ||
| 259 | + th = ee, | ||
| 260 | + gid = t.goods_id, | ||
| 261 | + first_leader=t.first_leader, | ||
| 262 | + room_id=t.room_id, | ||
| 263 | + room_user_share=t.room_user_share; //如果是会员分享带有room_id的话,那么接下来会员分享就不传room_id | ||
| 264 | + | ||
| 265 | + //-- 自定义海报 -- | ||
| 266 | + getApp().request.promiseGet("/api/weshop/goods/poster/page", { | ||
| 267 | + data:{store_id:os.stoid, type:1, is_use:1} | ||
| 268 | + }).then(res=>{ | ||
| 269 | + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData[0]){ | ||
| 270 | + | ||
| 271 | + var poster_data=res.data.data.pageData[0]; | ||
| 272 | + var json_str=poster_data.jsonStr; | ||
| 273 | + | ||
| 274 | + if(json_str){ | ||
| 275 | + var json_data=JSON.parse(json_str); | ||
| 276 | + if(json_data.bg_img){ | ||
| 277 | + | ||
| 278 | + //-- 把图片那到本地 -- | ||
| 279 | + wx.getImageInfo({ | ||
| 280 | + src:json_data.bg_img, | ||
| 281 | + success: function(res) { | ||
| 282 | + var path= res.path; | ||
| 283 | + th.setData({share_b_img:path}) | ||
| 284 | + }, | ||
| 285 | + fail: function(res) {} | ||
| 286 | + }); | ||
| 287 | + } | ||
| 288 | + th.setData({poster:json_data}) | ||
| 289 | + | ||
| 290 | + } | ||
| 291 | + } | ||
| 292 | + }) | ||
| 293 | + | ||
| 294 | + //---获取手机地址坐标-- | ||
| 295 | + //--如果tg_id是空的话,分享回来-- | ||
| 296 | + if (gid == undefined || gid == null || gid == "") { | ||
| 297 | + var gid_str = decodeURIComponent(t.scene); | ||
| 298 | + gid_str=gid_str.split("_"); | ||
| 299 | + gid=gid_str[0]; | ||
| 300 | + if(gid_str.length>1){ | ||
| 301 | + first_leader=gid_str[1]; | ||
| 302 | + } | ||
| 303 | + //-- 如果有room_id的获取 -- | ||
| 304 | + if(gid_str.length>2 && gid_str[2]){ | ||
| 305 | + room_id=gid_str[2]; | ||
| 306 | + room_user_share=1; | ||
| 307 | + } | ||
| 308 | + | ||
| 309 | + } | ||
| 310 | + ee.setData({ gid: gid}); | ||
| 311 | + if(first_leader){ | ||
| 312 | + console.log("log---".first_leader); | ||
| 313 | + | ||
| 314 | + getApp().globalData.first_leader=first_leader; | ||
| 315 | + //调用接口判断是不是会员 | ||
| 316 | + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{ | ||
| 317 | + if(res.data.code==0){ | ||
| 318 | + getApp().globalData.guide_id=res.data.data.id; | ||
| 319 | + } | ||
| 320 | + }) | ||
| 321 | + } | ||
| 322 | + | ||
| 323 | + //-- 如果有房间号 -- | ||
| 324 | + if(room_id){ | ||
| 325 | + getApp().globalData.room_id=room_id; | ||
| 326 | + getApp().globalData.room_goods_id=gid; | ||
| 327 | + //如果是会员分享过来的要记录 | ||
| 328 | + if(room_user_share) | ||
| 329 | + getApp().globalData.room_user_share=room_user_share; | ||
| 330 | + } | ||
| 331 | + | ||
| 332 | + var c_guide_id=t.c_guide_id; | ||
| 333 | + if(c_guide_id){ | ||
| 334 | + th.data.c_guide_id=c_guide_id; | ||
| 335 | + } | ||
| 336 | + | ||
| 337 | + getApp().getConfig(function(e) { | ||
| 338 | + ee.setData({sto_sele_name_1:e.store_name}) | ||
| 339 | + }) | ||
| 340 | + | ||
| 341 | + //----获取系统参数----- | ||
| 342 | + getApp().getConfig2(function(e) { | ||
| 343 | + ee.setData({ | ||
| 344 | + bconfig: e, | ||
| 345 | + sales_rules:e.sales_rules, | ||
| 346 | + }); | ||
| 347 | + | ||
| 348 | + if (e.categoryset.indexOf("," + 1 + ",") != -1) { | ||
| 349 | + ee.setData({ | ||
| 350 | + is_show_pl: 1 | ||
| 351 | + }); | ||
| 352 | + } | ||
| 353 | + if (e.categoryset.indexOf("," + 3 + ",") != -1) { | ||
| 354 | + ee.setData({ | ||
| 355 | + is_show_pp: 1 | ||
| 356 | + }); | ||
| 357 | + } | ||
| 358 | + if (e.categoryset.indexOf("," + 2 + ",") != -1) { | ||
| 359 | + ee.setData({ | ||
| 360 | + is_show_gb: 1 | ||
| 361 | + }); | ||
| 362 | + } | ||
| 363 | + | ||
| 364 | + var json_d = JSON.parse(e.switch_list); | ||
| 365 | + ee.setData({ | ||
| 366 | + store_config: e, | ||
| 367 | + sys_switch:json_d, | ||
| 368 | + is_closecoupon: json_d.is_closecoupon, | ||
| 369 | + is_newsales_rules:json_d.is_newsales_rules | ||
| 370 | + }); | ||
| 371 | + ee.init(gid); | ||
| 372 | + //------几人评价------- | ||
| 373 | + //n.init(th, "", "comments"); | ||
| 374 | + | ||
| 375 | + th.requestCardNum(), wx.pageScrollTo && th.setData({ | ||
| 376 | + supportPageScroll: !0 | ||
| 377 | + }); | ||
| 378 | + | ||
| 379 | + //计算等级价相关 | ||
| 380 | + var swithc_list=e.switch_list; | ||
| 381 | + var sw_arr=JSON.parse(swithc_list); | ||
| 382 | + //---如果后台又开等级卡的开关--- | ||
| 383 | + if(sw_arr.rank_switch && sw_arr.rank_switch=="2"){ | ||
| 384 | + th.setData({rank_switch:true}); | ||
| 385 | + //---回调卡的列表--- | ||
| 386 | + th.getPlusCardType(function(ob){ | ||
| 387 | + th.setData({card_list:ob.card_list}); | ||
| 388 | + var ti = setInterval(function () { | ||
| 389 | + var user = getApp().globalData.userInfo; | ||
| 390 | + if (!user) return false; | ||
| 391 | + clearInterval(ti); | ||
| 392 | + | ||
| 393 | + if(user.card_field && user['card_expiredate']){ | ||
| 394 | + var str = user['card_expiredate'].replace(/-/g, '/'); | ||
| 395 | + var end = new Date(str); | ||
| 396 | + end = Date.parse(end) / 1000; | ||
| 397 | + var now = ut.gettimestamp(); | ||
| 398 | + //--- 判断是等级会员,且在有效期范围内 --- | ||
| 399 | + if(user.card_field && now<end){ | ||
| 400 | + var card_name=ob.name_map.get(user.card_field); | ||
| 401 | + if(card_name.length>6) card_name=card_name.substring(0,6); | ||
| 402 | + | ||
| 403 | + var is_near_date=0; | ||
| 404 | + if(end-now<60*60*30*24) is_near_date=1; //如果小于30天 | ||
| 405 | + th.setData({card_field:user.card_field,card_name:card_name,card_list:ob.card_list,is_near_date:is_near_date}); | ||
| 406 | + } | ||
| 407 | + } | ||
| 408 | + }, 500) | ||
| 409 | + }) | ||
| 410 | + } | ||
| 411 | + | ||
| 412 | + },1); | ||
| 413 | + | ||
| 414 | + //获取用户设备信息,屏幕宽度 | ||
| 415 | + wx.getSystemInfo({ | ||
| 416 | + success: res => { | ||
| 417 | + that.setData({ | ||
| 418 | + screenWidth: res.screenWidth | ||
| 419 | + }) | ||
| 420 | + } | ||
| 421 | + }); | ||
| 422 | + | ||
| 423 | + //获取用户的默认门店 | ||
| 424 | + getApp().get_user_store(function(e) { | ||
| 425 | + if(!e) { | ||
| 426 | + th.data.fir_def_store={}; //赋值空对象 | ||
| 427 | + return false; | ||
| 428 | + } | ||
| 429 | + var ee=JSON.parse(JSON.stringify(e)); | ||
| 430 | + //--定时器推迟一下-- | ||
| 431 | + setTimeout(function () { | ||
| 432 | + if(th.data.data) var g_distr_type=th.data.data.distr_type; | ||
| 433 | + //--如果默认门店的配送方式不对,就不能被选择,这里不控制,如果不一样,就说明配送方式不对-- | ||
| 434 | + if(ee.distr_type!=0 && g_distr_type!=0 && ee.distr_type!=g_distr_type ){ | ||
| 435 | + //th.data.fir_def_store={}; //赋值空对象 | ||
| 436 | + //return false; | ||
| 437 | + //th.data.fir_def_store.is_no_dis=1; | ||
| 438 | + ee.is_no_dis=1; | ||
| 439 | + } | ||
| 440 | + | ||
| 441 | + var appd=getApp().globalData; | ||
| 442 | + var w_time = setInterval(function() { | ||
| 443 | + if (that.data.is_get_local_ok == 0) return false; | ||
| 444 | + clearInterval(w_time); | ||
| 445 | + var distance = null; | ||
| 446 | + var e=JSON.parse(JSON.stringify(ee)); | ||
| 447 | + | ||
| 448 | + //如果有开启近距离的话,同时距离优不一样了 | ||
| 449 | + if (that.data.lat != null) { | ||
| 450 | + //如果经纬度有变化的话 | ||
| 451 | + if( appd.lat==that.data.lat && appd.lon==that.data.lon && e.distance>0 ){ | ||
| 452 | + that.data.fir_def_store=e; | ||
| 453 | + that.setData({ | ||
| 454 | + def_pick_store: e, | ||
| 455 | + sto_sele_name: e.pickup_name, | ||
| 456 | + sto_sele_id: e.pickup_id, | ||
| 457 | + sto_sele_distr: e.distr_type | ||
| 458 | + }) | ||
| 459 | + }else{ | ||
| 460 | + //要用接口是获取距离,js的计算不准 | ||
| 461 | + getApp().request.promiseGet("/api/weshop/pickup/list",{ | ||
| 462 | + data:{store_id:os.stoid,pickup_id:e.pickup_id,lat:th.data.lat,lon: th.data.lon}, | ||
| 463 | + }).then(res=>{ | ||
| 464 | + if(res.data.code==0){ | ||
| 465 | + e=res.data.data.pageData[0]; | ||
| 466 | + if (e){ | ||
| 467 | + e.is_no_dis=ee.is_no_dis; | ||
| 468 | + appd.pk_store=e; | ||
| 469 | + that.data.fir_def_store=e; | ||
| 470 | + that.setData({ | ||
| 471 | + def_pick_store: e, | ||
| 472 | + sto_sele_name: e.pickup_name, | ||
| 473 | + sto_sele_id: e.pickup_id, | ||
| 474 | + sto_sele_distr: e.distr_type | ||
| 475 | + }) | ||
| 476 | + } | ||
| 477 | + | ||
| 478 | + } | ||
| 479 | + }) | ||
| 480 | + } | ||
| 481 | + | ||
| 482 | + //e.distance = distance; | ||
| 483 | + appd.lat=that.data.lat; | ||
| 484 | + appd.lon=that.data.lon; | ||
| 485 | + | ||
| 486 | + }else{ | ||
| 487 | + if (e) { | ||
| 488 | + e.distance = null; | ||
| 489 | + that.data.fir_def_store=e; | ||
| 490 | + that.setData({ | ||
| 491 | + def_pick_store: e, | ||
| 492 | + sto_sele_name: e.pickup_name, | ||
| 493 | + sto_sele_id: e.pickup_id, | ||
| 494 | + sto_sele_distr: e.distr_type | ||
| 495 | + }) | ||
| 496 | + } | ||
| 497 | + } | ||
| 498 | + }, 500) | ||
| 499 | + },700) | ||
| 500 | + | ||
| 501 | + }); | ||
| 502 | + | ||
| 503 | + }, | ||
| 504 | + | ||
| 505 | + //------------程序初始化入口------------- | ||
| 506 | + async init(gid) { | ||
| 507 | + var ee = this, | ||
| 508 | + th = ee, | ||
| 509 | + gallery = null, | ||
| 510 | + is_collect = 0, | ||
| 511 | + collect_id = 0, | ||
| 512 | + categories3 = ee.data.categories3, | ||
| 513 | + fir_com = null, | ||
| 514 | + fir_quan = null, | ||
| 515 | + mapurl = null, | ||
| 516 | + mapurl_f_img = null; | ||
| 517 | + | ||
| 518 | + | ||
| 519 | + //------图片滚动---------- | ||
| 520 | + await getApp().request.promiseGet("/api/weshop/goodsimages/page", { | ||
| 521 | + data: { | ||
| 522 | + store_id: os.stoid, | ||
| 523 | + goods_id: gid, | ||
| 524 | + }, | ||
| 525 | + }).then(res => { | ||
| 526 | + | ||
| 527 | + var t = res; | ||
| 528 | + var g = t.data.data.pageData; | ||
| 529 | + if (g.length == 0) { | ||
| 530 | + var ie = { | ||
| 531 | + "image_url": o.imghost + "/public/images/default_goods_image_240.gif" | ||
| 532 | + }; | ||
| 533 | + g.push(ie); | ||
| 534 | + gallery = g; | ||
| 535 | + return; | ||
| 536 | + } | ||
| 537 | + for (var i = 0; i < g.length; i++) { | ||
| 538 | + if (g[i].image_url.indexOf(o.imghost) == -1) | ||
| 539 | + g[i].image_url = o.imghost + g[i].image_url; | ||
| 540 | + } | ||
| 541 | + gallery = g; | ||
| 542 | + }) | ||
| 543 | + //------是否收藏---------- | ||
| 544 | + await getApp().request.promiseGet("/api/weshop/goodscollect/page", { | ||
| 545 | + data: { | ||
| 546 | + store_id: os.stoid, | ||
| 547 | + goods_id: gid, | ||
| 548 | + user_id: oo.user_id, | ||
| 549 | + } | ||
| 550 | + }).then(res => { | ||
| 551 | + var t = res; | ||
| 552 | + var data = t.data.data.pageData; | ||
| 553 | + if (data.length > 0) { | ||
| 554 | + //ee.setData({ is_collect: 1, collect_id: data[0].collect_id, }); | ||
| 555 | + is_collect = 1; | ||
| 556 | + collect_id = data[0].collect_id; | ||
| 557 | + } | ||
| 558 | + }) | ||
| 559 | + | ||
| 560 | + //------获取评价的统计数量---- | ||
| 561 | + await getApp().request.promiseGet("/api/weshop/comment/countlist/", { | ||
| 562 | + data: { | ||
| 563 | + store_id: os.stoid, | ||
| 564 | + goods_id: gid | ||
| 565 | + }, | ||
| 566 | + //failRollback: !0, | ||
| 567 | + | ||
| 568 | + }).then(res => { | ||
| 569 | + var t = res; | ||
| 570 | + var g = t.data.data[0]; | ||
| 571 | + if (g != null && g != undefined) { | ||
| 572 | + var allnum = g.c0 + g.c1 + g.c2 + g.c3 + g.c4 + g.c5; | ||
| 573 | + var num2 = g.c4 + g.c5; | ||
| 574 | + var num3 = g.c3; | ||
| 575 | + var num4 = g.c0 + g.c1 + g.c2; | ||
| 576 | + | ||
| 577 | + var dd = ee.data.categories3; | ||
| 578 | + dd[0].num = allnum; | ||
| 579 | + dd[1].num = g.cimg; | ||
| 580 | + dd[2].num = num2; | ||
| 581 | + dd[3].num = num3; | ||
| 582 | + dd[4].num = num4; | ||
| 583 | + | ||
| 584 | + categories3 = dd; | ||
| 585 | + } | ||
| 586 | + }) | ||
| 587 | + | ||
| 588 | + //----获取详情页的评价---- | ||
| 589 | + await getApp().request.promiseGet("/api/weshop/comment/pageComment", { | ||
| 590 | + data: { | ||
| 591 | + store_id: os.stoid, | ||
| 592 | + goods_id: gid, | ||
| 593 | + pageSize: 3, | ||
| 594 | + parent_id: 0, | ||
| 595 | + page:1, | ||
| 596 | + is_show:1, | ||
| 597 | + }, | ||
| 598 | + }).then(res => { | ||
| 599 | + fir_com = res.data.data.pageData; | ||
| 600 | + }) | ||
| 601 | + | ||
| 602 | + if (fir_com) { | ||
| 603 | + for (var ind in fir_com) { | ||
| 604 | + if (fir_com[ind].head_pic == "") fir_com[ind].head_pic = ee.data.iurl + "/miniapp/images/hui_hear_pic.png"; | ||
| 605 | + if (fir_com[ind].img) fir_com[ind].img = ut.unserialize(fir_com[ind].img); | ||
| 606 | + if (fir_com[ind].weapp_img) fir_com[ind].weapp_img = JSON.parse(fir_com[ind].weapp_img); | ||
| 607 | + } | ||
| 608 | + } | ||
| 609 | + | ||
| 610 | + if (th.data.is_closecoupon != 1) { | ||
| 611 | + //----获取详情页的券的数量---- | ||
| 612 | + await getApp().request.promiseGet("/api/weshop/prom/coupon/pageCouponList", { | ||
| 613 | + data: { | ||
| 614 | + store_id: os.stoid, | ||
| 615 | + type: 1, | ||
| 616 | + pageSize: 3, | ||
| 617 | + page: 1, | ||
| 618 | + is_share:0, | ||
| 619 | + }, | ||
| 620 | + }).then(res1 => { | ||
| 621 | + fir_quan = res1.data.data.pageData; | ||
| 622 | + }) | ||
| 623 | + } | ||
| 624 | + | ||
| 625 | + //--------获取视频图片--------- | ||
| 626 | + // await getApp().request.promiseGet("/api/weshop/goodsVideos/get/" + os.stoid + "/" + ee.data.gid, { | ||
| 627 | + // 1: 1 | ||
| 628 | + // }).then(res1 => { | ||
| 629 | + // if (res1.data.code == 0) { | ||
| 630 | + // mapurl = res1.data.data.video_url; | ||
| 631 | + // mapurl_f_img = res1.data.data.video_img; | ||
| 632 | + // } | ||
| 633 | + // }) | ||
| 634 | + | ||
| 635 | + ee.setData({ | ||
| 636 | + gallery: gallery, | ||
| 637 | + is_collect: is_collect, | ||
| 638 | + collect_id: collect_id, | ||
| 639 | + categories3: categories3, | ||
| 640 | + fir_quan: fir_quan, | ||
| 641 | + fir_comments: fir_com, | ||
| 642 | + mapurl_f_img: mapurl_f_img, | ||
| 643 | + mapurl: mapurl, | ||
| 644 | + }); | ||
| 645 | + | ||
| 646 | + }, | ||
| 647 | + | ||
| 648 | + //---展示--- | ||
| 649 | + onShow: function() { | ||
| 650 | + var goods_list = null,th = this,that=this; | ||
| 651 | + | ||
| 652 | + //优惠券要实时更新 | ||
| 653 | + getApp().getConfig2(function(e) { | ||
| 654 | + var json_d = JSON.parse(e.switch_list); | ||
| 655 | + th.setData({is_closecoupon: json_d.is_closecoupon}) | ||
| 656 | + th.setData({is_open_offline: json_d.is_pricing_open}) | ||
| 657 | + },1) | ||
| 658 | + | ||
| 659 | + | ||
| 660 | + var ui = setInterval(function () { | ||
| 661 | + goods_list = th.selectComponent("#goods_list"); | ||
| 662 | + if (goods_list) { | ||
| 663 | + clearInterval(ui); | ||
| 664 | + goods_list.init(); | ||
| 665 | + return false | ||
| 666 | + } | ||
| 667 | + }, 300) | ||
| 668 | + | ||
| 669 | + this.data.is_timer = 1; | ||
| 670 | + var ee = this, | ||
| 671 | + gid = this.data.gid, | ||
| 672 | + i = getApp().request; | ||
| 673 | + | ||
| 674 | + this.wait_for_store_config(); | ||
| 675 | + | ||
| 676 | + i.get("/api/weshop/serviceCard/get/" + o.stoid + "/" + ee.data.gid, { | ||
| 677 | + failRollback: !0, | ||
| 678 | + success: function(t) { | ||
| 679 | + if (t.data.code == 0) { | ||
| 680 | + console.log('xx==><==', t.data.data); | ||
| 681 | + // let data = { | ||
| 682 | + // goods_name: t.data.data.serviceName, | ||
| 683 | + // }; | ||
| 684 | + that.setData({ | ||
| 685 | + 'data.goods_name': t.data.data.serviceName, | ||
| 686 | + 'data.shop_price': t.data.data.money, | ||
| 687 | + 'data.validDays': t.data.data.validDays, | ||
| 688 | + 'data.serviceContent': t.data.data.serviceContent, | ||
| 689 | + 'data.image_url': t.data.data.imgUrl, | ||
| 690 | + 'data.goods_id': t.data.data.id, | ||
| 691 | + }); | ||
| 692 | + // self.setData({ | ||
| 693 | + // details: t.data.data, | ||
| 694 | + // data, | ||
| 695 | + // }); | ||
| 696 | + // if (t.data.data.is_on_sale != 1) { | ||
| 697 | + // wx.showModal({ | ||
| 698 | + // title: '商品已经下架', | ||
| 699 | + // showCancel: !1, | ||
| 700 | + // complete: function() { | ||
| 701 | + // wx.navigateBack(); | ||
| 702 | + // } | ||
| 703 | + // }); | ||
| 704 | + // } | ||
| 705 | + | ||
| 706 | + // var timestamp = Date.parse(new Date()); | ||
| 707 | + // timestamp = timestamp / 1000; | ||
| 708 | + // if (t.data.data.on_time > timestamp) { | ||
| 709 | + // wx.showModal({ | ||
| 710 | + // title: '商品还未上架', | ||
| 711 | + // showCancel: !1, | ||
| 712 | + // complete: function() { | ||
| 713 | + // wx.navigateBack(); | ||
| 714 | + // } | ||
| 715 | + // }); | ||
| 716 | + // } | ||
| 717 | + | ||
| 718 | + // if (t.data.data.down_time > 0) { | ||
| 719 | + // if (t.data.data.down_time < timestamp) { | ||
| 720 | + // wx.showModal({ | ||
| 721 | + // title: '商品已经到期下架', | ||
| 722 | + // showCancel: !1, | ||
| 723 | + // complete: function() { | ||
| 724 | + // wx.navigateBack(); | ||
| 725 | + // } | ||
| 726 | + // }); | ||
| 727 | + // } | ||
| 728 | + // } | ||
| 729 | + | ||
| 730 | + // ee.check_is_youhui(ee.data.gid); | ||
| 731 | + | ||
| 732 | + // t.data.data.on_time = ut.formatTime(t.data.data.on_time, 'yyyy-MM-dd hh:mm:ss'); | ||
| 733 | + // var txt = (t.data.data.shop_price / t.data.data.market_price * 10).toFixed(2).toString(); | ||
| 734 | + | ||
| 735 | + | ||
| 736 | + // if(txt != 0) { | ||
| 737 | + // if(txt.indexOf('.') != -1) { | ||
| 738 | + // var arrtxt = txt.split('.'); | ||
| 739 | + // if(arrtxt[1].length == 1 && arrtxt[1][0] == 0) { | ||
| 740 | + // txt = txt.slice(0,-2); | ||
| 741 | + // }; | ||
| 742 | + | ||
| 743 | + // if(arrtxt[1].length == 2 && arrtxt[1][1] == 0) { | ||
| 744 | + // txt = txt.slice(0,-1); | ||
| 745 | + // }; | ||
| 746 | + // }; | ||
| 747 | + // } else { | ||
| 748 | + // txt = 0; | ||
| 749 | + // } | ||
| 750 | + | ||
| 751 | + | ||
| 752 | + // t.data.data['disc'] = txt; | ||
| 753 | + | ||
| 754 | + // if (t.data.data.original_img.indexOf(o.imghost) == -1) | ||
| 755 | + // t.data.data.original_img = o.imghost + t.data.data.original_img; | ||
| 756 | + | ||
| 757 | + // if (t.data.data.goods_content == null) t.data.data.goods_content = ""; | ||
| 758 | + | ||
| 759 | + // //-----商品详情--- | ||
| 760 | + // if(!t.data.data.goods_content) t.data.data.goods_content=" "; | ||
| 761 | + // a.wxParse("content", "html", t.data.data.goods_content, ee, 6); | ||
| 762 | + // e.wxParseAddFullImageUrl(ee, "content"); | ||
| 763 | + | ||
| 764 | + // ee.setData({ | ||
| 765 | + // data: t.data.data, | ||
| 766 | + // sele_g: t.data.data, | ||
| 767 | + // userInfo:getApp().globalData.userInfo | ||
| 768 | + // }); | ||
| 769 | + | ||
| 770 | + | ||
| 771 | + // //获取统一条形码,普通商品和优惠促销的商品 | ||
| 772 | + // if (ee.data.data.prom_type == 0 || ee.data.data.prom_type == 2 || ee.data.data.prom_type == 3 || ee.data.data.prom_type == 5){ | ||
| 773 | + // //默认门店要拿下门店库存 | ||
| 774 | + // if(that.data.sales_rules==2 && that.data.is_newsales_rules){ | ||
| 775 | + // //获取门店 | ||
| 776 | + // ee.get_sto(); | ||
| 777 | + // //--等待某个值只运行---,这里有可能因为导航的时间太久,而不能计算门店库存 | ||
| 778 | + // getApp().waitfor2(that,"wait_for_user_store","fir_def_store",function(){ | ||
| 779 | + // if(th.data.fir_def_store && th.data.fir_def_store.pickup_id ){ | ||
| 780 | + // var lock=0,plist=null; | ||
| 781 | + // //先读取门店的lock,采用链式写法,少用await | ||
| 782 | + // getApp().request.promiseGet("/api/weshop/order/ware/lock/page",{ | ||
| 783 | + // data:{store_id:os.stoid,wareId:ee.data.data.goods_id,storageId:that.data.fir_def_store.pickup_id,pageSize:1000} | ||
| 784 | + // }).then(res=>{ | ||
| 785 | + // if(res.data.code==0 && res.data.data.total>0){ | ||
| 786 | + // for(var i in res.data.data.pageData) | ||
| 787 | + // lock+=res.data.data.pageData[i].outQty | ||
| 788 | + // } | ||
| 789 | + // //---通过接口获取门店的线下库存信息-- | ||
| 790 | + // return getApp().request.promiseGet("/api/weshop/goods/getWareStorages",{ | ||
| 791 | + // data:{storageNos:that.data.fir_def_store.pickup_no,wareIds:encodeURIComponent(th.data.data.erpwareid),storeId:os.stoid} | ||
| 792 | + // }) | ||
| 793 | + // }).then(res=>{ | ||
| 794 | + // if(res.data.code==0 && res.data.data.total>0){ | ||
| 795 | + // plist=res.data.data.pageData[0]; | ||
| 796 | + // } | ||
| 797 | + // if(plist && plist.CanOutQty-lock>0){ | ||
| 798 | + // that.data.fir_def_store.CanOutQty=plist.CanOutQty-lock; | ||
| 799 | + // }else{ | ||
| 800 | + // that.data.fir_def_store.CanOutQty=0; | ||
| 801 | + // } | ||
| 802 | + // //--给门店赋值线下库存-- | ||
| 803 | + // th.setData({def_pick_store:that.data.fir_def_store}); | ||
| 804 | + // }) | ||
| 805 | + // } | ||
| 806 | + // }) | ||
| 807 | + // }else{ | ||
| 808 | + // //获取门店 | ||
| 809 | + // ee.get_sto(); | ||
| 810 | + // } | ||
| 811 | + | ||
| 812 | + // ee.get_sku(o.stoid, t.data.data.sku, gid); | ||
| 813 | + // } | ||
| 814 | + // else { | ||
| 815 | + // var gg = "", item = t.data.data; | ||
| 816 | + | ||
| 817 | + // if(item.goods_spec=="null" || item.goods_spec==null ) item.goods_spec=""; | ||
| 818 | + // if(item.goods_color=="null" || item.goods_color==null) item.goods_color=""; | ||
| 819 | + | ||
| 820 | + // if (item.goods_spec != "" && item.goods_color != "") { | ||
| 821 | + // gg = item.goods_spec + "/" + item.goods_color; | ||
| 822 | + // } else if (item.goods_spec != "" || item.goods_color != "") { | ||
| 823 | + // gg = item.goods_spec + item.goods_color; | ||
| 824 | + // } else { | ||
| 825 | + // gg = "规格1"; | ||
| 826 | + // } | ||
| 827 | + // t.data.data.gg = gg; | ||
| 828 | + // var uu = []; | ||
| 829 | + // uu.push(t.data.data); | ||
| 830 | + // ee.setData({ | ||
| 831 | + // sku_g: uu, | ||
| 832 | + // }); | ||
| 833 | + // } | ||
| 834 | + // ee.data.g_buy_num = new Map(); | ||
| 835 | + // ee.check_prom(gid, ee.data.data.prom_type, ee.data.data.prom_id); | ||
| 836 | + | ||
| 837 | + // var th = ee; | ||
| 838 | + // if (ee.data.cat_name == '') { | ||
| 839 | + // //过去国别,分类,品牌的名称 | ||
| 840 | + // i.get("/api/weshop/goodscategory/get/" + o.stoid + "/" + th.data.data.cat_id, { | ||
| 841 | + // success: function(t) { | ||
| 842 | + // var dd = t.data.data; | ||
| 843 | + // if (t.data.code == 0) { | ||
| 844 | + // th.setData({ | ||
| 845 | + // cat_name: dd.name | ||
| 846 | + // }); | ||
| 847 | + // } | ||
| 848 | + // } | ||
| 849 | + // }); | ||
| 850 | + // //过去国别,分类,品牌的名称 | ||
| 851 | + // i.get("/api/weshop/brand/get/" + o.stoid + "/" + th.data.data.brand_id, { | ||
| 852 | + // success: function(t) { | ||
| 853 | + // var dd = t.data.data; | ||
| 854 | + // if (t.data.code == 0) { | ||
| 855 | + // th.setData({ | ||
| 856 | + // brand_name: dd.name | ||
| 857 | + // }); | ||
| 858 | + // } | ||
| 859 | + // } | ||
| 860 | + // }); | ||
| 861 | + // //过去国别,分类,品牌的名称 | ||
| 862 | + // i.get("/api/weshop/nation/get/" + o.stoid + "/" + th.data.data.nation_id, { | ||
| 863 | + // success: function(t) { | ||
| 864 | + // var dd = t.data.data; | ||
| 865 | + // if (t.data.code == 0) { | ||
| 866 | + // th.setData({ | ||
| 867 | + // nation_name: dd.name | ||
| 868 | + // }); | ||
| 869 | + // } | ||
| 870 | + // } | ||
| 871 | + // }); | ||
| 872 | + // } | ||
| 873 | + | ||
| 874 | + } else { | ||
| 875 | + wx.showModal({ | ||
| 876 | + title: t.data.msg, | ||
| 877 | + showCancel: !1, | ||
| 878 | + complete: function() { | ||
| 879 | + wx.navigateBack(); | ||
| 880 | + } | ||
| 881 | + }); | ||
| 882 | + }; | ||
| 883 | + } | ||
| 884 | + }); | ||
| 885 | + this.data.enterAddressPage && (this.data.enterAddressPage = !1); | ||
| 886 | + | ||
| 887 | + }, | ||
| 888 | + enterAddress: function() { | ||
| 889 | + this.data.enterAddressPage = !0, wx.navigateTo({ | ||
| 890 | + url: "/pages/user/address_list/address_list?operate=selectAddress" | ||
| 891 | + }); | ||
| 892 | + }, | ||
| 893 | + onUnload: function() { | ||
| 894 | + for(var i = 1; i < 100; i++) { | ||
| 895 | + clearInterval(i); | ||
| 896 | + } | ||
| 897 | + }, | ||
| 898 | + onHide: function() { | ||
| 899 | + this.data.is_timer = 0; | ||
| 900 | + for(var i = 1; i < 100; i++) { | ||
| 901 | + clearInterval(i); | ||
| 902 | + } | ||
| 903 | + }, | ||
| 904 | + //----------三个选项按钮----------- | ||
| 905 | + tabClick: function(t) { | ||
| 906 | + var e = t.currentTarget.id; | ||
| 907 | + this.setData({ | ||
| 908 | + activeCategoryId: e | ||
| 909 | + }), 1 == e ? this.tabGoodsContent() : 2 == e && this.tabComment(); | ||
| 910 | + }, | ||
| 911 | + tabClick2: function(t) { | ||
| 912 | + this.setData({ | ||
| 913 | + activeCategoryId2: t.currentTarget.id | ||
| 914 | + }); | ||
| 915 | + }, | ||
| 916 | + | ||
| 917 | + tabClick3: function(t) { | ||
| 918 | + var e = this; | ||
| 919 | + if (t.currentTarget.id != this.data.activeCategoryId3) { | ||
| 920 | + e.data.c_curr_p = 1; | ||
| 921 | + this.setData({ | ||
| 922 | + activeCategoryId3: t.currentTarget.id, | ||
| 923 | + comments: null,comments_no_more:0,get_c:0, | ||
| 924 | + }); | ||
| 925 | + this.requestComments_new(); | ||
| 926 | + } | ||
| 927 | + }, | ||
| 928 | + | ||
| 929 | + doScrollTop: function() { | ||
| 930 | + wx.pageScrollTo({ | ||
| 931 | + scrollTop: 0 | ||
| 932 | + }); | ||
| 933 | + }, | ||
| 934 | + | ||
| 935 | + tabComment: function() { | ||
| 936 | + this.setData({ | ||
| 937 | + activeCategoryId: 2,comments_no_more:0,get_c:0 | ||
| 938 | + }), this.data.comments || this.requestComments_new(); | ||
| 939 | + }, | ||
| 940 | + | ||
| 941 | + //商品详情的时候调用 | ||
| 942 | + tabGoodsContent: function() { | ||
| 943 | + var th = this, | ||
| 944 | + i = getApp().request; | ||
| 945 | + this.setData({ | ||
| 946 | + activeCategoryId: 1 | ||
| 947 | + }); | ||
| 948 | + | ||
| 949 | + if (th.data.cat_name == '') { | ||
| 950 | + //过去国别,分类,品牌的名称 | ||
| 951 | + i.get("/api/weshop/goodscategory/get/" + o.stoid + "/" + th.data.data.cat_id, { | ||
| 952 | + success: function(t) { | ||
| 953 | + var dd = t.data.data; | ||
| 954 | + if (t.data.code == 0) { | ||
| 955 | + th.setData({ | ||
| 956 | + cat_name: dd.name | ||
| 957 | + }); | ||
| 958 | + } | ||
| 959 | + } | ||
| 960 | + }); | ||
| 961 | + //过去国别,分类,品牌的名称 | ||
| 962 | + i.get("/api/weshop/brand/get/" + o.stoid + "/" + th.data.data.brand_id, { | ||
| 963 | + success: function(t) { | ||
| 964 | + var dd = t.data.data; | ||
| 965 | + if (t.data.code == 0) { | ||
| 966 | + th.setData({ | ||
| 967 | + brand_name: dd.name | ||
| 968 | + }); | ||
| 969 | + } | ||
| 970 | + } | ||
| 971 | + }); | ||
| 972 | + //过去国别,分类,品牌的名称 | ||
| 973 | + i.get("/api/weshop/nation/get/" + o.stoid + "/" + th.data.data.nation_id, { | ||
| 974 | + success: function(t) { | ||
| 975 | + var dd = t.data.data; | ||
| 976 | + if (t.data.code == 0) { | ||
| 977 | + th.setData({ | ||
| 978 | + nation_name: dd.name | ||
| 979 | + }); | ||
| 980 | + } | ||
| 981 | + } | ||
| 982 | + }); | ||
| 983 | + } | ||
| 984 | + }, | ||
| 985 | + | ||
| 986 | + //获取redis中的数量 | ||
| 987 | + async getactLen(func) { | ||
| 988 | + var r_num = 0, | ||
| 989 | + prom_type = this.data.prom_type, | ||
| 990 | + prom_id = this.data.prom_id; | ||
| 991 | + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, { | ||
| 992 | + 1: 1 | ||
| 993 | + }).then(res => { | ||
| 994 | + var em = res; | ||
| 995 | + if (em.data.code == 0) { | ||
| 996 | + r_num = em.data.data; | ||
| 997 | + } | ||
| 998 | + }) | ||
| 999 | + func(r_num); | ||
| 1000 | + }, | ||
| 1001 | + | ||
| 1002 | + //------------加入购物车-------------- | ||
| 1003 | + addCart: function(t) { | ||
| 1004 | + var th = this; | ||
| 1005 | + var ind = t.currentTarget.dataset.openSpecModal_ind; | ||
| 1006 | + if(!ind) ind = t.currentTarget.dataset.openspecmodal_ind; | ||
| 1007 | + th.setData({ | ||
| 1008 | + open_ind_store: ind | ||
| 1009 | + }); | ||
| 1010 | + //如果是秒杀的话,要看redis够不够 | ||
| 1011 | + if (this.data.prom_type == 1) { | ||
| 1012 | + this.getactLen(function(num) { | ||
| 1013 | + if (num < th.data.goodsInputNum) { | ||
| 1014 | + getApp().my_warnning("秒杀库存不足!", 0, th); | ||
| 1015 | + return false; | ||
| 1016 | + } else { | ||
| 1017 | + th.add_cart_func(t); | ||
| 1018 | + } | ||
| 1019 | + }); | ||
| 1020 | + } else { | ||
| 1021 | + th.add_cart_func(t); | ||
| 1022 | + } | ||
| 1023 | + }, | ||
| 1024 | + | ||
| 1025 | + | ||
| 1026 | + | ||
| 1027 | + //-- 加入购物的函数 -- | ||
| 1028 | + add_cart_func_inte: function(t) { | ||
| 1029 | + var i = getApp().request; | ||
| 1030 | + if (oo.user_id == null) { | ||
| 1031 | + return s.my_warnning("还未登录!", 0, this); | ||
| 1032 | + } | ||
| 1033 | + if(!getApp().globalData.userInfo){ | ||
| 1034 | + return s.my_warnning("还未登录!", 0, this); | ||
| 1035 | + } | ||
| 1036 | + | ||
| 1037 | + var e = this, | ||
| 1038 | + th = e, | ||
| 1039 | + a = 0, | ||
| 1040 | + o = this.data.data; | ||
| 1041 | + a = o.goods_id; | ||
| 1042 | + | ||
| 1043 | + //----------添加到购物车时,要判断限购数量,-------- | ||
| 1044 | + e.get_buy_num(o, function(ee) { | ||
| 1045 | + //---判断商品是否超出限购--- | ||
| 1046 | + if (th.data.g_buy_num != null && th.data.sele_g.viplimited > 0) { | ||
| 1047 | + if (th.data.goodsInputNum + th.data.g_buy_num.get(th.data.sele_g.goods_id) > th.data.sele_g.viplimited) { | ||
| 1048 | + wx.showModal({ | ||
| 1049 | + title: '提示', | ||
| 1050 | + content: '超出商品限购' | ||
| 1051 | + }); | ||
| 1052 | + return false; | ||
| 1053 | + } | ||
| 1054 | + } | ||
| 1055 | + //---判断商品是否超出活动限购--- | ||
| 1056 | + if (th.data.prom_buy_num != -1 && th.data.prom_buy_limit > 0) { | ||
| 1057 | + if (th.data.goodsInputNum + th.data.prom_buy_num > th.data.prom_buy_limit) { | ||
| 1058 | + wx.showModal({ | ||
| 1059 | + title: '提示', | ||
| 1060 | + content: '超出商品活动限购' | ||
| 1061 | + }); | ||
| 1062 | + return false; | ||
| 1063 | + } | ||
| 1064 | + } | ||
| 1065 | + | ||
| 1066 | + if (th.data.goodsInputNum <= 0) return s.my_warnning("商品数量不能为0", 0, th); | ||
| 1067 | + if (th.data.sto_sele_name == null || th.data.sto_sele_name == undefined) | ||
| 1068 | + this.setData({ | ||
| 1069 | + sto_sele_name: "" | ||
| 1070 | + }); | ||
| 1071 | + if (th.data.sto_sele_name == "") return s.my_warnning("请选择门店", 0, th); | ||
| 1072 | + | ||
| 1073 | + //--------------此时操作的数据------------ | ||
| 1074 | + var newd = { | ||
| 1075 | + goods_id: o.goods_id, | ||
| 1076 | + goods_num: th.data.goodsInputNum, | ||
| 1077 | + pick_id: th.data.sto_sele_id, | ||
| 1078 | + user_id: oo.user_id, | ||
| 1079 | + store_id: th.data.stoid, | ||
| 1080 | + goods_price: th.data.prom_price, | ||
| 1081 | + integral:th.data.prom_integral, | ||
| 1082 | + member_goods_price: o.shop_price, | ||
| 1083 | + goods_name: o.goods_name, | ||
| 1084 | + goods_sn: o.goods_sn, | ||
| 1085 | + sku: o.sku, | ||
| 1086 | + }; | ||
| 1087 | + | ||
| 1088 | + //---是不是从收藏夹出来的--- | ||
| 1089 | + if(th.data.c_guide_id){ | ||
| 1090 | + newd['guide_id'] = th.data.c_guide_id; | ||
| 1091 | + newd['guide_type']=2; | ||
| 1092 | + if ("add" == t.currentTarget.dataset.action) newd['guide_type']=3; | ||
| 1093 | + }else{ | ||
| 1094 | + if(getApp().globalData.guide_id){ | ||
| 1095 | + newd['guide_id'] = getApp().globalData.guide_id; | ||
| 1096 | + newd['guide_type']=0; | ||
| 1097 | + if ("add" == t.currentTarget.dataset.action) newd['guide_type']=1; | ||
| 1098 | + } | ||
| 1099 | + } | ||
| 1100 | + | ||
| 1101 | + //让商品带上房间号 | ||
| 1102 | + //让商品带上房间号 | ||
| 1103 | + if(th.data.sys_switch.is_skuroom_id==1){ | ||
| 1104 | + if(th.data.data.goods_id==getApp().globalData.room_goods_id){ | ||
| 1105 | + newd.room_id=getApp().globalData.room_id; | ||
| 1106 | + } | ||
| 1107 | + }else{ | ||
| 1108 | + if(newd.goods_id==getApp().globalData.room_goods_id) newd.room_id=getApp().globalData.room_id; | ||
| 1109 | + } | ||
| 1110 | + | ||
| 1111 | + //如果是积分够,is_integral_normal就要有积分购普通购买字段 | ||
| 1112 | + if(o.prom_type==4){ | ||
| 1113 | + newd.is_integral_normal=1; | ||
| 1114 | + } | ||
| 1115 | + | ||
| 1116 | + //-----如果是秒杀,团购,积分购,拼团----- | ||
| 1117 | + newd.prom_type = th.data.prom_type; | ||
| 1118 | + newd.prom_id = th.data.prom_id; | ||
| 1119 | + if (o.store_count <= 0) return s.my_warnning("库存已为空!", 0, th); | ||
| 1120 | + if (o.store_count <e.data.goodsInputNum) return s.my_warnning("库存不足!", 0, th); | ||
| 1121 | + | ||
| 1122 | + | ||
| 1123 | + th.add_cart_next(e,t,a,o,newd); //立即购买下一步 | ||
| 1124 | + | ||
| 1125 | + }) | ||
| 1126 | + }, | ||
| 1127 | + | ||
| 1128 | + //-- 加入购物的函数 -- | ||
| 1129 | + add_cart_func: function(t) { | ||
| 1130 | + var i = getApp().request; | ||
| 1131 | + if (oo.user_id == null) { | ||
| 1132 | + return s.my_warnning("还未登录!", 0, this); | ||
| 1133 | + } | ||
| 1134 | + | ||
| 1135 | + if(!getApp().globalData.userInfo){ | ||
| 1136 | + return s.my_warnning("还未登录!", 0, this); | ||
| 1137 | + } | ||
| 1138 | + | ||
| 1139 | + var e = this, | ||
| 1140 | + th = e, | ||
| 1141 | + a = 0, | ||
| 1142 | + o = this.data.sele_g; | ||
| 1143 | + a = o.goods_id; | ||
| 1144 | + | ||
| 1145 | + //----------添加到购物车时,要判断限购数量,-------- | ||
| 1146 | + e.get_buy_num(o, function(ee) { | ||
| 1147 | + //---判断商品是否超出限购--- | ||
| 1148 | + if (th.data.g_buy_num != null && th.data.sele_g.viplimited > 0) { | ||
| 1149 | + if (th.data.goodsInputNum + th.data.g_buy_num.get(th.data.sele_g.goods_id) > th.data.sele_g.viplimited) { | ||
| 1150 | + wx.showModal({ | ||
| 1151 | + title: '提示', | ||
| 1152 | + content: '超出商品限购' | ||
| 1153 | + }); | ||
| 1154 | + return false; | ||
| 1155 | + } | ||
| 1156 | + } | ||
| 1157 | + //---判断商品是否超出活动限购--- | ||
| 1158 | + if (th.data.prom_buy_num != -1 && th.data.prom_buy_limit > 0) { | ||
| 1159 | + if (th.data.goodsInputNum + th.data.prom_buy_num > th.data.prom_buy_limit) { | ||
| 1160 | + wx.showModal({ | ||
| 1161 | + title: '提示', | ||
| 1162 | + content: '超出商品活动限购' | ||
| 1163 | + }); | ||
| 1164 | + return false; | ||
| 1165 | + } | ||
| 1166 | + } | ||
| 1167 | + | ||
| 1168 | + if (th.data.goodsInputNum <= 0) return s.my_warnning("商品数量不能为0", 0, th); | ||
| 1169 | + if (th.data.sto_sele_name == null || th.data.sto_sele_name == undefined) | ||
| 1170 | + this.setData({ | ||
| 1171 | + sto_sele_name: "" | ||
| 1172 | + }); | ||
| 1173 | + if (th.data.sto_sele_name == "") return s.my_warnning("请选择门店", 0, th); | ||
| 1174 | + | ||
| 1175 | + //--------------此时操作的数据------------ | ||
| 1176 | + var newd = { | ||
| 1177 | + goods_id: o.goods_id, | ||
| 1178 | + goods_num: th.data.goodsInputNum, | ||
| 1179 | + pick_id: th.data.sto_sele_id, | ||
| 1180 | + user_id: oo.user_id, | ||
| 1181 | + store_id: th.data.stoid, | ||
| 1182 | + goods_price: o.shop_price, | ||
| 1183 | + member_goods_price: o.shop_price, | ||
| 1184 | + goods_name: o.goods_name, | ||
| 1185 | + goods_sn: o.goods_sn, | ||
| 1186 | + sku: o.sku, | ||
| 1187 | + }; | ||
| 1188 | + | ||
| 1189 | + //---是不是从收藏夹出来的--- | ||
| 1190 | + if(th.data.c_guide_id){ | ||
| 1191 | + newd['guide_id'] = th.data.c_guide_id; | ||
| 1192 | + newd['guide_type']=2; | ||
| 1193 | + if ("add" == t.currentTarget.dataset.action) newd['guide_type']=3; | ||
| 1194 | + }else{ | ||
| 1195 | + if(getApp().globalData.guide_id){ | ||
| 1196 | + newd['guide_id'] = getApp().globalData.guide_id; | ||
| 1197 | + newd['guide_type']=0; | ||
| 1198 | + if ("add" == t.currentTarget.dataset.action) newd['guide_type']=1; | ||
| 1199 | + } | ||
| 1200 | + } | ||
| 1201 | + | ||
| 1202 | + //让商品带上房间号 | ||
| 1203 | + //让商品带上房间号 | ||
| 1204 | + if(th.data.sys_switch.is_skuroom_id==1){ | ||
| 1205 | + if(th.data.data.goods_id==getApp().globalData.room_goods_id){ | ||
| 1206 | + newd.room_id=getApp().globalData.room_id; | ||
| 1207 | + } | ||
| 1208 | + }else{ | ||
| 1209 | + if(newd.goods_id==getApp().globalData.room_goods_id) newd.room_id=getApp().globalData.room_id; | ||
| 1210 | + } | ||
| 1211 | + | ||
| 1212 | + //如果是积分够,is_integral_normal就要有积分购普通购买字段 | ||
| 1213 | + if(o.prom_type==4){ | ||
| 1214 | + newd.is_integral_normal=1; | ||
| 1215 | + } | ||
| 1216 | + | ||
| 1217 | + //如果有线下取价 | ||
| 1218 | + if(o.offline_price){ | ||
| 1219 | + newd.offline_price=o.offline_price; | ||
| 1220 | + newd.pricing_type=o.pricing_type; | ||
| 1221 | + } | ||
| 1222 | + | ||
| 1223 | + //-----如果是秒杀,团购,积分购,拼团----- | ||
| 1224 | + if (th.data.prom_type == 1) { | ||
| 1225 | + newd.goods_price = th.data.prom_price; | ||
| 1226 | + newd.member_goods_price = th.data.prom_price, | ||
| 1227 | + newd.prom_type = th.data.prom_type; | ||
| 1228 | + newd.prom_id = th.data.prom_id; | ||
| 1229 | + | ||
| 1230 | + if (o.store_count <= 0) return s.my_warnning("库存已为空!", 0, th); | ||
| 1231 | + if (o.store_count <e.data.goodsInputNum) return s.my_warnning("库存不足!", 0, th); | ||
| 1232 | + | ||
| 1233 | + th.add_cart_next(e,t,a,o,newd); //加入购物车下一步 | ||
| 1234 | + | ||
| 1235 | + } | ||
| 1236 | + else if ( th.data.prom_type == 0 || th.data.prom_type == 3 || th.data.prom_type == 2 || th.data.prom_type == 4 || th.data.prom_type == 5) { | ||
| 1237 | + newd.prom_type = 0; | ||
| 1238 | + newd.prom_id = 0; | ||
| 1239 | + | ||
| 1240 | + //---如果是线下门店销售的时候--- | ||
| 1241 | + if(th.data.sales_rules==2){ | ||
| 1242 | + var pick=th.get_pick_from_list(th.data.sto_sele_id) | ||
| 1243 | + //---通过接口获取门店的线下库存信息-- | ||
| 1244 | + getApp().request.get("/api/weshop/goods/getWareStorages",{ | ||
| 1245 | + data:{storageNos:pick.pickup_no,wareIds:encodeURIComponent(th.data.sele_g.erpwareid),storeId:os.stoid}, | ||
| 1246 | + success:function(res){ | ||
| 1247 | + if(res.data.code==0){ | ||
| 1248 | + if(res.data.data.pageData.length>0){ | ||
| 1249 | + var CanOutQty=res.data.data.pageData[0].CanOutQty; | ||
| 1250 | + if(CanOutQty<e.data.goodsInputNum){ | ||
| 1251 | + return s.my_warnning("库存不足!", 0, th); | ||
| 1252 | + } | ||
| 1253 | + //在调一次接口,读取商品的预出库的数量,lock | ||
| 1254 | + getApp().request.get("/api/weshop/order/ware/lock/page",{ | ||
| 1255 | + data:{store_id:os.stoid,wareId:th.data.sele_g.goods_id,storageId:pick.pickup_id,pageSize:1000}, | ||
| 1256 | + success:function(res_data){ | ||
| 1257 | + if(res_data.data.code==0 && res_data.data.data.total>0){ | ||
| 1258 | + | ||
| 1259 | + var lock=0; | ||
| 1260 | + for(var i in res_data.data.data.pageData){ | ||
| 1261 | + lock+=res_data.data.data.pageData[i].outQty; | ||
| 1262 | + } | ||
| 1263 | + | ||
| 1264 | + if(CanOutQty<=lock){ | ||
| 1265 | + return s.my_warnning("库存不足!", 0, th); | ||
| 1266 | + } | ||
| 1267 | + th.add_cart_next(e,t,a,o,newd,CanOutQty-lock); | ||
| 1268 | + }else{ | ||
| 1269 | + th.add_cart_next(e,t,a,o,newd,CanOutQty); | ||
| 1270 | + } | ||
| 1271 | + } | ||
| 1272 | + }) | ||
| 1273 | + }else{ | ||
| 1274 | + return s.my_warnning("库存不足!", 0, th); | ||
| 1275 | + } | ||
| 1276 | + | ||
| 1277 | + } | ||
| 1278 | + } | ||
| 1279 | + }) | ||
| 1280 | + }else{ | ||
| 1281 | + if (o.store_count <= 0) return s.my_warnning("库存已为空!", 0, th); | ||
| 1282 | + if (o.store_count <e.data.goodsInputNum) return s.my_warnning("库存不足!", 0, th); | ||
| 1283 | + th.add_cart_next(e,t,a,o,newd); //加入购物车下一步 | ||
| 1284 | + } | ||
| 1285 | + } | ||
| 1286 | + }) | ||
| 1287 | + }, | ||
| 1288 | + | ||
| 1289 | + //---加入购物车的最后一步--- | ||
| 1290 | + add_cart_next(e,t,a,o,newd,CanOutQty){ | ||
| 1291 | + var th=this,i=getApp().request; | ||
| 1292 | + //---如果商品不是积分购和拼团,要判断一个是否要进行等级价的判断------ | ||
| 1293 | + if(o.prom_type!=1 && ((o.prom_type!=6 && o.prom_type!=4) || th.data.is_normal)){ | ||
| 1294 | + var conf=th.data.bconfig; | ||
| 1295 | + if (conf.switch_list && getApp().globalData.userInfo['card_field'] && getApp().globalData.userInfo['card_expiredate']){ | ||
| 1296 | + var s_list=JSON.parse(conf.switch_list); | ||
| 1297 | + var now=ut.gettimestamp(); | ||
| 1298 | + | ||
| 1299 | + | ||
| 1300 | + var str = getApp().globalData.userInfo['card_expiredate'].replace(/-/g, '/'); | ||
| 1301 | + var end = new Date(str); | ||
| 1302 | + end = Date.parse(end) / 1000; | ||
| 1303 | + | ||
| 1304 | + //--如果后台有开启等级价的功能,而且会员的等级没有过期的情况下-- | ||
| 1305 | + if(parseInt(s_list.rank_switch)==2 && end>now){ | ||
| 1306 | + var card_price=o[getApp().globalData.userInfo['card_field']]; | ||
| 1307 | + //如果会员有等级价 | ||
| 1308 | + if(getApp().globalData.userInfo['card_field']!=undefined && getApp().globalData.userInfo['card_field']!=null | ||
| 1309 | + && getApp().globalData.userInfo['card_field']!="" && card_price>0){ | ||
| 1310 | + newd.goods_price=card_price; | ||
| 1311 | + newd.member_goods_price=card_price; | ||
| 1312 | + } | ||
| 1313 | + } | ||
| 1314 | + } | ||
| 1315 | + } | ||
| 1316 | + | ||
| 1317 | + //if (this.data.data.goods.is_virtual) return this.buyVirtualGoods(d); | ||
| 1318 | + if ("add" == t.currentTarget.dataset.action) { | ||
| 1319 | + | ||
| 1320 | + if(th.data.prom_goods){ | ||
| 1321 | + newd.prom_type = 3; | ||
| 1322 | + newd.prom_id = th.data.prom_goods[0].prom_id; | ||
| 1323 | + } | ||
| 1324 | + | ||
| 1325 | + //----先看会员在购物车中是否加入了该商品----- | ||
| 1326 | + i.get("/api/weshop/cart/page", { | ||
| 1327 | + data: { | ||
| 1328 | + store_id: e.data.stoid, | ||
| 1329 | + user_id: oo.user_id, | ||
| 1330 | + goods_id: a, | ||
| 1331 | + pick_id: e.data.sto_sele_id, | ||
| 1332 | + }, | ||
| 1333 | + success: function(re) { | ||
| 1334 | + | ||
| 1335 | + //-------如果购物车中有相关的数据--------- | ||
| 1336 | + if (re.data.data.total > 0) { | ||
| 1337 | + | ||
| 1338 | + var item = re.data.data.pageData[0]; | ||
| 1339 | + | ||
| 1340 | + //判断数量,要看下购物车中有没有该商品 | ||
| 1341 | + if(CanOutQty){ | ||
| 1342 | + if(item.goods_num+ th.data.goodsInputNum>CanOutQty){ | ||
| 1343 | + return s.my_warnning("库存不足!", 0, th); | ||
| 1344 | + } | ||
| 1345 | + }else{ | ||
| 1346 | + if(item.goods_num+ th.data.goodsInputNum>o.store_count){ | ||
| 1347 | + return s.my_warnning("库存不足!", 0, th); | ||
| 1348 | + } | ||
| 1349 | + } | ||
| 1350 | + | ||
| 1351 | + var updata = { | ||
| 1352 | + id: item.id, | ||
| 1353 | + goods_num: e.data.goodsInputNum + item.goods_num, | ||
| 1354 | + goods_price: newd.goods_price, | ||
| 1355 | + member_goods_price:newd.goods_price, | ||
| 1356 | + store_id: th.data.stoid, | ||
| 1357 | + }; | ||
| 1358 | + | ||
| 1359 | + //---是不是从收藏夹出来的--- | ||
| 1360 | + if(th.data.c_guide_id){ | ||
| 1361 | + updata['guide_id'] = th.data.c_guide_id; | ||
| 1362 | + updata['guide_type']=3; //加入购物车之后就变成了3 | ||
| 1363 | + }else { | ||
| 1364 | + if (getApp().globalData.guide_id) { | ||
| 1365 | + updata['guide_id'] = getApp().globalData.guide_id; | ||
| 1366 | + updata['guide_type'] = 0; | ||
| 1367 | + } | ||
| 1368 | + } | ||
| 1369 | + | ||
| 1370 | + i.put("/api/weshop/cart/update", { | ||
| 1371 | + data: updata, | ||
| 1372 | + success: function(t) { | ||
| 1373 | + getApp().my_warnning('加入购物车成功', 1, th, 450); | ||
| 1374 | + var c_num = th.data.cartGoodsNum + th.data.goodsInputNum; | ||
| 1375 | + th.setData({ | ||
| 1376 | + cartGoodsNum: c_num | ||
| 1377 | + }); | ||
| 1378 | + th.closeSpecModal(); | ||
| 1379 | + } | ||
| 1380 | + }); | ||
| 1381 | + } else { | ||
| 1382 | + | ||
| 1383 | + | ||
| 1384 | + i.post("/api/weshop/cart/save", { | ||
| 1385 | + data: newd, | ||
| 1386 | + success: function(t) { | ||
| 1387 | + getApp().my_warnning('加入购物车成功', 1, th, 450); | ||
| 1388 | + var c_num = th.data.cartGoodsNum + e.data.goodsInputNum; | ||
| 1389 | + th.setData({ | ||
| 1390 | + cartGoodsNum: c_num | ||
| 1391 | + }); | ||
| 1392 | + th.closeSpecModal(); | ||
| 1393 | + } | ||
| 1394 | + }); | ||
| 1395 | + } | ||
| 1396 | + } | ||
| 1397 | + }); | ||
| 1398 | + } | ||
| 1399 | + //else "exchange" == t.currentTarget.dataset.action ? this.exchange(d) : this.buyNow(d); | ||
| 1400 | + else { | ||
| 1401 | + | ||
| 1402 | + if(th.data.prom_goods){ | ||
| 1403 | + var prom_d=th.data.prom_goods; | ||
| 1404 | + for(var i in prom_d){ | ||
| 1405 | + //判断活动有俩种条件,0元 1件 | ||
| 1406 | + var condition_t=prom_d[i].prom_type; | ||
| 1407 | + switch(condition_t) { | ||
| 1408 | + case 0: //按钱 | ||
| 1409 | + if(newd.goods_price>=condition_t){ | ||
| 1410 | + newd.prom_type = 3; | ||
| 1411 | + newd.prom_id = prom_d[i].prom_id; | ||
| 1412 | + } | ||
| 1413 | + break | ||
| 1414 | + case 1://按购买数量 | ||
| 1415 | + if(newd.goods_num>=condition_t){ | ||
| 1416 | + newd.prom_type = 3; | ||
| 1417 | + newd.prom_id = prom_d[i].prom_id; | ||
| 1418 | + } | ||
| 1419 | + break; | ||
| 1420 | + } | ||
| 1421 | + } | ||
| 1422 | + | ||
| 1423 | + } | ||
| 1424 | + | ||
| 1425 | + newd['pick_name'] = th.data.sto_sele_name; | ||
| 1426 | + newd['pick_dis'] = th.data.sto_sele_distr; | ||
| 1427 | + th.buyNow(newd); | ||
| 1428 | + } | ||
| 1429 | + }, | ||
| 1430 | + | ||
| 1431 | + | ||
| 1432 | + //----------购买虚拟商品------ | ||
| 1433 | + buyVirtualGoods: function(e) { | ||
| 1434 | + Object.assign(e, { | ||
| 1435 | + goods_name: this.data.data.goods.goods_name, | ||
| 1436 | + spec_name: this.data.select.specName, | ||
| 1437 | + price: this.data.select.price | ||
| 1438 | + }), wx.navigateTo({ | ||
| 1439 | + url: "/pages/virtual/buy_step/buy_step?" + t.Obj2Str(e) | ||
| 1440 | + }); | ||
| 1441 | + }, | ||
| 1442 | + //----------积分兑换--------- | ||
| 1443 | + exchange: function(e) { | ||
| 1444 | + this.data.shippingCost < 0 || this.data.select.stock <= 0 || wx.navigateTo({ | ||
| 1445 | + url: "/pages/cart/integral/integral?" + t.Obj2Str(e) | ||
| 1446 | + }); | ||
| 1447 | + }, | ||
| 1448 | + | ||
| 1449 | + | ||
| 1450 | + //----------立即购买----------- | ||
| 1451 | + buyNow: function(e) { | ||
| 1452 | + // this.data.shippingCost < 0 || this.data.select.stock <= 0 || (Object.assign(e, { | ||
| 1453 | + // action: "buy_now" | ||
| 1454 | + // }), | ||
| 1455 | + s.set_b_now(e); | ||
| 1456 | + if(e.prom_type==4){ | ||
| 1457 | + var url="/pages/cart/cart2_inte/cart2_inte?is_bnow=1&goods_id=" + e.goods_id; | ||
| 1458 | + getApp().goto(url); | ||
| 1459 | + }else{ | ||
| 1460 | + wx.redirectTo({ | ||
| 1461 | + url: "/pages/cart/cart2/cart2?is_bnow=1&goods_id=" + e.goods_id, | ||
| 1462 | + }); | ||
| 1463 | + } | ||
| 1464 | + }, | ||
| 1465 | + | ||
| 1466 | + //----------增加购买数量----------- | ||
| 1467 | + addCartNum: function(t) { | ||
| 1468 | + this.checkCartNum(this.data.goodsInputNum + 1); | ||
| 1469 | + }, | ||
| 1470 | + //----------减少购买数量----------- | ||
| 1471 | + subCartNum: function(t) { | ||
| 1472 | + this.checkCartNum(this.data.goodsInputNum - 1); | ||
| 1473 | + }, | ||
| 1474 | + //----------输入框输入购买数量----------- | ||
| 1475 | + inputCartNum: function(t) { | ||
| 1476 | + this.checkCartNum(Number(t.detail.value)); | ||
| 1477 | + }, | ||
| 1478 | + | ||
| 1479 | + //----------增加购买数量----------- | ||
| 1480 | + addCartNum_inte: function(t) { | ||
| 1481 | + this.checkCartNum_inte(this.data.goodsInputNum + 1); | ||
| 1482 | + }, | ||
| 1483 | + //----------减少购买数量----------- | ||
| 1484 | + subCartNum_inte: function(t) { | ||
| 1485 | + this.checkCartNum_inte(this.data.goodsInputNum - 1); | ||
| 1486 | + }, | ||
| 1487 | + //----------输入框输入购买数量----------- | ||
| 1488 | + inputCartNum_inte: function(t) { | ||
| 1489 | + this.checkCartNum_inte(Number(t.detail.value)); | ||
| 1490 | + }, | ||
| 1491 | + | ||
| 1492 | + | ||
| 1493 | + //------检查数量是不是超出限购------ | ||
| 1494 | + checkCartNum: function(t) { | ||
| 1495 | + var th = this; | ||
| 1496 | + this.data.sele_g = this.data.data; | ||
| 1497 | + this.get_buy_num(this.data.sele_g, async function() { | ||
| 1498 | + // this.get_buy_num(this.data.sele_g, async function() { | ||
| 1499 | + | ||
| 1500 | + //--判断商品是否超出限购-- | ||
| 1501 | + if (th.data.g_buy_num != null && th.data.sele_g.viplimited > 0) { | ||
| 1502 | + | ||
| 1503 | + var gd_buy_num=th.data.g_buy_num.get(th.data.sele_g.goods_id); | ||
| 1504 | + | ||
| 1505 | + if (t + gd_buy_num > th.data.sele_g.viplimited) { | ||
| 1506 | + wx.showModal({ | ||
| 1507 | + title: '超出商品限购', | ||
| 1508 | + }); | ||
| 1509 | + | ||
| 1510 | + var num= th.data.sele_g.viplimited-gd_buy_num; | ||
| 1511 | + if(num<0) num=0; | ||
| 1512 | + th.setData({goodsInputNum:num}) | ||
| 1513 | + return false; | ||
| 1514 | + } | ||
| 1515 | + } | ||
| 1516 | + | ||
| 1517 | + //--判断商品是否超出活动限购-- | ||
| 1518 | + if (th.data.prom_buy_num != -1 && th.data.prom_buy_limit > 0 && !th.data.is_normal) { | ||
| 1519 | + if (t + th.data.prom_buy_num > th.data.prom_buy_limit) { | ||
| 1520 | + wx.showModal({ | ||
| 1521 | + title: '超出商品活动限购', | ||
| 1522 | + }); | ||
| 1523 | + | ||
| 1524 | + var num=th.data.prom_buy_limit- th.data.prom_buy_num ; | ||
| 1525 | + if(num<0) num=0; | ||
| 1526 | + th.setData({goodsInputNum:num}) | ||
| 1527 | + return false; | ||
| 1528 | + } | ||
| 1529 | + } | ||
| 1530 | + | ||
| 1531 | + if (th.data.sele_g.prom_type == 1 || th.data.sele_g.prom_type == 6) { | ||
| 1532 | + var redis_num = 0; | ||
| 1533 | + //------判断活动是否抢光----- | ||
| 1534 | + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + | ||
| 1535 | + os.stoid + "/" + th.data.sele_g.prom_type + "/" + th.data.sele_g.prom_id, { | ||
| 1536 | + 1: 1 | ||
| 1537 | + }).then(res => { | ||
| 1538 | + redis_num = res.data.data; | ||
| 1539 | + }); | ||
| 1540 | + | ||
| 1541 | + if (t > redis_num) { | ||
| 1542 | + wx.showModal({ | ||
| 1543 | + title: '超出商品活动库存', | ||
| 1544 | + }); | ||
| 1545 | + th.setData({goodsInputNum:redis_num}) | ||
| 1546 | + return false; | ||
| 1547 | + } | ||
| 1548 | + | ||
| 1549 | + } | ||
| 1550 | + | ||
| 1551 | + var e = th.data.sele_g.store_count; | ||
| 1552 | + if(th.data.sales_rules==2){ | ||
| 1553 | + if(!th.data.def_pick_store){ | ||
| 1554 | + wx.showModal({ title: '请选择门店', }); | ||
| 1555 | + return false; | ||
| 1556 | + }else{ | ||
| 1557 | + e=th.data.def_pick_store.CanOutQty; | ||
| 1558 | + } | ||
| 1559 | + } | ||
| 1560 | + | ||
| 1561 | + //库存不足,不增加 | ||
| 1562 | + if(e<t){ wx.showModal({ title: '库存不足', }); | ||
| 1563 | + if(e<0) e=0; | ||
| 1564 | + th.setData({ goodsInputNum: e }); return false; | ||
| 1565 | + } | ||
| 1566 | + t > e || 0 == e ? t = e : t < 1 && (t = 1); | ||
| 1567 | + th.setData({ goodsInputNum: t }); | ||
| 1568 | + th.is_show_more_buy(); | ||
| 1569 | + | ||
| 1570 | + }) | ||
| 1571 | + }, | ||
| 1572 | + | ||
| 1573 | + //----- 检查一下积分购的限购之类的问题 ----- | ||
| 1574 | + checkCartNum_inte: function(t) { | ||
| 1575 | + var th = this; | ||
| 1576 | + this.get_buy_num(this.data.data, async function() { | ||
| 1577 | + | ||
| 1578 | + //--判断商品是否超出限购-- | ||
| 1579 | + if (th.data.g_buy_num != null && th.data.data.viplimited > 0) { | ||
| 1580 | + | ||
| 1581 | + var gd_buy_num=th.data.g_buy_num.get(th.data.sele_g.goods_id); | ||
| 1582 | + | ||
| 1583 | + if (t + gd_buy_num > th.data.sele_g.viplimited) { | ||
| 1584 | + wx.showModal({ | ||
| 1585 | + title: '超出商品限购', | ||
| 1586 | + }); | ||
| 1587 | + | ||
| 1588 | + var num= th.data.sele_g.viplimited-gd_buy_num; | ||
| 1589 | + if(num<0) num=0; | ||
| 1590 | + th.setData({goodsInputNum:num}) | ||
| 1591 | + return false; | ||
| 1592 | + } | ||
| 1593 | + } | ||
| 1594 | + | ||
| 1595 | + //--判断商品是否超出活动限购-- | ||
| 1596 | + if (th.data.prom_buy_num != -1 && th.data.prom_buy_limit > 0) { | ||
| 1597 | + if (t + th.data.prom_buy_num > th.data.prom_buy_limit) { | ||
| 1598 | + wx.showModal({ | ||
| 1599 | + title: '超出商品活动限购', | ||
| 1600 | + }); | ||
| 1601 | + | ||
| 1602 | + var num=th.data.prom_buy_limit- th.data.prom_buy_num ; | ||
| 1603 | + if(num<0) num=0; | ||
| 1604 | + th.setData({goodsInputNum:num}) | ||
| 1605 | + return false; | ||
| 1606 | + } | ||
| 1607 | + } | ||
| 1608 | + | ||
| 1609 | + if (th.data.sele_g.prom_type == 1 || th.data.sele_g.prom_type == 6) { | ||
| 1610 | + var redis_num = 0; | ||
| 1611 | + //------判断活动是否抢光----- | ||
| 1612 | + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + | ||
| 1613 | + os.stoid + "/" + th.data.sele_g.prom_type + "/" + th.data.sele_g.prom_id, { | ||
| 1614 | + 1: 1 | ||
| 1615 | + }).then(res => { | ||
| 1616 | + redis_num = res.data.data; | ||
| 1617 | + }); | ||
| 1618 | + | ||
| 1619 | + if (t > redis_num) { | ||
| 1620 | + wx.showModal({ | ||
| 1621 | + title: '超出商品活动库存', | ||
| 1622 | + }); | ||
| 1623 | + th.setData({goodsInputNum:redis_num}) | ||
| 1624 | + return false; | ||
| 1625 | + } | ||
| 1626 | + | ||
| 1627 | + } | ||
| 1628 | + | ||
| 1629 | + var e = th.data.sele_g.store_count; | ||
| 1630 | + if(th.data.sales_rules==2){ | ||
| 1631 | + if(!th.data.def_pick_store){ | ||
| 1632 | + wx.showModal({ title: '请选择门店', }); | ||
| 1633 | + return false; | ||
| 1634 | + }else{ | ||
| 1635 | + e=th.data.def_pick_store.CanOutQty; | ||
| 1636 | + } | ||
| 1637 | + } | ||
| 1638 | + | ||
| 1639 | + //库存不足,不增加 | ||
| 1640 | + if(e<t){ wx.showModal({ title: '库存不足', }); | ||
| 1641 | + if(e<0) e=0; | ||
| 1642 | + th.setData({ goodsInputNum: e }); return false; | ||
| 1643 | + } | ||
| 1644 | + t > e || 0 == e ? t = e : t < 1 && (t = 1); | ||
| 1645 | + th.setData({ goodsInputNum: t }); | ||
| 1646 | + }) | ||
| 1647 | + }, | ||
| 1648 | + | ||
| 1649 | + | ||
| 1650 | + closeSpecModal: function() { | ||
| 1651 | + if(this.data.openSpecModal_pt && this.data.is_normal){ | ||
| 1652 | + this.get_sto(); | ||
| 1653 | + } | ||
| 1654 | + | ||
| 1655 | + this.setData({ | ||
| 1656 | + openSpecModal: !1, | ||
| 1657 | + openSpecModal_pt: !1 | ||
| 1658 | + }); | ||
| 1659 | + }, | ||
| 1660 | + | ||
| 1661 | + openSpecModel: function(t) { | ||
| 1662 | + var th=this; | ||
| 1663 | + var open_store = t.currentTarget.dataset.ind; | ||
| 1664 | + this.setData({ | ||
| 1665 | + store: 0, | ||
| 1666 | + choice_sort_store: 0, | ||
| 1667 | + sort_store: 0, | ||
| 1668 | + open_ind_store: open_store, | ||
| 1669 | + }) | ||
| 1670 | + //--先判断会员状态-- | ||
| 1671 | + var user_info = getApp().globalData.userInfo; | ||
| 1672 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | ||
| 1673 | + wx.navigateTo({ | ||
| 1674 | + url: '/pages/togoin/togoin', | ||
| 1675 | + }) | ||
| 1676 | + return false; | ||
| 1677 | + } | ||
| 1678 | + | ||
| 1679 | + var ind = t.currentTarget.dataset.ind; | ||
| 1680 | + this.setData({ | ||
| 1681 | + openSpecModal: !0, | ||
| 1682 | + openSpecModal_ind: ind, | ||
| 1683 | + }); | ||
| 1684 | + | ||
| 1685 | + var is_open=th.data.config | ||
| 1686 | + | ||
| 1687 | + | ||
| 1688 | + this.get_off_price(); | ||
| 1689 | + | ||
| 1690 | + }, | ||
| 1691 | + | ||
| 1692 | + //----获取线下价格------- | ||
| 1693 | + get_off_price(){ | ||
| 1694 | + var th=this; | ||
| 1695 | + //没有开启就返回 | ||
| 1696 | + if(!th.data.is_open_offline) return false; | ||
| 1697 | + //先看下购买的功能有没有到期 | ||
| 1698 | + getApp().request.promiseGet("/store/storemoduleendtime/page?store_id=" +os.stoid + "&type=6",{}).then(res=>{ | ||
| 1699 | + //未购买 | ||
| 1700 | + if(res.data.code!=0 || !res.data.data || !res.data.data.pageData || !res.data.data.pageData.length){ | ||
| 1701 | + return false; | ||
| 1702 | + }else{ | ||
| 1703 | + //已经过期 | ||
| 1704 | + var item=res.data.data.pageData[0]; | ||
| 1705 | + if(item.end_time<ut.gettimestamp()){ | ||
| 1706 | + return false; | ||
| 1707 | + } | ||
| 1708 | + } | ||
| 1709 | + | ||
| 1710 | + | ||
| 1711 | + var cur_goods=this.data.sele_g; | ||
| 1712 | + var cur_price=cur_goods.shop_price; | ||
| 1713 | + if(th.data.card_field && cur_goods[th.data.card_field]>0){ | ||
| 1714 | + cur_price=cur_goods[th.data.card_field]; | ||
| 1715 | + } | ||
| 1716 | + | ||
| 1717 | + var user_info = getApp().globalData.userInfo; | ||
| 1718 | + //获取一下接口,判断是不是有线下接口,必须是普通商品,全局优惠活动也是不行 | ||
| 1719 | + if(cur_goods.prom_type==0 && !this.data.prom_goods){ | ||
| 1720 | + cur_goods.offline_price=null; | ||
| 1721 | + //如果没有门店,不用计算线下价格 | ||
| 1722 | + var def_pick_store=this.data.def_pick_store; | ||
| 1723 | + if(!def_pick_store) return false; | ||
| 1724 | + getApp().request.get("/api/weshop/goods/listWarePrice", { | ||
| 1725 | + data:{VIPId:encodeURIComponent(user_info.erpvipid), | ||
| 1726 | + store_id:os.stoid, | ||
| 1727 | + PickupId:def_pick_store.pickup_id, | ||
| 1728 | + WareIds:encodeURIComponent(cur_goods.erpwareid)}, | ||
| 1729 | + success:function(res){ | ||
| 1730 | + if(res.data.code==0 && res.data.data && res.data.data.length>0){ | ||
| 1731 | + var datalist=res.data.data; | ||
| 1732 | + if(datalist[0].WarePrice<cur_price){ | ||
| 1733 | + cur_goods.offline_price=datalist[0].WarePrice; //存储线下活动的价格 | ||
| 1734 | + cur_goods.pricing_type=datalist[0].PriceType; //存储线下活动的类型 | ||
| 1735 | + } | ||
| 1736 | + } | ||
| 1737 | + th.setData({sele_g:cur_goods}); | ||
| 1738 | + } | ||
| 1739 | + | ||
| 1740 | + }) | ||
| 1741 | + } | ||
| 1742 | + | ||
| 1743 | + }) | ||
| 1744 | + | ||
| 1745 | + | ||
| 1746 | + }, | ||
| 1747 | + | ||
| 1748 | + | ||
| 1749 | + //---------点击收藏和不收藏------------ | ||
| 1750 | + collectGoods: function() { | ||
| 1751 | + var t = this, | ||
| 1752 | + i = getApp().request; | ||
| 1753 | + var user_id = s.globalData.user_id; | ||
| 1754 | + if (user_id == '') { | ||
| 1755 | + getApp().getUserFir(function() {}); | ||
| 1756 | + getApp().showWarning("未登录"); | ||
| 1757 | + return false; | ||
| 1758 | + } else { | ||
| 1759 | + | ||
| 1760 | + if(t.data.is_collect_load) return false; | ||
| 1761 | + t.data.is_collect_load=1; | ||
| 1762 | + | ||
| 1763 | + if (t.data.is_collect == 1) { //删除收藏 | ||
| 1764 | + i.delete("/api/weshop/goodscollect/del/" + o.stoid + "/" + t.data.collect_id, { | ||
| 1765 | + success: function(e) { | ||
| 1766 | + t.data.is_collect_load=0; | ||
| 1767 | + if (e.data.code == 0) { | ||
| 1768 | + t.setData({ | ||
| 1769 | + is_collect: 0, | ||
| 1770 | + collect_id: 0, | ||
| 1771 | + }); | ||
| 1772 | + } | ||
| 1773 | + } | ||
| 1774 | + }); | ||
| 1775 | + } else { | ||
| 1776 | + var timestamp = Date.parse(new Date()); | ||
| 1777 | + timestamp = timestamp / 1000; | ||
| 1778 | + var d = { | ||
| 1779 | + goods_id: t.data.data.goods_id, | ||
| 1780 | + user_id: s.globalData.user_id, | ||
| 1781 | + store_id: o.stoid, | ||
| 1782 | + add_time: timestamp, | ||
| 1783 | + }; | ||
| 1784 | + //加入收藏夹就是导购的ID | ||
| 1785 | + if(getApp().globalData.guide_id){ | ||
| 1786 | + d.guide_id=getApp().globalData.guide_id; | ||
| 1787 | + d.guide_type=2; | ||
| 1788 | + } | ||
| 1789 | + | ||
| 1790 | + i.post("/api/weshop/goodscollect/save", { //添加收藏 | ||
| 1791 | + data: d, | ||
| 1792 | + success: function(e) { | ||
| 1793 | + t.data.is_collect_load=0; | ||
| 1794 | + if (e.data.code == 0) { | ||
| 1795 | + t.setData({ | ||
| 1796 | + is_collect: 1, | ||
| 1797 | + collect_id: e.data.data.collect_id, | ||
| 1798 | + }); | ||
| 1799 | + } | ||
| 1800 | + } | ||
| 1801 | + }); | ||
| 1802 | + } | ||
| 1803 | + } | ||
| 1804 | + }, | ||
| 1805 | + | ||
| 1806 | + //---------联系客服------------ | ||
| 1807 | + contactService: function() { | ||
| 1808 | + s.getConfig(function(t) { | ||
| 1809 | + if (t.store_tel == undefined) { | ||
| 1810 | + getApp().request.get("/api/weshop/store/get/" + os.stoid, { | ||
| 1811 | + isShowLoading: 1, | ||
| 1812 | + data: {}, | ||
| 1813 | + success: function(rs) { | ||
| 1814 | + getApp().globalData.config = rs.data.data; | ||
| 1815 | + if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) { | ||
| 1816 | + getApp().my_warnning("商家未设置电话", 0, th); | ||
| 1817 | + return false; | ||
| 1818 | + } | ||
| 1819 | + s.confirmBox("请联系客服:" + rs.data.data.store_tel); | ||
| 1820 | + } | ||
| 1821 | + }) | ||
| 1822 | + } else { | ||
| 1823 | + s.confirmBox("请联系客服:" + t.store_tel); | ||
| 1824 | + } | ||
| 1825 | + }); | ||
| 1826 | + }, | ||
| 1827 | + //-------获取购物车数量---------- | ||
| 1828 | + requestCardNum: function() { | ||
| 1829 | + var t = this; | ||
| 1830 | + getApp().request.get("/api/weshop/cart/page", { | ||
| 1831 | + data: { | ||
| 1832 | + store_id: o.stoid, | ||
| 1833 | + user_id: s.globalData.user_id, | ||
| 1834 | + state:0, | ||
| 1835 | + is_gift:0 | ||
| 1836 | + }, | ||
| 1837 | + success: function(e) { | ||
| 1838 | + var num = 0; | ||
| 1839 | + for (var i = 0; i < e.data.data.pageData.length; i++) { | ||
| 1840 | + num += e.data.data.pageData[i].goods_num; | ||
| 1841 | + } | ||
| 1842 | + t.setData({ | ||
| 1843 | + cartGoodsNum: num | ||
| 1844 | + }); | ||
| 1845 | + } | ||
| 1846 | + }); | ||
| 1847 | + }, | ||
| 1848 | + | ||
| 1849 | + previewCommentImgs: function(t) { | ||
| 1850 | + var e = this.data.comments[t.currentTarget.dataset.cidx].img; | ||
| 1851 | + var b = e.slice() | ||
| 1852 | + for(var i in b){ | ||
| 1853 | + b[i] = this.data.iurl + e[i]; | ||
| 1854 | + } | ||
| 1855 | + | ||
| 1856 | + wx.previewImage({ | ||
| 1857 | + current: b[t.currentTarget.dataset.id], | ||
| 1858 | + urls: b | ||
| 1859 | + }); | ||
| 1860 | + }, | ||
| 1861 | + | ||
| 1862 | + previewCommentImgs_w: function(t) { | ||
| 1863 | + var e = this.data.comments[t.currentTarget.dataset.cidx].weapp_img; | ||
| 1864 | + var b = e.slice() | ||
| 1865 | + for (var i in b) { | ||
| 1866 | + b[i] = this.data.iurl + e[i]; | ||
| 1867 | + } | ||
| 1868 | + wx.previewImage({ | ||
| 1869 | + current: b[t.currentTarget.dataset.id], | ||
| 1870 | + urls: b | ||
| 1871 | + }); | ||
| 1872 | + }, | ||
| 1873 | + | ||
| 1874 | + previewGoodsCommentImgs: function(t) { | ||
| 1875 | + var e = this, | ||
| 1876 | + a = this.data.data.comment[t.currentTarget.dataset.cidx].img; | ||
| 1877 | + a = a.map(function(t) { | ||
| 1878 | + return e.data.url + t; | ||
| 1879 | + }), wx.previewImage({ | ||
| 1880 | + current: a[t.currentTarget.dataset.id], | ||
| 1881 | + urls: a | ||
| 1882 | + }); | ||
| 1883 | + }, | ||
| 1884 | + closePromModal: function() { | ||
| 1885 | + this.setData({ | ||
| 1886 | + openPromModal: !1 | ||
| 1887 | + }); | ||
| 1888 | + }, | ||
| 1889 | + openPromModal: function() { | ||
| 1890 | + this.setData({ | ||
| 1891 | + openPromModal: !0 | ||
| 1892 | + }); | ||
| 1893 | + }, | ||
| 1894 | + | ||
| 1895 | + //--点击分享事件--- | ||
| 1896 | + onShareAppMessage: function(t) { | ||
| 1897 | + | ||
| 1898 | + var th = this; | ||
| 1899 | + var price = th.data.data.shop_price; | ||
| 1900 | + if (th.data.prom_act) { | ||
| 1901 | + price = th.data.prom_act.price; | ||
| 1902 | + | ||
| 1903 | + } | ||
| 1904 | + var title= th.data.data.goods_name; | ||
| 1905 | + var img=th.data.data.original_img; | ||
| 1906 | + if(th.data.prom_type==6){ | ||
| 1907 | + title=th.data.prom_act.share_title; | ||
| 1908 | + img=th.data.iurl+th.data.prom_act.share_imgurl; | ||
| 1909 | + } | ||
| 1910 | + | ||
| 1911 | + | ||
| 1912 | + var url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + th.data.gid; | ||
| 1913 | + if(getApp().globalData.user_id){ | ||
| 1914 | + url+="&first_leader="+getApp().globalData.user_id; | ||
| 1915 | + } | ||
| 1916 | + | ||
| 1917 | + //-- 如果房间分享,且不是会员分享的 -- | ||
| 1918 | + if(getApp().globalData.room_id && | ||
| 1919 | + th.data.data.goods_id==getApp().globalData.room_goods_id && | ||
| 1920 | + !getApp().globalData.room_user_share | ||
| 1921 | + ){ | ||
| 1922 | + url+="&room_id="+getApp().globalData.room_id+"&room_user_share=1"; | ||
| 1923 | + } | ||
| 1924 | + | ||
| 1925 | + var ob={ | ||
| 1926 | + title: price + "元 " +title, | ||
| 1927 | + path:url, | ||
| 1928 | + imageUrl: img, | ||
| 1929 | + }; | ||
| 1930 | + if(th.data.prom_type==6){ | ||
| 1931 | + title+='\n'+th.data.prom_act.share_remark; | ||
| 1932 | + ob.title=title; | ||
| 1933 | + ob.desc=th.data.prom_act.share_remark; | ||
| 1934 | + } | ||
| 1935 | + | ||
| 1936 | + //如果是积分购的时候 | ||
| 1937 | + if(th.data.prom_type==4){ | ||
| 1938 | + var name = th.data.prom_act.name; | ||
| 1939 | + //-- 积分购的 -- | ||
| 1940 | + var pri0 = th.data.prom_act.addmoney; | ||
| 1941 | + var integral=th.data.prom_act.integral; | ||
| 1942 | + var text=""; | ||
| 1943 | + if(integral){text=integral+"积分"; } | ||
| 1944 | + if(pri0 && integral){ text+="+";} | ||
| 1945 | + if(pri0){ text+="¥"+pri0;} | ||
| 1946 | + | ||
| 1947 | + ob.title= text+" "+name; | ||
| 1948 | + } | ||
| 1949 | + | ||
| 1950 | + return ob; | ||
| 1951 | + | ||
| 1952 | + }, | ||
| 1953 | + | ||
| 1954 | + //-----图片失败,默认图片----- | ||
| 1955 | + bind_bnerr: function(e) { | ||
| 1956 | + var _errImg = e.target.dataset.errorimg; | ||
| 1957 | + var _errObj = {}; | ||
| 1958 | + _errObj[_errImg] = this.data.iurl + "/miniapp/images/default_g_img.gif"; | ||
| 1959 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | ||
| 1960 | + }, | ||
| 1961 | + | ||
| 1962 | + //-----图片失败,默认图片----- | ||
| 1963 | + bind_bnerr2: function(e) { | ||
| 1964 | + | ||
| 1965 | + var _errImg = e.target.dataset.errorimg; | ||
| 1966 | + var _errObj = {}; | ||
| 1967 | + _errObj[_errImg] = this.data.iurl + "/miniapp/images/hui_hear_pic.png" | ||
| 1968 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | ||
| 1969 | + }, | ||
| 1970 | + | ||
| 1971 | + //----------装载同一条形码的商品---------- | ||
| 1972 | + async get_sku(stoid, sku, g_id, is_normal, func) { | ||
| 1973 | + var tt = this,arrdata=null; | ||
| 1974 | + var now=ut.gettimestamp(); | ||
| 1975 | + | ||
| 1976 | + await getApp().request.promiseGet("/api/weshop/goods/page", { | ||
| 1977 | + data: { | ||
| 1978 | + store_id: o.stoid, | ||
| 1979 | + sku: sku, | ||
| 1980 | + isonsale: 1, | ||
| 1981 | + is_on_sale: 1, | ||
| 1982 | + pageSize:500 | ||
| 1983 | + } | ||
| 1984 | + }).then(res => { | ||
| 1985 | + var e = res; | ||
| 1986 | + if (e.data.code == 0) arrdata = e.data.data.pageData; | ||
| 1987 | + }) | ||
| 1988 | + if(!arrdata) return fasle; | ||
| 1989 | + | ||
| 1990 | + var arrsku = new Array(); | ||
| 1991 | + var gitem = null; | ||
| 1992 | + var gb = 1,gg = ""; | ||
| 1993 | + for (var i = 0; i < arrdata.length; i++) { | ||
| 1994 | + var goodsinfo=arrdata[i],prom=null; | ||
| 1995 | + if (goodsinfo.goods_id != g_id) { | ||
| 1996 | + if(goodsinfo.prom_type==1){ | ||
| 1997 | + await getApp().request.promiseGet("/api/ms/flash_sale/get/"+os.stoid+"/"+goodsinfo.prom_id,{ | ||
| 1998 | + }).then(res=>{ | ||
| 1999 | + if(res.data.code==0) prom=res.data.data; | ||
| 2000 | + }) | ||
| 2001 | + } | ||
| 2002 | + if(goodsinfo.prom_type==6){ | ||
| 2003 | + await getApp().request.promiseGet("/api/weshop/teamlist/get/"+os.stoid+"/"+goodsinfo.prom_id,{ | ||
| 2004 | + }).then(res=>{ | ||
| 2005 | + if(res.data.code==0) prom=res.data.data; | ||
| 2006 | + }) | ||
| 2007 | + } | ||
| 2008 | + } | ||
| 2009 | + //---如果有活动,不算在一起--- | ||
| 2010 | + if(prom){ | ||
| 2011 | + if(prom.is_end==0 && prom.end_time>now && prom.start_time<now){ | ||
| 2012 | + continue; | ||
| 2013 | + } | ||
| 2014 | + } | ||
| 2015 | + | ||
| 2016 | + var item = arrdata[i],gg = ""; | ||
| 2017 | + if(item.goods_spec=="null" || item.goods_spec==null) item.goods_spec=""; | ||
| 2018 | + if(item.goods_color=="null" || item.goods_color==null) item.goods_color=""; | ||
| 2019 | + | ||
| 2020 | + if (item.goods_spec != "" && item.goods_color != "") { | ||
| 2021 | + gg = item.goods_spec + "/" + item.goods_color; | ||
| 2022 | + } else if (item.goods_spec != "" || item.goods_color != "") { | ||
| 2023 | + gg = item.goods_spec + item.goods_color; | ||
| 2024 | + } else { | ||
| 2025 | + gg = "规格" + gb; | ||
| 2026 | + gb++; | ||
| 2027 | + } | ||
| 2028 | + item.gg = gg; | ||
| 2029 | + | ||
| 2030 | + if(item.spec_img) | ||
| 2031 | + item.original_img=os.imghost+item.spec_img; | ||
| 2032 | + else | ||
| 2033 | + item.original_img=os.imghost+item.original_img; | ||
| 2034 | + | ||
| 2035 | + | ||
| 2036 | + if (item.goods_id == g_id) { | ||
| 2037 | + gitem = item; | ||
| 2038 | + } else { | ||
| 2039 | + arrsku.push(item); | ||
| 2040 | + } | ||
| 2041 | + } | ||
| 2042 | + //-----------排列在最前面------------- | ||
| 2043 | + arrsku.splice(0, 0, gitem); | ||
| 2044 | + if (is_normal == 1) { | ||
| 2045 | + tt.setData({ | ||
| 2046 | + sku_g_pt: arrsku, | ||
| 2047 | + sele_g: gitem | ||
| 2048 | + }); | ||
| 2049 | + func(); | ||
| 2050 | + } else { | ||
| 2051 | + tt.setData({ | ||
| 2052 | + sku_g: arrsku, | ||
| 2053 | + sele_g: gitem | ||
| 2054 | + }); | ||
| 2055 | + } | ||
| 2056 | + }, | ||
| 2057 | + | ||
| 2058 | + //-----------选择属性的按钮事件---------- | ||
| 2059 | + sele_spec: function(e) { | ||
| 2060 | + var that=this,ee=this,th=this; | ||
| 2061 | + var gid = e.currentTarget.dataset.gid; | ||
| 2062 | + var sku_g = this.data.sku_g; | ||
| 2063 | + var item = null; | ||
| 2064 | + for (var i in sku_g) { | ||
| 2065 | + if (sku_g[i].goods_id == gid) { | ||
| 2066 | + item = sku_g[i]; | ||
| 2067 | + break | ||
| 2068 | + } | ||
| 2069 | + } | ||
| 2070 | + if (item) this.setData({ | ||
| 2071 | + sele_g: item, | ||
| 2072 | + gid: gid | ||
| 2073 | + }); | ||
| 2074 | + | ||
| 2075 | + that.check_is_youhui(gid) | ||
| 2076 | + | ||
| 2077 | + var ty=0; | ||
| 2078 | + | ||
| 2079 | + this.get_sto(); | ||
| 2080 | + | ||
| 2081 | + | ||
| 2082 | + //默认门店要拿下门店库存 | ||
| 2083 | + if(that.data.sales_rules==2 && that.data.def_pick_store){ | ||
| 2084 | + var lock=0,plist=null; | ||
| 2085 | + //先读取门店的lock,采用链式写法,少用await | ||
| 2086 | + getApp().request.promiseGet("/api/weshop/order/ware/lock/page",{ | ||
| 2087 | + data:{store_id:os.stoid,wareId:ee.data.sele_g.goods_id,storageId:that.data.def_pick_store.pickup_id,pageSize:1000} | ||
| 2088 | + }).then(res=>{ | ||
| 2089 | + if(res.data.code==0 && res.data.data.total>0){ | ||
| 2090 | + for(var i in res.data.data.pageData) | ||
| 2091 | + lock+=res.data.data.pageData[i].outQty | ||
| 2092 | + } | ||
| 2093 | + //---通过接口获取门店的线下库存信息-- | ||
| 2094 | + return getApp().request.promiseGet("/api/weshop/goods/getWareStorages",{ | ||
| 2095 | + data:{storageNos:that.data.def_pick_store.pickup_no,wareIds:encodeURIComponent(th.data.sele_g.erpwareid),storeId:os.stoid} | ||
| 2096 | + }) | ||
| 2097 | + }).then(res=>{ | ||
| 2098 | + if(res.data.code==0 && res.data.data.total>0){ | ||
| 2099 | + plist=res.data.data.pageData[0]; | ||
| 2100 | + } | ||
| 2101 | + if(plist && plist.CanOutQty-lock>0){ | ||
| 2102 | + that.data.def_pick_store.CanOutQty=plist.CanOutQty-lock; | ||
| 2103 | + }else{ | ||
| 2104 | + that.data.def_pick_store.CanOutQty=0; | ||
| 2105 | + } | ||
| 2106 | + //--给门店赋值线下库存-- | ||
| 2107 | + th.setData({def_pick_store:that.data.def_pick_store}); | ||
| 2108 | + }) | ||
| 2109 | + } | ||
| 2110 | + | ||
| 2111 | + | ||
| 2112 | + this.sele_spec_chech_activity(); | ||
| 2113 | + }, | ||
| 2114 | + | ||
| 2115 | + //选择了不同的规格的时候要判断是不是有活动正在进行中 | ||
| 2116 | + async sele_spec_chech_activity(){ | ||
| 2117 | + //---如果是活动的时候--- | ||
| 2118 | + var prom=null,goodsinfo=this.data.sele_g,th=this; | ||
| 2119 | + if(goodsinfo.prom_type==1){ | ||
| 2120 | + await getApp().request.promiseGet("/api/ms/flash_sale/get/"+os.stoid+"/"+goodsinfo.prom_id,{ | ||
| 2121 | + }).then(res=>{ | ||
| 2122 | + if(res.data.code==0){ | ||
| 2123 | + prom=res.data.data; | ||
| 2124 | + } | ||
| 2125 | + }) | ||
| 2126 | + } | ||
| 2127 | + if(goodsinfo.prom_type==6){ | ||
| 2128 | + await getApp().request.promiseGet("/api/weshop/teamlist/get/"+os.stoid+"/"+goodsinfo.prom_id,{ | ||
| 2129 | + }).then(res=>{ | ||
| 2130 | + if(res.data.code==0){ | ||
| 2131 | + prom=res.data.data; | ||
| 2132 | + } | ||
| 2133 | + }) | ||
| 2134 | + } | ||
| 2135 | + //----------如果有活动,并且在进行中,就不计算线下库存--------------- | ||
| 2136 | + var now=ut.gettimestamp(); | ||
| 2137 | + if(prom){ | ||
| 2138 | + if(prom.is_end==0 && prom.end_time>now && prom.start_time<now){ | ||
| 2139 | + th.setData({ | ||
| 2140 | + prom_type:goodsinfo.prom_type, | ||
| 2141 | + prom_price:prom.price, | ||
| 2142 | + prom_buy_limit:prom.buy_limit, | ||
| 2143 | + prom_end_time:prom.end_time, | ||
| 2144 | + prom_start_time:prom.start_time, | ||
| 2145 | + prom_st:1, | ||
| 2146 | + }) | ||
| 2147 | + return false; | ||
| 2148 | + } | ||
| 2149 | + } | ||
| 2150 | + //---设置普通商品--- | ||
| 2151 | + th.setData({ | ||
| 2152 | + prom_type:0, | ||
| 2153 | + prom_price:null, | ||
| 2154 | + prom_buy_limit:null, | ||
| 2155 | + prom_end_time:null, | ||
| 2156 | + prom_start_time:null, | ||
| 2157 | + prom_st:null, | ||
| 2158 | + }) | ||
| 2159 | + | ||
| 2160 | + }, | ||
| 2161 | + | ||
| 2162 | + | ||
| 2163 | + //---------拿出门店分类和门店------------ | ||
| 2164 | + get_sto(e) { | ||
| 2165 | + var th = this,that=this; | ||
| 2166 | + var is_normal=e; | ||
| 2167 | + | ||
| 2168 | + if(e==1){ | ||
| 2169 | + th.setData({is_normal:1}) | ||
| 2170 | + }else{ | ||
| 2171 | + th.setData({is_normal:0}) | ||
| 2172 | + } | ||
| 2173 | + | ||
| 2174 | + var timer_get = setInterval(function() { | ||
| 2175 | + if (th.data.is_get_local_ok == 0) return false; | ||
| 2176 | + var dd = null,i = getApp().request; | ||
| 2177 | + if (!th.data.sele_g) return false; | ||
| 2178 | + | ||
| 2179 | + var g_distr_type = th.data.sele_g.distr_type; | ||
| 2180 | + if (g_distr_type != 0) { | ||
| 2181 | + dd = { | ||
| 2182 | + store_id: o.stoid, | ||
| 2183 | + distr_type: g_distr_type, | ||
| 2184 | + isstop: 0, | ||
| 2185 | + pageSize: 2000 | ||
| 2186 | + } | ||
| 2187 | + } else { | ||
| 2188 | + dd = { | ||
| 2189 | + store_id: o.stoid, | ||
| 2190 | + isstop: 0, | ||
| 2191 | + pageSize: 2000 | ||
| 2192 | + } | ||
| 2193 | + } | ||
| 2194 | + //如果有距离的话 | ||
| 2195 | + if (th.data.lat != null) { | ||
| 2196 | + dd.lat = th.data.lat; | ||
| 2197 | + dd.lon = th.data.lon; | ||
| 2198 | + } | ||
| 2199 | + clearInterval(timer_get); | ||
| 2200 | + | ||
| 2201 | + //如果会员是有默认的门店话 | ||
| 2202 | + if(!th.data.def_pick_store && th.data.fir_def_store){ | ||
| 2203 | + th.setData({def_pick_store:th.data.fir_def_store}); | ||
| 2204 | + } | ||
| 2205 | + | ||
| 2206 | + /*--最新的,不用这里筛选配送方式 | ||
| 2207 | + if(th.data.def_pick_store && g_distr_type!=0 && th.data.def_pick_store.distr_type!=0 && th.data.def_pick_store.distr_type!=g_distr_type ){ | ||
| 2208 | + th.setData({def_pick_store:null}); | ||
| 2209 | + }--*/ | ||
| 2210 | + | ||
| 2211 | + | ||
| 2212 | + wx.showLoading({ | ||
| 2213 | + title:'加载中.' | ||
| 2214 | + }); | ||
| 2215 | + //----------获取门店---------------- | ||
| 2216 | + getApp().request.promiseGet("/api/weshop/pickup/list", { | ||
| 2217 | + data: dd, | ||
| 2218 | + }).then(res => { | ||
| 2219 | + var e = res; | ||
| 2220 | + | ||
| 2221 | + if (e.data.code == 0) { | ||
| 2222 | + | ||
| 2223 | + //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店 | ||
| 2224 | + if(dd.lat && (!th.data.def_pick_store || JSON.stringify(th.data.def_pick_store)=='{}') && th.data.bconfig && th.data.bconfig.is_sort_storage){ | ||
| 2225 | + th.setData({ | ||
| 2226 | + def_pick_store:e.data.data.pageData[0], | ||
| 2227 | + sto_sele_name: e.data.data.pageData[0].pickup_name, | ||
| 2228 | + sto_sele_id: e.data.data.pageData[0].pickup_id, | ||
| 2229 | + sto_sele_distr: e.data.data.pageData[0].distr_type | ||
| 2230 | + }); | ||
| 2231 | + th.data.fir_def_store=e.data.data.pageData[0]; | ||
| 2232 | + } | ||
| 2233 | + | ||
| 2234 | + //-- 如果有默认选择门店的时候,要把默认门店放在第一位,修改不要配送方式的判断 -- | ||
| 2235 | + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store)!='{}'){ | ||
| 2236 | + for (var k = 0; k < e.data.data.pageData.length; k++) { | ||
| 2237 | + if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) { | ||
| 2238 | + e.data.data.pageData.splice(k, 1); //删除 | ||
| 2239 | + break; | ||
| 2240 | + } | ||
| 2241 | + } | ||
| 2242 | + e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加 | ||
| 2243 | + } | ||
| 2244 | + | ||
| 2245 | + | ||
| 2246 | + th.setData({all_pick_list:e.data.data.pageData}); | ||
| 2247 | + | ||
| 2248 | + //--获取线下库存,而且不是新的门店规则, 同时是普通购买的时候,或者同时不能是活动,秒杀,拼团,积分购-- | ||
| 2249 | + if(th.data.sales_rules==2 && !th.data.is_newsales_rules && ((th.data.prom_type!=1 && th.data.prom_type!=6 && th.data.prom_type!=4) || is_normal==1)){ | ||
| 2250 | + setTimeout(function(){ | ||
| 2251 | + th.deal_pickup_dline(e); | ||
| 2252 | + },800) | ||
| 2253 | + }else{ | ||
| 2254 | + setTimeout(function(){ | ||
| 2255 | + th.deal_pickup(e); //--普通门店排版-- | ||
| 2256 | + },800) | ||
| 2257 | + } | ||
| 2258 | + } | ||
| 2259 | + }) | ||
| 2260 | + }, 200) | ||
| 2261 | + | ||
| 2262 | + }, | ||
| 2263 | + | ||
| 2264 | + | ||
| 2265 | + //------------处理门店--------------- | ||
| 2266 | + deal_pickup(e){ | ||
| 2267 | + var th=this; | ||
| 2268 | + if(!th.data.sele_g) return false | ||
| 2269 | + | ||
| 2270 | + var g_distr_type=th.data.sele_g.distr_type; | ||
| 2271 | + wx.hideLoading(); | ||
| 2272 | + | ||
| 2273 | + //单总量超出5个的时候 | ||
| 2274 | + if (e.data.data.total > 5) { | ||
| 2275 | + getApp().request.get("/api/weshop/storagecategory/page", { | ||
| 2276 | + data: { | ||
| 2277 | + store_id: o.stoid, | ||
| 2278 | + is_show: 1, | ||
| 2279 | + pageSize: 1000, | ||
| 2280 | + orderField:"sort", | ||
| 2281 | + orderType:'asc', | ||
| 2282 | + }, | ||
| 2283 | + success: function(ee) { | ||
| 2284 | + if (ee.data.code == 0) { | ||
| 2285 | + | ||
| 2286 | + if (ee.data.data && ee.data.data.pageData && ee.data.data.pageData.length > 0) { | ||
| 2287 | + var def_arr = new Array(); | ||
| 2288 | + var ishas = 0; | ||
| 2289 | + //-- 开始就看5个门店 -- | ||
| 2290 | + for (var k = 0; k < 5; k++) { | ||
| 2291 | + if (k == e.data.data.pageData.length) break; | ||
| 2292 | + def_arr.push(e.data.data.pageData[k]); | ||
| 2293 | + } | ||
| 2294 | + | ||
| 2295 | + th.setData({ | ||
| 2296 | + def_pickpu_list: def_arr, | ||
| 2297 | + pickpu_list: ee.data.data.pageData | ||
| 2298 | + }); | ||
| 2299 | + var sto_cate = ee.data.data.pageData; | ||
| 2300 | + var sto_arr = e.data.data.pageData; | ||
| 2301 | + var newarr = new Array(); | ||
| 2302 | + var qita = new Array(); | ||
| 2303 | + | ||
| 2304 | + //----要进行门店分组-------- | ||
| 2305 | + for (var i = 0; i < sto_arr.length; i++) { | ||
| 2306 | + //找一下这个门店有没有在分类数组内 | ||
| 2307 | + var find2 = 0, find2name = "",sort=0; | ||
| 2308 | + for (var m = 0; m < sto_cate.length; m++) { | ||
| 2309 | + if (sto_arr[i].category_id == sto_cate[m].cat_id) { | ||
| 2310 | + find2 = sto_cate[m].cat_id; | ||
| 2311 | + find2name = sto_cate[m].cat_name; | ||
| 2312 | + sort = sto_cate[m].sort; | ||
| 2313 | + break; | ||
| 2314 | + } | ||
| 2315 | + } | ||
| 2316 | + | ||
| 2317 | + if (newarr.length > 0) { | ||
| 2318 | + var find = 0; | ||
| 2319 | + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他 | ||
| 2320 | + if (find2 != 0) { | ||
| 2321 | + for (var ii = 0; ii < newarr.length; ii++) { | ||
| 2322 | + if (sto_arr[i].category_id == newarr[ii].cat_id) { | ||
| 2323 | + newarr[ii].s_arr.push(sto_arr[i]); | ||
| 2324 | + find = 1; | ||
| 2325 | + break; | ||
| 2326 | + } | ||
| 2327 | + } | ||
| 2328 | + if (find == 0) { | ||
| 2329 | + var arr0 = new Array(); | ||
| 2330 | + arr0.push(sto_arr[i]); | ||
| 2331 | + var item = { | ||
| 2332 | + cat_id: find2, | ||
| 2333 | + name: find2name, | ||
| 2334 | + sort:sort, | ||
| 2335 | + s_arr: arr0 | ||
| 2336 | + }; | ||
| 2337 | + newarr.push(item); | ||
| 2338 | + } | ||
| 2339 | + } else { | ||
| 2340 | + qita.push(sto_arr[i]); | ||
| 2341 | + } | ||
| 2342 | + } else { | ||
| 2343 | + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他 | ||
| 2344 | + if (find2 != 0) { | ||
| 2345 | + var arr0 = new Array(); | ||
| 2346 | + arr0.push(sto_arr[i]); | ||
| 2347 | + var item = { | ||
| 2348 | + cat_id: find2, | ||
| 2349 | + name: find2name, | ||
| 2350 | + sort:sort, | ||
| 2351 | + s_arr: arr0 | ||
| 2352 | + }; | ||
| 2353 | + newarr.push(item); | ||
| 2354 | + } else { | ||
| 2355 | + qita.push(sto_arr[i]); | ||
| 2356 | + } | ||
| 2357 | + } | ||
| 2358 | + } | ||
| 2359 | + | ||
| 2360 | + //门店分类要排序下 | ||
| 2361 | + function compare(property){ | ||
| 2362 | + return function(a,b){ | ||
| 2363 | + var value1 = a[property]; | ||
| 2364 | + var value2 = b[property]; | ||
| 2365 | + return value1 - value2; | ||
| 2366 | + } | ||
| 2367 | + } | ||
| 2368 | + if(newarr.length>0) | ||
| 2369 | + newarr.sort(compare("sort")); | ||
| 2370 | + | ||
| 2371 | + | ||
| 2372 | + //----安排其他的分类----- | ||
| 2373 | + if (qita.length > 0) { | ||
| 2374 | + var item = { | ||
| 2375 | + cat_id: -1, | ||
| 2376 | + name: "其他", | ||
| 2377 | + s_arr: qita | ||
| 2378 | + }; | ||
| 2379 | + newarr.push(item); | ||
| 2380 | + } | ||
| 2381 | + | ||
| 2382 | + th.setData({ | ||
| 2383 | + is_show_sto_cat: 1, | ||
| 2384 | + all_sto: newarr | ||
| 2385 | + }); | ||
| 2386 | + | ||
| 2387 | + } else { | ||
| 2388 | + th.setData({ | ||
| 2389 | + is_show_sto_cat: -1, | ||
| 2390 | + only_pk: e.data.data.pageData | ||
| 2391 | + }); | ||
| 2392 | + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------ | ||
| 2393 | + if (!th.data.def_pick_store) { | ||
| 2394 | + th.setData({def_pick_store:e.data.data.pageData[0]}) | ||
| 2395 | + } | ||
| 2396 | + } | ||
| 2397 | + } else { | ||
| 2398 | + th.setData({ | ||
| 2399 | + is_show_sto_cat: -1, | ||
| 2400 | + only_pk: e.data.data.pageData | ||
| 2401 | + }); | ||
| 2402 | + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------ | ||
| 2403 | + if (!th.data.def_pick_store) { | ||
| 2404 | + th.setData({def_pick_store:e.data.data.pageData[0]}) | ||
| 2405 | + } | ||
| 2406 | + | ||
| 2407 | + } | ||
| 2408 | + } | ||
| 2409 | + }); | ||
| 2410 | + } else { | ||
| 2411 | + th.setData({ | ||
| 2412 | + is_show_sto_cat: 0, | ||
| 2413 | + only_pk: e.data.data.pageData | ||
| 2414 | + }); | ||
| 2415 | + //-----如果没有默认门店,要取第一个门店作为默认店------ | ||
| 2416 | + if (!th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage) { | ||
| 2417 | + th.setData({ | ||
| 2418 | + def_pick_store:e.data.data.pageData[0], | ||
| 2419 | + sto_sele_name: e.data.data.pageData[0].pickup_name, | ||
| 2420 | + sto_sele_id: e.data.data.pageData[0].pickup_id, | ||
| 2421 | + sto_sele_distr: e.data.data.pageData[0].distr_type | ||
| 2422 | + }) | ||
| 2423 | + } | ||
| 2424 | + } | ||
| 2425 | + }, | ||
| 2426 | + | ||
| 2427 | + //------------处理线下门店库存-------- | ||
| 2428 | + deal_pickup_dline(e){ | ||
| 2429 | + var pkno=[],th=this; | ||
| 2430 | + if(!th.data.sele_g) return false; | ||
| 2431 | + | ||
| 2432 | + if(this.data.def_pick_store){ | ||
| 2433 | + pkno.push(this.data.def_pick_store.pickup_no); | ||
| 2434 | + } | ||
| 2435 | + for(var i in e.data.data.pageData){ | ||
| 2436 | + var item=e.data.data.pageData[i]; | ||
| 2437 | + if(pkno.indexOf(item.pickup_no)<0) | ||
| 2438 | + pkno.push(item.pickup_no); | ||
| 2439 | + } | ||
| 2440 | + var pkno_str=pkno.join(","); | ||
| 2441 | + var o_plist=e.data.data.pageData; | ||
| 2442 | + var new_list=[]; | ||
| 2443 | + var is_find_def_store=0; | ||
| 2444 | + | ||
| 2445 | + | ||
| 2446 | + var g_distr_type=th.data.sele_g.distr_type; | ||
| 2447 | + var lock=[]; | ||
| 2448 | + //先读取门店的lock,采用链式写法,少用await | ||
| 2449 | + getApp().request.promiseGet("/api/weshop/order/ware/lock/page",{ | ||
| 2450 | + data:{store_id:os.stoid,wareId:th.data.sele_g.goods_id,pageSize:1000} | ||
| 2451 | + }).then(res=>{ | ||
| 2452 | + if(res.data.code==0 && res.data.data.total>0){ | ||
| 2453 | + lock=res.data.data.pageData | ||
| 2454 | + } | ||
| 2455 | + //---通过接口获取门店的线下库存信息-- | ||
| 2456 | + return getApp().request.promiseGet("/api/weshop/goods/getWareStorages",{ | ||
| 2457 | + data:{storageNos:pkno_str,wareIds:encodeURIComponent(th.data.sele_g.erpwareid),storeId:os.stoid,pageSize:2000} | ||
| 2458 | + }) | ||
| 2459 | + }).then(res=>{ | ||
| 2460 | + | ||
| 2461 | + wx.hideLoading(); | ||
| 2462 | + if(res.data.code==0){ | ||
| 2463 | + if(res.data.data.pageData && res.data.data.pageData.length>0){ | ||
| 2464 | + var plist=res.data.data.pageData; | ||
| 2465 | + var def_pick_store=th.data.def_pick_store; | ||
| 2466 | + //以原来的数组为外循环,保证距离的顺序 | ||
| 2467 | + for(var kk in o_plist){ | ||
| 2468 | + for(var ii in plist){ | ||
| 2469 | + //线下的门店小心 | ||
| 2470 | + var n_item=plist[ii]; | ||
| 2471 | + if(n_item.StorageNo==o_plist[kk].pickup_no){ | ||
| 2472 | + | ||
| 2473 | + //拿到锁库的数量 | ||
| 2474 | + var lock_num=th.find_lock_num(o_plist[kk].pickup_id,lock); | ||
| 2475 | + //可出库数大于预出库库存的数量,可以判断为有库存 | ||
| 2476 | + if(n_item.CanOutQty>lock_num){ | ||
| 2477 | + o_plist[kk].CanOutQty=n_item.CanOutQty-lock_num; | ||
| 2478 | + new_list.push(o_plist[kk]); | ||
| 2479 | + //--如果找到默认门店,同时也应该判断配送方式对不对-- | ||
| 2480 | + if(th.data.fir_def_store && n_item.StorageNo==th.data.fir_def_store.pickup_no && (g_distr_type==0 || th.data.fir_def_store.distr_type==0 || th.data.def_pick_store.distr_type==g_distr_type ) ){ | ||
| 2481 | + th.data.fir_def_store.CanOutQty=n_item.CanOutQty-lock_num; | ||
| 2482 | + if(def_pick_store.pickup_id==th.data.fir_def_store.pickup_id) | ||
| 2483 | + th.setData({def_pick_store:th.data.fir_def_store}) | ||
| 2484 | + is_find_def_store=1; | ||
| 2485 | + } | ||
| 2486 | + } | ||
| 2487 | + break; | ||
| 2488 | + } | ||
| 2489 | + } | ||
| 2490 | + } | ||
| 2491 | + | ||
| 2492 | + //数据组装下 | ||
| 2493 | + var em={};em.data={};em.data.data={}; | ||
| 2494 | + em.data.data.total=new_list.length; | ||
| 2495 | + em.data.data.pageData=new_list; | ||
| 2496 | + | ||
| 2497 | + //--如果找到默认门店,同时也应该判断配送方式对不对-- | ||
| 2498 | + if(th.data.fir_def_store && !is_find_def_store && th.data.fir_def_store.pickup_id && (g_distr_type==0 || th.data.fir_def_store.distr_type==0 || th.data.def_pick_store.distr_type==g_distr_type ) ){ | ||
| 2499 | + th.data.fir_def_store.CanOutQty=0; | ||
| 2500 | + //--当选择的门店是客户默认的门店的时候-- | ||
| 2501 | + if(th.data.def_pick_store && th.data.fir_def_store.pickup_id==th.data.def_pick_store.pickup_id) { | ||
| 2502 | + th.setData({def_pick_store:th.data.fir_def_store}); | ||
| 2503 | + em.data.data.pageData.unshift(th.data.def_pick_store); | ||
| 2504 | + }else{ | ||
| 2505 | + em.data.data.pageData.splice(1,0,th.data.fir_def_store); | ||
| 2506 | + } | ||
| 2507 | + } | ||
| 2508 | + | ||
| 2509 | + //---把数组组装进去--- | ||
| 2510 | + th.deal_pickup(em); | ||
| 2511 | + }else{ | ||
| 2512 | + th.setData({def_pick_store:null,all_sto:null,only_pk:null,def_pickpu_list:null}) | ||
| 2513 | + } | ||
| 2514 | + }else{ | ||
| 2515 | + th.setData({def_pick_store:null,all_sto:null,only_pk:null,def_pickpu_list:null}) | ||
| 2516 | + } | ||
| 2517 | + }) | ||
| 2518 | + }, | ||
| 2519 | + | ||
| 2520 | + find_lock_num(pick_id,lock){ | ||
| 2521 | + var lock_num=0; | ||
| 2522 | + if(!lock) return 0; | ||
| 2523 | + if(lock.length<0) return 0; | ||
| 2524 | + for(var i in lock){ | ||
| 2525 | + if(pick_id==lock[i].pickupId){ | ||
| 2526 | + lock_num+=lock[i].outQty; | ||
| 2527 | + } | ||
| 2528 | + } | ||
| 2529 | + return lock_num; | ||
| 2530 | + }, | ||
| 2531 | + | ||
| 2532 | + //----------取货门店被点击的效果------ | ||
| 2533 | + getmendian: function(t) { | ||
| 2534 | + this.setData({ | ||
| 2535 | + ismend: 1, | ||
| 2536 | + }); | ||
| 2537 | + }, | ||
| 2538 | + | ||
| 2539 | + //----------隐藏取货门店,选取门店---------- | ||
| 2540 | + hidemend: function(e) { | ||
| 2541 | + var pid = e.target.dataset.p_id; | ||
| 2542 | + var pname = e.target.dataset.p_name; | ||
| 2543 | + var p_distr_t = e.target.dataset.p_dis; | ||
| 2544 | + this.setData({ | ||
| 2545 | + ismend: 0, | ||
| 2546 | + is_sec_mend: 0, | ||
| 2547 | + sto_sele_id: pid, | ||
| 2548 | + sto_sele_name: pname, | ||
| 2549 | + sto_sele_distr: p_distr_t | ||
| 2550 | + }); | ||
| 2551 | + }, | ||
| 2552 | + | ||
| 2553 | + //------显示取货2级---------- | ||
| 2554 | + show_sec: function(t) { | ||
| 2555 | + var index = t.target.dataset.index; | ||
| 2556 | + var item = this.data.all_sto[index]; | ||
| 2557 | + this.setData({ | ||
| 2558 | + is_sec_mend: 1, | ||
| 2559 | + sec_sto: item | ||
| 2560 | + }); | ||
| 2561 | + }, | ||
| 2562 | + | ||
| 2563 | + //------隐藏取货门店2级---- | ||
| 2564 | + hide_sec_mend: function() { | ||
| 2565 | + this.setData({ | ||
| 2566 | + is_sec_mend: 0, | ||
| 2567 | + }); | ||
| 2568 | + }, | ||
| 2569 | + | ||
| 2570 | + //评论的调用 | ||
| 2571 | + requestComments_new: async function(){ | ||
| 2572 | + var e = this, th = e,ee=e; var tp = e.data.activeCategoryId3; | ||
| 2573 | + var t = '/api/weshop/comment/pageComment?page=' + e.data.c_curr_p; | ||
| 2574 | + | ||
| 2575 | + wx.showLoading(); | ||
| 2576 | + var req_where = { | ||
| 2577 | + store_id: o.stoid, pageSize: 5,is_show:1, | ||
| 2578 | + parent_id: 0, goods_id: th.data.gid, commenttype: tp, | ||
| 2579 | + } | ||
| 2580 | + if (getApp().globalData.userInfo) { | ||
| 2581 | + req_where.userId = getApp().globalData.userInfo.user_id; | ||
| 2582 | + } | ||
| 2583 | + | ||
| 2584 | + var rs_data=null; | ||
| 2585 | + await getApp().request.promiseGet(t, { data: req_where}).then(res=>{ | ||
| 2586 | + var tot = res.data.data.total; | ||
| 2587 | + e.data.c_curr_p++; | ||
| 2588 | + e.setData({ | ||
| 2589 | + com_num: tot, //已经有加载 | ||
| 2590 | + }); | ||
| 2591 | + if (res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ | ||
| 2592 | + rs_data=res.data.data.pageData; | ||
| 2593 | + }else{ | ||
| 2594 | + th.setData({comments_no_more:1,auto:1}); | ||
| 2595 | + } | ||
| 2596 | + }) | ||
| 2597 | + | ||
| 2598 | + if (rs_data){ | ||
| 2599 | + //var cda = th.data.comments; | ||
| 2600 | + var cda = rs_data,com_data=th.data.comments; | ||
| 2601 | + for (var ind in cda) { | ||
| 2602 | + var ep = cda[ind]; | ||
| 2603 | + if (cda[ind].head_pic == '') { | ||
| 2604 | + cda[ind].head_pic = th.data.iurl + "/miniapp/images/hui_hear_pic.png"; | ||
| 2605 | + } | ||
| 2606 | + if (ep.weapp_img != "" && ut.isString(ep.weapp_img)) { | ||
| 2607 | + cda[ind].weapp_img = JSON.parse(ep.weapp_img); | ||
| 2608 | + } | ||
| 2609 | + if (ep.img != "" && ut.isString(ep.img)) { | ||
| 2610 | + cda[ind].img = ut.unserialize(ep.img); | ||
| 2611 | + } | ||
| 2612 | + | ||
| 2613 | + //--测量多有字的宽带,计算有多少行-- | ||
| 2614 | + var widh=ut.measureText(ep.content,30); | ||
| 2615 | + var lines=widh/712; | ||
| 2616 | + cda[ind].seeMore=false; | ||
| 2617 | + if(lines>3) cda[ind].seeMore=true; | ||
| 2618 | + | ||
| 2619 | + await getApp().request.promiseGet("/api/weshop/comment/pageComment", { | ||
| 2620 | + data: {store_id: o.stoid, parent_id: ep.comment_id } | ||
| 2621 | + }).then(res => { | ||
| 2622 | + if (res.data.data.pageData && res.data.data.pageData.length > 0) { | ||
| 2623 | + cda[ind].replay_list = res.data.data.pageData; | ||
| 2624 | + } | ||
| 2625 | + }) | ||
| 2626 | + } | ||
| 2627 | + | ||
| 2628 | + if (!com_data) com_data = cda; | ||
| 2629 | + else com_data = com_data.concat(cda); | ||
| 2630 | + | ||
| 2631 | + th.setData({ comments: com_data}); | ||
| 2632 | + } | ||
| 2633 | + th.setData({get_c: 1}); | ||
| 2634 | + wx.hideLoading(); | ||
| 2635 | + }, | ||
| 2636 | + | ||
| 2637 | + //加载更多是靠这个函数 | ||
| 2638 | + onReachBottom: function() { | ||
| 2639 | + if (this.data.activeCategoryId == 2){ | ||
| 2640 | + if(!this.data.comments_no_more) this.requestComments_new(); | ||
| 2641 | + } | ||
| 2642 | + | ||
| 2643 | + var goods_list = this.selectComponent("#goods_list"); //组件的id | ||
| 2644 | + if (goods_list) goods_list.get_list(); | ||
| 2645 | + }, | ||
| 2646 | + | ||
| 2647 | + //--------检查是否活动,活动是否开始,或者是否结束------- | ||
| 2648 | + async check_prom(gid, prom_type, prom_id) { | ||
| 2649 | + var ee = this, | ||
| 2650 | + th = ee; | ||
| 2651 | + if (prom_type == 3 || prom_type == 0 || prom_type == 2 || prom_type == 5) { | ||
| 2652 | + this.setData({ | ||
| 2653 | + prom_type: 0, | ||
| 2654 | + isshow: 1, | ||
| 2655 | + }); | ||
| 2656 | + return false; | ||
| 2657 | + } | ||
| 2658 | + | ||
| 2659 | + | ||
| 2660 | + | ||
| 2661 | + //if (prom_type != 3 && prom_type!=0){ | ||
| 2662 | + //---判断秒杀---- | ||
| 2663 | + if (prom_type == 1) { | ||
| 2664 | + //-------判断活动是否抢光--------- | ||
| 2665 | + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, { | ||
| 2666 | + 1: 1 | ||
| 2667 | + }).then(res => { | ||
| 2668 | + var em = res; | ||
| 2669 | + if (em.data.code == 0) { | ||
| 2670 | + | ||
| 2671 | + if (em.data.data <= 0) ee.setData({ | ||
| 2672 | + prom_r_null: 1 | ||
| 2673 | + }); | ||
| 2674 | + //拿取价格并且判断时间-- | ||
| 2675 | + getApp().request.get("/api/ms/flash_sale/get/" + | ||
| 2676 | + os.stoid + "/" + prom_id, { | ||
| 2677 | + success: function(t) { | ||
| 2678 | + if (t.data.code != 0) { | ||
| 2679 | + ee.setData({ | ||
| 2680 | + prom_type: 0, | ||
| 2681 | + isshow: 1, | ||
| 2682 | + }); | ||
| 2683 | + ee.get_sku(os.stoid, ee.data.data.sku, gid); | ||
| 2684 | + return false; | ||
| 2685 | + } | ||
| 2686 | + //----已经结束----- | ||
| 2687 | + if (t.data.data.is_end == 1) { | ||
| 2688 | + ee.setData({ | ||
| 2689 | + prom_type: 0, | ||
| 2690 | + isshow: 1, | ||
| 2691 | + }); | ||
| 2692 | + ee.get_sku(os.stoid, ee.data.data.sku, gid); | ||
| 2693 | + ee.get_sto(); | ||
| 2694 | + return false; | ||
| 2695 | + } | ||
| 2696 | + //----已经过期----- | ||
| 2697 | + var now = ut.gettimestamp(); | ||
| 2698 | + if (t.data.data.end_time < now) { | ||
| 2699 | + ee.setData({ | ||
| 2700 | + prom_type: 0, | ||
| 2701 | + isshow: 1, | ||
| 2702 | + }); | ||
| 2703 | + ee.get_sku(os.stoid, ee.data.data.sku, gid); | ||
| 2704 | + return false; | ||
| 2705 | + } | ||
| 2706 | + | ||
| 2707 | + /*-- 还没有开始预热的也不显示 --*/ | ||
| 2708 | + if (t.data.data.show_time > now) { | ||
| 2709 | + ee.setData({ | ||
| 2710 | + prom_type: 0, | ||
| 2711 | + isshow: 1, | ||
| 2712 | + }); | ||
| 2713 | + ee.get_sku(os.stoid, ee.data.data.sku, gid); | ||
| 2714 | + ee.get_sto(); | ||
| 2715 | + return false; | ||
| 2716 | + } | ||
| 2717 | + | ||
| 2718 | + var t_gd = ee.data.data; | ||
| 2719 | + var prom_end_time = ut.formatTime(t.data.data.end_time, "yyyy-MM-dd hh:mm:ss"); | ||
| 2720 | + var prom_start_time = ut.formatTime(t.data.data.start_time, "yyyy-MM-dd hh:mm:ss"); | ||
| 2721 | + | ||
| 2722 | + ee.setData({ | ||
| 2723 | + prom_price: t.data.data.price, | ||
| 2724 | + prom_type: 1, | ||
| 2725 | + prom_id: prom_id, | ||
| 2726 | + prom_buy_limit: t.data.data.buy_limit, | ||
| 2727 | + prom_act: t.data.data, | ||
| 2728 | + prom_end_time: prom_end_time, | ||
| 2729 | + prom_start_time: prom_start_time, | ||
| 2730 | + isshow: 1, | ||
| 2731 | + }); | ||
| 2732 | + | ||
| 2733 | + ee.get_sto(); | ||
| 2734 | + | ||
| 2735 | + | ||
| 2736 | + var newTime = ut.gettimestamp(); | ||
| 2737 | + var endTime2 = t.data.data.end_time; | ||
| 2738 | + var endTime1 = t.data.data.start_time; | ||
| 2739 | + | ||
| 2740 | + //---苹果机不兼容--- | ||
| 2741 | + /*---- | ||
| 2742 | + var endTime2 = new Date(prom_end_time).getTime(); | ||
| 2743 | + var endTime1 = new Date(prom_start_time).getTime();----*/ | ||
| 2744 | + | ||
| 2745 | + if (endTime1 > newTime) { | ||
| 2746 | + ee.setData({ | ||
| 2747 | + prom_time_text: '距秒杀开始还有' | ||
| 2748 | + }) | ||
| 2749 | + ee.countDown(endTime1, 0); | ||
| 2750 | + } else { | ||
| 2751 | + if (endTime2 > newTime) { | ||
| 2752 | + ee.setData({ | ||
| 2753 | + prom_time_text: '距秒杀结束还有', | ||
| 2754 | + prom_st: 1 | ||
| 2755 | + }) | ||
| 2756 | + ee.countDown(endTime2); | ||
| 2757 | + } | ||
| 2758 | + } | ||
| 2759 | + } | ||
| 2760 | + }); | ||
| 2761 | + } | ||
| 2762 | + }) | ||
| 2763 | + } | ||
| 2764 | + | ||
| 2765 | + if(prom_type==4){ | ||
| 2766 | + //th.setData({is_integral_normal:1}); | ||
| 2767 | + var rdata={ | ||
| 2768 | + store_id:o.stoid,stype:1,stypeup:1,goods_id:gid | ||
| 2769 | + } | ||
| 2770 | + | ||
| 2771 | + var integrals=0; | ||
| 2772 | + var get_datas= { | ||
| 2773 | + user_id:getApp().globalData.user_id, store_id:o.stoid, | ||
| 2774 | + }; | ||
| 2775 | + await getApp().request.promiseGet("/api/weshop/users/getAllPoints", { | ||
| 2776 | + data: get_datas | ||
| 2777 | + }).then(res => { | ||
| 2778 | + if(res.data.code==0){ | ||
| 2779 | + integrals=res.data.data.Integral; | ||
| 2780 | + } | ||
| 2781 | + }) | ||
| 2782 | + | ||
| 2783 | + //获取一下积分活动 | ||
| 2784 | + await getApp().request.promiseGet("/api/weshop/integralbuy/pageIntegralBuyGoodsList", { | ||
| 2785 | + data: rdata | ||
| 2786 | + }).then(res => { | ||
| 2787 | + //调用接口有数据的时候 | ||
| 2788 | + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0) { | ||
| 2789 | + var inte_data=res.data.data.pageData[0]; | ||
| 2790 | + var can_integral=(parseFloat(integrals)>=parseFloat(inte_data.integral)); | ||
| 2791 | + ee.setData({ | ||
| 2792 | + prom_price:parseFloat(inte_data.addmoney), | ||
| 2793 | + prom_integral:parseFloat(inte_data.integral), | ||
| 2794 | + prom_type: 4, | ||
| 2795 | + prom_id: inte_data.id, | ||
| 2796 | + prom_buy_limit: inte_data.limitvipqty, | ||
| 2797 | + prom_act: inte_data, | ||
| 2798 | + isshow: 1, | ||
| 2799 | + can_integral:can_integral, | ||
| 2800 | + is_shopbuy: parseInt(inte_data.is_shopbuy?inte_data.is_shopbuy:0) | ||
| 2801 | + }); | ||
| 2802 | + ee.get_sto(); | ||
| 2803 | + | ||
| 2804 | + }else{ | ||
| 2805 | + ee.setData({prom_type: 0, isshow: 1,}); | ||
| 2806 | + ee.get_sku(os.stoid, ee.data.data.sku, gid); | ||
| 2807 | + ee.get_sto(); | ||
| 2808 | + return false; | ||
| 2809 | + } | ||
| 2810 | + }) | ||
| 2811 | + | ||
| 2812 | + } | ||
| 2813 | + | ||
| 2814 | + | ||
| 2815 | + //---判断拼单---- | ||
| 2816 | + if (prom_type == 6) { | ||
| 2817 | + //-------判断活动是否抢光--------- | ||
| 2818 | + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, { | ||
| 2819 | + 1: 1 | ||
| 2820 | + }).then(res => { | ||
| 2821 | + var em = res; | ||
| 2822 | + if (em.data.code == 0) { | ||
| 2823 | + | ||
| 2824 | + | ||
| 2825 | + if (em.data.data <= 0) ee.setData({ | ||
| 2826 | + prom_r_null: 1 | ||
| 2827 | + }); | ||
| 2828 | + //拿取价格并且判断时间-- | ||
| 2829 | + getApp().request.get("/api/weshop/teamlist/get/" + | ||
| 2830 | + os.stoid + "/" + prom_id, { | ||
| 2831 | + success: function(t) { | ||
| 2832 | + if (t.data.code != 0) { | ||
| 2833 | + ee.setData({ | ||
| 2834 | + prom_type: 0, | ||
| 2835 | + isshow: 1, | ||
| 2836 | + }); | ||
| 2837 | + ee.get_sku(os.stoid, ee.data.data.sku, gid); | ||
| 2838 | + ee.get_sto(); | ||
| 2839 | + return false; | ||
| 2840 | + } | ||
| 2841 | + //----已经结束----- | ||
| 2842 | + if (t.data.data.is_end == 1) { | ||
| 2843 | + ee.setData({ | ||
| 2844 | + prom_type: 0, | ||
| 2845 | + isshow: 1, | ||
| 2846 | + }); | ||
| 2847 | + ee.get_sku(os.stoid, ee.data.data.sku, gid); | ||
| 2848 | + return false; | ||
| 2849 | + } | ||
| 2850 | + //----已经过期----- | ||
| 2851 | + var now = ut.gettimestamp(); | ||
| 2852 | + if (t.data.data.end_time < now) { | ||
| 2853 | + ee.setData({ | ||
| 2854 | + prom_type: 0, | ||
| 2855 | + isshow: 1, | ||
| 2856 | + }); | ||
| 2857 | + ee.get_sku(os.stoid, ee.data.data.sku, gid); | ||
| 2858 | + ee.get_sto(); | ||
| 2859 | + return false; | ||
| 2860 | + } | ||
| 2861 | + | ||
| 2862 | + /*-- 还没有开始预热的也不显示 --*/ | ||
| 2863 | + if (t.data.data.show_time > now) { | ||
| 2864 | + ee.setData({ | ||
| 2865 | + prom_type: 0, | ||
| 2866 | + isshow: 1, | ||
| 2867 | + }); | ||
| 2868 | + ee.get_sku(os.stoid, ee.data.data.sku, gid); | ||
| 2869 | + ee.get_sto(); | ||
| 2870 | + return false; | ||
| 2871 | + } | ||
| 2872 | + | ||
| 2873 | + //-------查看自己是不是有买过该团的商品,并还为支付,或者在进行中------- | ||
| 2874 | + getApp().request.get("/api/weshop/order/page", { | ||
| 2875 | + data: { | ||
| 2876 | + pt_prom_id: prom_id, | ||
| 2877 | + user_id: oo.user_id, | ||
| 2878 | + store_id: os.stoid, | ||
| 2879 | + pageSize: 1, | ||
| 2880 | + page: 1 | ||
| 2881 | + }, | ||
| 2882 | + success: function(e) { | ||
| 2883 | + if (e.data.code == 0 && e.data.data.pageData.length > 0) { | ||
| 2884 | + var odr = e.data.data.pageData[0]; | ||
| 2885 | + th.data.buy_order = odr; | ||
| 2886 | + if (odr.pt_status == 0 && odr.order_status == 1) { | ||
| 2887 | + th.setData({ | ||
| 2888 | + user_order_pt_state: 1 | ||
| 2889 | + }); | ||
| 2890 | + } | ||
| 2891 | + if (odr.pt_status == 1 && odr.order_status == 1) { | ||
| 2892 | + if (odr.is_zsorder == 4) { | ||
| 2893 | + getApp().request.promiseGet("/api/weshop/teamgroup/page/", { | ||
| 2894 | + data: { | ||
| 2895 | + store_id: os.stoid, | ||
| 2896 | + team_id: odr.pt_prom_id, | ||
| 2897 | + listno: odr.pt_listno | ||
| 2898 | + } | ||
| 2899 | + }).then(res => { | ||
| 2900 | + var now = ut.gettimestamp(); | ||
| 2901 | + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ | ||
| 2902 | + var tgr = res.data.data.pageData[0]; | ||
| 2903 | + //如果团的时间已经到了 | ||
| 2904 | + if (now >= tgr.kt_end_time) { | ||
| 2905 | + th.update_jiti(tgr.id); | ||
| 2906 | + } else { | ||
| 2907 | + th.setData({ | ||
| 2908 | + user_order_pt_state: 2 | ||
| 2909 | + }); | ||
| 2910 | + } | ||
| 2911 | + } | ||
| 2912 | + }) | ||
| 2913 | + | ||
| 2914 | + } else { | ||
| 2915 | + th.setData({ | ||
| 2916 | + user_order_pt_state: 2 | ||
| 2917 | + }); | ||
| 2918 | + } | ||
| 2919 | + } | ||
| 2920 | + | ||
| 2921 | + if (odr.pt_status == 2 && odr.is_zsorder == 4) { | ||
| 2922 | + th.setData({ | ||
| 2923 | + user_order_pt_state: 3, | ||
| 2924 | + }); | ||
| 2925 | + th.data.wk_order_id = odr.order_id; | ||
| 2926 | + } | ||
| 2927 | + } | ||
| 2928 | + }, | ||
| 2929 | + }); | ||
| 2930 | + | ||
| 2931 | + //----------查看阶梯团------------ | ||
| 2932 | + if (t.data.data.ct_rylist != "" && t.data.data.ct_rylist != null && t.data.data.ct_rylist != undefined) { | ||
| 2933 | + t.data.data.ct_rylist = JSON.parse(t.data.data.ct_rylist); | ||
| 2934 | + var max_num = 0; | ||
| 2935 | + t.data.data.ct_rylist.forEach(function(val, ind) { | ||
| 2936 | + if (parseInt(val.rynum) > max_num) max_num = parseInt(val.rynum); | ||
| 2937 | + }) | ||
| 2938 | + t.data.data.max_ct_num = max_num; | ||
| 2939 | + } | ||
| 2940 | + | ||
| 2941 | + var prom_end_time = ut.formatTime(t.data.data.end_time, "yyyy-MM-dd hh:mm:ss"); | ||
| 2942 | + var prom_start_time = ut.formatTime(t.data.data.start_time, "yyyy-MM-dd hh:mm:ss"); | ||
| 2943 | + ee.setData({ | ||
| 2944 | + prom_price: t.data.data.price, | ||
| 2945 | + prom_type: 6, | ||
| 2946 | + prom_id: prom_id, | ||
| 2947 | + prom_buy_limit: t.data.data.buy_limit, | ||
| 2948 | + prom_act: t.data.data, | ||
| 2949 | + prom_end_time: prom_end_time, | ||
| 2950 | + prom_start_time: prom_start_time, | ||
| 2951 | + isshow: 1, | ||
| 2952 | + }); | ||
| 2953 | + | ||
| 2954 | + ee.get_sto(); | ||
| 2955 | + | ||
| 2956 | + var newTime = now; | ||
| 2957 | + var endTime2 = t.data.data.end_time; | ||
| 2958 | + var endTime1 = t.data.data.start_time; | ||
| 2959 | + | ||
| 2960 | + if (endTime1 > newTime) { | ||
| 2961 | + ee.setData({ | ||
| 2962 | + prom_time_text: '距拼单开始还剩:' | ||
| 2963 | + }) | ||
| 2964 | + ee.countDown(endTime1, 0); | ||
| 2965 | + } else { | ||
| 2966 | + if (endTime2 > newTime) { | ||
| 2967 | + ee.setData({ | ||
| 2968 | + prom_time_text: '距拼单结束还剩:', | ||
| 2969 | + prom_st: 1 | ||
| 2970 | + }) | ||
| 2971 | + ee.countDown(endTime2); | ||
| 2972 | + } | ||
| 2973 | + } | ||
| 2974 | + //-------查看有多少人在开这个团------- | ||
| 2975 | + th.get_team_group(prom_id); | ||
| 2976 | + } | ||
| 2977 | + }); | ||
| 2978 | + } | ||
| 2979 | + }) | ||
| 2980 | + } | ||
| 2981 | + | ||
| 2982 | + }, | ||
| 2983 | + | ||
| 2984 | + //--获取有多少人在开团-- | ||
| 2985 | + async get_team_group(prom_id) { | ||
| 2986 | + var teamgroup = [], | ||
| 2987 | + th = this, | ||
| 2988 | + grounp_tatal = 0; | ||
| 2989 | + //如果活动是开团不是商家团 | ||
| 2990 | + if (this.data.prom_act.kttype > 1) { | ||
| 2991 | + //获取活动从表信息team_id | ||
| 2992 | + await getApp().request.promiseGet("/api/weshop/teamgroup/page", { | ||
| 2993 | + data: { | ||
| 2994 | + store_id: os.stoid, | ||
| 2995 | + pageSize: 3, | ||
| 2996 | + page: 1, | ||
| 2997 | + state: 2, | ||
| 2998 | + team_id: prom_id | ||
| 2999 | + } | ||
| 3000 | + }).then(res => { | ||
| 3001 | + teamgroup = res.data.data.pageData; | ||
| 3002 | + grounp_tatal = res.data.data.total; | ||
| 3003 | + }) | ||
| 3004 | + //获取订单的总数这个接口不能用 | ||
| 3005 | + for (i = 0; i < teamgroup.length; i++) { | ||
| 3006 | + await getApp().request.promiseGet("/api/weshop/order/page", { | ||
| 3007 | + data: { | ||
| 3008 | + store_id: os.stoid, | ||
| 3009 | + pt_status: 1, | ||
| 3010 | + pt_listno: teamgroup[i].listno | ||
| 3011 | + } | ||
| 3012 | + }).then(res => { | ||
| 3013 | + var order = res.data.data.pageData; | ||
| 3014 | + teamgroup[i].open_num = order.length; | ||
| 3015 | + }) | ||
| 3016 | + await getApp().request.promiseGet("/api/weshop/users/get/" + os.stoid + "/" + teamgroup[i].openvipid, {}).then(res => { | ||
| 3017 | + var user = res.data.data; | ||
| 3018 | + teamgroup[i].user = user; | ||
| 3019 | + }) | ||
| 3020 | + } | ||
| 3021 | + | ||
| 3022 | + if (teamgroup.length > 0) { | ||
| 3023 | + th.setData({ | ||
| 3024 | + teamgroup: teamgroup, | ||
| 3025 | + grounp_tatal: grounp_tatal | ||
| 3026 | + }); | ||
| 3027 | + th.countDown2(); | ||
| 3028 | + } | ||
| 3029 | + } | ||
| 3030 | + }, | ||
| 3031 | + | ||
| 3032 | + //---小于10的格式化函数---- | ||
| 3033 | + timeFormat(param) { | ||
| 3034 | + return param < 10 ? '0' + param : param; | ||
| 3035 | + }, | ||
| 3036 | + | ||
| 3037 | + //----倒计时函数----- | ||
| 3038 | + countDown(time, prom_st) { | ||
| 3039 | + if (!this.data.is_timer) return false; | ||
| 3040 | + var th = this; | ||
| 3041 | + // 获取当前时间,同时得到活动结束时间数组 | ||
| 3042 | + var endTime = time; | ||
| 3043 | + var newTime = ut.gettimestamp(); | ||
| 3044 | + // 对结束时间进行处理渲染到页面 | ||
| 3045 | + var obj = null; | ||
| 3046 | + // 如果活动未结束,对时间进行处理 | ||
| 3047 | + if (endTime - newTime > 0) { | ||
| 3048 | + var time = (endTime - newTime); | ||
| 3049 | + // 获取天、时、分、秒 | ||
| 3050 | + var day = parseInt(time / (60 * 60 * 24)); | ||
| 3051 | + var hou = parseInt(time % (60 * 60 * 24) / 3600); | ||
| 3052 | + var min = parseInt(time % (60 * 60 * 24) % 3600 / 60); | ||
| 3053 | + var sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); | ||
| 3054 | + obj = { | ||
| 3055 | + day: this.timeFormat(day), | ||
| 3056 | + hou: this.timeFormat(hou), | ||
| 3057 | + min: this.timeFormat(min), | ||
| 3058 | + sec: this.timeFormat(sec) | ||
| 3059 | + } | ||
| 3060 | + } else { | ||
| 3061 | + if (th.data.prom_st == 0) { | ||
| 3062 | + //var endTime2 = new Date(th.data.prom_end_time).getTime(); | ||
| 3063 | + var endTime2 = th.data.prom_act.end_time; | ||
| 3064 | + th.setData({ | ||
| 3065 | + prom_time_text: '距结束还剩:', | ||
| 3066 | + prom_st: 1 | ||
| 3067 | + }) | ||
| 3068 | + setTimeout(function() { | ||
| 3069 | + th.countDown(endTime2) | ||
| 3070 | + }, 1000); | ||
| 3071 | + return false; | ||
| 3072 | + | ||
| 3073 | + } else { | ||
| 3074 | + //活动已结束,全部设置为'00' | ||
| 3075 | + obj = { | ||
| 3076 | + day: '00', | ||
| 3077 | + hou: '00', | ||
| 3078 | + min: '00', | ||
| 3079 | + sec: '00' | ||
| 3080 | + } | ||
| 3081 | + th.setData({ | ||
| 3082 | + prom_time_text: '活动已经结束:', | ||
| 3083 | + prom_st: 3 | ||
| 3084 | + }) | ||
| 3085 | + th.setData({ | ||
| 3086 | + djs: obj | ||
| 3087 | + }); | ||
| 3088 | + return false; | ||
| 3089 | + } | ||
| 3090 | + } | ||
| 3091 | + | ||
| 3092 | + th.setData({ | ||
| 3093 | + djs: obj | ||
| 3094 | + }); | ||
| 3095 | + setTimeout(function() { | ||
| 3096 | + th.countDown(endTime) | ||
| 3097 | + }, 1000); | ||
| 3098 | + }, | ||
| 3099 | + | ||
| 3100 | + | ||
| 3101 | + //-------------获取购买数量的总函数---------------- | ||
| 3102 | + get_buy_num: function(gd, func) { | ||
| 3103 | + var map = this.data.g_buy_num, | ||
| 3104 | + th = this, | ||
| 3105 | + user_id = getApp().globalData.user_id; | ||
| 3106 | + if (user_id == null) { | ||
| 3107 | + map.set(gd.goods_id, 0); | ||
| 3108 | + th.setData({ | ||
| 3109 | + g_buy_num: map, | ||
| 3110 | + prom_buy_num: 0, | ||
| 3111 | + }); | ||
| 3112 | + "function" == typeof func && func(); | ||
| 3113 | + return false; | ||
| 3114 | + } | ||
| 3115 | + | ||
| 3116 | + if (map.has(gd.goods_id)) { | ||
| 3117 | + "function" == typeof func && func(); | ||
| 3118 | + } else { | ||
| 3119 | + //----获取商品购买数---- | ||
| 3120 | + getApp().request.get("/api/weshop/ordergoods/getUserBuyGoodsNum", { | ||
| 3121 | + data: { | ||
| 3122 | + store_id: os.stoid, | ||
| 3123 | + user_id: user_id, | ||
| 3124 | + goods_id: gd.goods_id | ||
| 3125 | + }, | ||
| 3126 | + success: function(t) { | ||
| 3127 | + if (t.data.code == 0) { | ||
| 3128 | + var g_buy_num = t.data.data.goodsbuynum; | ||
| 3129 | + if (gd.prom_type == 1 || gd.prom_type == 2 || gd.prom_type == 4 || gd.prom_type == 6) { | ||
| 3130 | + //----获取活动购买数---- | ||
| 3131 | + getApp().request.get("/api/weshop/ordergoods/getUserBuyGoodsNum", { | ||
| 3132 | + data: { | ||
| 3133 | + store_id: os.stoid, | ||
| 3134 | + user_id: user_id, | ||
| 3135 | + goods_id: gd.goods_id, | ||
| 3136 | + prom_type: gd.prom_type, | ||
| 3137 | + prom_id: gd.prom_id | ||
| 3138 | + }, | ||
| 3139 | + //-----获取----- | ||
| 3140 | + success: function(tt) { | ||
| 3141 | + if (tt.data.code == 0) { | ||
| 3142 | + map.set(gd.goods_id, g_buy_num); | ||
| 3143 | + th.setData({ | ||
| 3144 | + g_buy_num: map, | ||
| 3145 | + prom_buy_num: tt.data.data.goodsbuynum, | ||
| 3146 | + }); | ||
| 3147 | + "function" == typeof func && func(); | ||
| 3148 | + } | ||
| 3149 | + } | ||
| 3150 | + }); | ||
| 3151 | + } else { | ||
| 3152 | + map.set(gd.goods_id, g_buy_num); | ||
| 3153 | + th.setData({ | ||
| 3154 | + g_buy_num: map | ||
| 3155 | + }); | ||
| 3156 | + "function" == typeof func && func(); | ||
| 3157 | + } | ||
| 3158 | + } | ||
| 3159 | + } | ||
| 3160 | + }); | ||
| 3161 | + } | ||
| 3162 | + }, | ||
| 3163 | + | ||
| 3164 | + //--拼单推荐的显示--- | ||
| 3165 | + tj_Click: function(e) { | ||
| 3166 | + var ind = parseInt(e.target.dataset.ind); | ||
| 3167 | + this.setData({ | ||
| 3168 | + is_show_gz: ind | ||
| 3169 | + }); | ||
| 3170 | + }, | ||
| 3171 | + | ||
| 3172 | + //--------拼团玩法显示详情-------- | ||
| 3173 | + show_pt_xx: function(e) { | ||
| 3174 | + this.setData({ | ||
| 3175 | + pd_xx: 1, | ||
| 3176 | + }) | ||
| 3177 | + }, | ||
| 3178 | + close_pt_xx: function() { | ||
| 3179 | + this.setData({ | ||
| 3180 | + pd_xx: 0, | ||
| 3181 | + }) | ||
| 3182 | + }, | ||
| 3183 | + | ||
| 3184 | + //--点击弹起拼单-- | ||
| 3185 | + openSpecModel_pt: function(e) { | ||
| 3186 | + | ||
| 3187 | + | ||
| 3188 | + this.setData({ open_ind_store: 4});//拼团直接给4 | ||
| 3189 | + | ||
| 3190 | + | ||
| 3191 | + //--先判断会员状态-- | ||
| 3192 | + var user_info = getApp().globalData.userInfo; | ||
| 3193 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | ||
| 3194 | + wx.navigateTo({ | ||
| 3195 | + url: '/pages/togoin/togoin', | ||
| 3196 | + }) | ||
| 3197 | + return false; | ||
| 3198 | + } | ||
| 3199 | + | ||
| 3200 | + var th = this; | ||
| 3201 | + var ind = parseInt(e.currentTarget.dataset.it); | ||
| 3202 | + //如果是拼单活动的普通购买 | ||
| 3203 | + if (ind == 1) { | ||
| 3204 | + //如果拼单的sku data是空的,就要先获取一下 | ||
| 3205 | + if (th.data.sku_g_pt) { | ||
| 3206 | + th.get_sto(1); | ||
| 3207 | + th.setData({ | ||
| 3208 | + is_normal: ind, | ||
| 3209 | + openSpecModal_pt: 1 | ||
| 3210 | + }); | ||
| 3211 | + } else { | ||
| 3212 | + th.get_sto(1); | ||
| 3213 | + th.get_sku(o.stoid, th.data.data.sku, th.data.gid, 1, function() { | ||
| 3214 | + th.setData({ | ||
| 3215 | + is_normal: ind, | ||
| 3216 | + openSpecModal_pt: 1 | ||
| 3217 | + }); | ||
| 3218 | + }); | ||
| 3219 | + } | ||
| 3220 | + } else { | ||
| 3221 | + | ||
| 3222 | + //拼单商品从这里进,先判断有没有买过商品, | ||
| 3223 | + getApp().request.get("/api/weshop/order/page", { | ||
| 3224 | + data: { | ||
| 3225 | + pt_prom_id: th.data.prom_act.id, | ||
| 3226 | + user_id: oo.user_id, | ||
| 3227 | + store_id: os.stoid, | ||
| 3228 | + pageSize: 1, | ||
| 3229 | + page: 1 | ||
| 3230 | + }, | ||
| 3231 | + success: function(e) { | ||
| 3232 | + //--跳转到已经购买的情况-- | ||
| 3233 | + if (e.data.data.pageData.length > 0) { | ||
| 3234 | + var odr = e.data.data.pageData[0]; | ||
| 3235 | + //还未支付 | ||
| 3236 | + if (odr.pt_status == 0 && (odr.order_status == 1 || odr.order_status == 0)) { | ||
| 3237 | + wx.showModal({ | ||
| 3238 | + title: "您已经购买了该商品待支付中", | ||
| 3239 | + success: function(a) { | ||
| 3240 | + if (a.confirm) { | ||
| 3241 | + wx.navigateTo({ | ||
| 3242 | + url: "/pages/user/order_detail/order_detail?order_id=" + odr.order_id, | ||
| 3243 | + }); | ||
| 3244 | + } | ||
| 3245 | + } | ||
| 3246 | + }); | ||
| 3247 | + } else if (odr.pt_status == 1 && odr.order_status == 1) { | ||
| 3248 | + | ||
| 3249 | + if(this.data.is_go_to_team_show) return false; | ||
| 3250 | + this.data.is_go_to_team_show=1; | ||
| 3251 | + wx.showLoading(); | ||
| 3252 | + | ||
| 3253 | + wx.redirectTo({ | ||
| 3254 | + url: "/pages/team/team_success/team_success?ordersn=" + odr.order_sn, | ||
| 3255 | + }); | ||
| 3256 | + } else { | ||
| 3257 | + th.setData({ | ||
| 3258 | + is_normal: ind, | ||
| 3259 | + openSpecModal_pt: 1 | ||
| 3260 | + }); | ||
| 3261 | + } | ||
| 3262 | + | ||
| 3263 | + } else { | ||
| 3264 | + th.setData({ | ||
| 3265 | + is_normal: ind, | ||
| 3266 | + openSpecModal_pt: 1 | ||
| 3267 | + }); | ||
| 3268 | + } | ||
| 3269 | + } | ||
| 3270 | + }); | ||
| 3271 | + } | ||
| 3272 | + }, | ||
| 3273 | + | ||
| 3274 | + //-----------------拼单生成方法--------------------- | ||
| 3275 | + addCart_pt: function() { | ||
| 3276 | + var th = this; | ||
| 3277 | + if (this.data.is_normal == 0) { | ||
| 3278 | + //看一下有没有起购数,如果有起购数,要计算起购数 | ||
| 3279 | + var qnum = parseFloat(th.data.prom_act.minbuynum); | ||
| 3280 | + if (qnum > 0 && th.data.goodsInputNum < qnum) { | ||
| 3281 | + getApp().confirmBox("拼团商品至少要买" + qnum + "件!"); | ||
| 3282 | + return false; | ||
| 3283 | + } | ||
| 3284 | + | ||
| 3285 | + th.addcart_pt_func(); | ||
| 3286 | + } else { | ||
| 3287 | + th.addcart_pt_func(); | ||
| 3288 | + } | ||
| 3289 | + }, | ||
| 3290 | + | ||
| 3291 | + addcart_pt_func: function() { | ||
| 3292 | + if (oo.user_id == null) { | ||
| 3293 | + s.my_warnning("还未登录!", 0, this); | ||
| 3294 | + return; | ||
| 3295 | + } | ||
| 3296 | + var e = this, | ||
| 3297 | + th = e, | ||
| 3298 | + o = this.data.sele_g; | ||
| 3299 | + if (o.store_count <= 0) return s.my_warnning("库存已为空!", 0, th); | ||
| 3300 | + | ||
| 3301 | + //----------添加到购物车时,要判断限购数量,-------- | ||
| 3302 | + e.get_buy_num(o, async function(ee) { | ||
| 3303 | + | ||
| 3304 | + //---判断商品是否超出限购--- | ||
| 3305 | + if (th.data.g_buy_num != null && th.data.sele_g.viplimited > 0) { | ||
| 3306 | + if (th.data.goodsInputNum + th.data.g_buy_num.get(th.data.sele_g.goods_id) > th.data.sele_g.viplimited) { | ||
| 3307 | + wx.showModal({ | ||
| 3308 | + title: '提示', | ||
| 3309 | + content: '超出商品限购' | ||
| 3310 | + }); | ||
| 3311 | + | ||
| 3312 | + var num=th.data.prom_buy_limit-th.data.prom_buy_num; | ||
| 3313 | + if(num<0) num=0; | ||
| 3314 | + th.setData({goodsInputNum:num}) | ||
| 3315 | + return false; | ||
| 3316 | + } | ||
| 3317 | + } | ||
| 3318 | + //---判断商品是否超出活动限购,拼团的普通购买不计算活动的限购--- | ||
| 3319 | + if (th.data.prom_buy_num != -1 && th.data.prom_buy_limit > 0 && th.data.is_normal!=1) { | ||
| 3320 | + if (th.data.goodsInputNum + th.data.prom_buy_num > th.data.prom_buy_limit) { | ||
| 3321 | + wx.showModal({ | ||
| 3322 | + title: '提示', | ||
| 3323 | + content: '超出商品活动限购' | ||
| 3324 | + }); | ||
| 3325 | + | ||
| 3326 | + var num=th.data.prom_buy_limit-th.data.prom_buy_num; | ||
| 3327 | + if(num<0) num=0; | ||
| 3328 | + th.setData({goodsInputNum:num}) | ||
| 3329 | + return false; | ||
| 3330 | + } | ||
| 3331 | + } | ||
| 3332 | + | ||
| 3333 | + var redis_num = 0 | ||
| 3334 | + //不是普通购买的时候 | ||
| 3335 | + if(th.data.is_normal!=1){ | ||
| 3336 | + //-------判断活动是否抢光--------- | ||
| 3337 | + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/6/" + th.data.sele_g.prom_id, { | ||
| 3338 | + 1: 1 | ||
| 3339 | + }).then(res => { | ||
| 3340 | + redis_num = res.data.data; | ||
| 3341 | + }) | ||
| 3342 | + | ||
| 3343 | + if (th.data.goodsInputNum > redis_num) { | ||
| 3344 | + wx.showModal({ | ||
| 3345 | + title: '提示', | ||
| 3346 | + content: '超出商品活动库存' | ||
| 3347 | + }); | ||
| 3348 | + | ||
| 3349 | + th.setData({goodsInputNum:redis_num}) | ||
| 3350 | + | ||
| 3351 | + return false; | ||
| 3352 | + } | ||
| 3353 | + } | ||
| 3354 | + | ||
| 3355 | + if (th.data.goodsInputNum <= 0) return s.my_warnning("商品数量不能为0", 0, th); | ||
| 3356 | + if (th.data.goodsInputNum > o.store_count) { | ||
| 3357 | + th.setData({goodsInputNum:o.store_count}) | ||
| 3358 | + return s.my_warnning("超出商品库存", 0, th); | ||
| 3359 | + } | ||
| 3360 | + | ||
| 3361 | + if (th.data.sto_sele_name == null || th.data.sto_sele_name == undefined) | ||
| 3362 | + this.setData({ | ||
| 3363 | + sto_sele_name: "" | ||
| 3364 | + }); | ||
| 3365 | + if (th.data.sto_sele_name == "") return s.my_warnning("请选择门店", 0, th); | ||
| 3366 | + //--------------此时操作的数据------------ | ||
| 3367 | + var newd = { | ||
| 3368 | + goods_id: o.goods_id, | ||
| 3369 | + goods_num: th.data.goodsInputNum, | ||
| 3370 | + pick_id: th.data.sto_sele_id, | ||
| 3371 | + user_id: oo.user_id, | ||
| 3372 | + store_id: th.data.stoid, | ||
| 3373 | + goods_price: o.shop_price, | ||
| 3374 | + goods_name: o.goods_name, | ||
| 3375 | + goods_sn: o.goods_sn, | ||
| 3376 | + sku: o.sku, | ||
| 3377 | + }; | ||
| 3378 | + | ||
| 3379 | + //---是不是从收藏夹出来的--- | ||
| 3380 | + if(th.data.c_guide_id){ | ||
| 3381 | + newd['guide_id'] = th.data.c_guide_id; | ||
| 3382 | + newd['guide_type']=2; | ||
| 3383 | + | ||
| 3384 | + }else{ | ||
| 3385 | + if(getApp().globalData.guide_id){ | ||
| 3386 | + newd['guide_id'] = getApp().globalData.guide_id; | ||
| 3387 | + newd['guide_type']=0; | ||
| 3388 | + | ||
| 3389 | + } | ||
| 3390 | + } | ||
| 3391 | + | ||
| 3392 | + //让商品带上房间号 | ||
| 3393 | + if(th.data.sys_switch.is_skuroom_id==1){ | ||
| 3394 | + if(th.data.data.goods_id==getApp().globalData.room_goods_id){ | ||
| 3395 | + newd.room_id=getApp().globalData.room_id; | ||
| 3396 | + } | ||
| 3397 | + }else{ | ||
| 3398 | + if(newd.goods_id==getApp().globalData.room_goods_id){ | ||
| 3399 | + newd.room_id=getApp().globalData.room_id; | ||
| 3400 | + } | ||
| 3401 | + } | ||
| 3402 | + | ||
| 3403 | + //---如果商品不是积分购和拼团,要判断一个是否要进行等级价的判断------ | ||
| 3404 | + | ||
| 3405 | + if(th.data.is_normal == 1){ | ||
| 3406 | + var conf=th.data.bconfig; | ||
| 3407 | + if(conf.switch_list){ | ||
| 3408 | + var s_list=JSON.parse(conf.switch_list); | ||
| 3409 | + //如果后台有开启等级价的功能 | ||
| 3410 | + if(parseInt(s_list.rank_switch)==2){ | ||
| 3411 | + var card_price=o[getApp().globalData.userInfo['card_field']]; | ||
| 3412 | + //如果会员有等级价 | ||
| 3413 | + if(getApp().globalData.userInfo['card_field']!=undefined && getApp().globalData.userInfo['card_field']!=null | ||
| 3414 | + && getApp().globalData.userInfo['card_field']!="" && card_price>0){ | ||
| 3415 | + newd.goods_price=card_price; | ||
| 3416 | + } | ||
| 3417 | + } | ||
| 3418 | + } | ||
| 3419 | + } | ||
| 3420 | + | ||
| 3421 | + | ||
| 3422 | + //-----如果是秒杀,团购,积分购,拼团,且不是普通购买----- | ||
| 3423 | + if (th.data.prom_type == 6 && th.data.is_normal!= 1) { | ||
| 3424 | + newd.goods_price = th.data.prom_price; | ||
| 3425 | + newd.prom_type = th.data.prom_type; | ||
| 3426 | + newd.prom_id = th.data.prom_id; | ||
| 3427 | + newd.kt_type = th.data.prom_act.kttype; //开团类型 | ||
| 3428 | + newd.is_pt_tz = 0; | ||
| 3429 | + //th.data.sto_sele_distr=1; //直接用自提的方式提交 | ||
| 3430 | + if (newd.kt_type > 1) { | ||
| 3431 | + newd.is_pt_tz = 1; //开团类型 | ||
| 3432 | + } | ||
| 3433 | + if (newd.kt_type == 3) { | ||
| 3434 | + th.data.sto_sele_distr = 1; | ||
| 3435 | + } | ||
| 3436 | + | ||
| 3437 | + } else if (th.data.prom_type == 3) { | ||
| 3438 | + newd.prom_type = 0; | ||
| 3439 | + newd.prom_id = 0; | ||
| 3440 | + } | ||
| 3441 | + | ||
| 3442 | + newd['pick_name'] = th.data.sto_sele_name; | ||
| 3443 | + newd['pick_dis'] = th.data.sto_sele_distr; | ||
| 3444 | + newd['is_normal'] = th.data.is_normal; | ||
| 3445 | + | ||
| 3446 | + th.buyNow_pt(newd); | ||
| 3447 | + }) | ||
| 3448 | + }, | ||
| 3449 | + //----------立即购买_pt----------- | ||
| 3450 | + buyNow_pt: function(e) { | ||
| 3451 | + s.set_b_now(e); | ||
| 3452 | + wx.navigateTo({ | ||
| 3453 | + url: "/pages/cart/cart2_pt/cart2_pt?is_bnow=1&goods_id=" + e.goods_id, | ||
| 3454 | + }); | ||
| 3455 | + }, | ||
| 3456 | + | ||
| 3457 | + //-------跳转pt商品------- | ||
| 3458 | + go_to_nopay: function() { | ||
| 3459 | + var th = this; | ||
| 3460 | + url="/pages/user/order_detail/order_detail?order_id=" + th.data.buy_order.order_id; | ||
| 3461 | + getApp().goto(url); | ||
| 3462 | + | ||
| 3463 | + }, | ||
| 3464 | + //-------跳转pt teamshow------- | ||
| 3465 | + go_to_team_show: function() { | ||
| 3466 | + | ||
| 3467 | + if(this.data.is_go_to_team_show) return false; | ||
| 3468 | + this.data.is_go_to_team_show=1; | ||
| 3469 | + wx.showLoading(); | ||
| 3470 | + | ||
| 3471 | + var th = this; | ||
| 3472 | + var url="/pages/team/team_success/team_success?ordersn=" + th.data.buy_order.order_sn; | ||
| 3473 | + wx.redirectTo({ | ||
| 3474 | + url:url, | ||
| 3475 | + }) | ||
| 3476 | + | ||
| 3477 | + }, | ||
| 3478 | + | ||
| 3479 | + //---拼团倒计时--- | ||
| 3480 | + countDown2() { | ||
| 3481 | + if (!this.data.is_timer) return false; | ||
| 3482 | + var th = this; | ||
| 3483 | + // 获取当前时间,同时得到活动结束时间数组 | ||
| 3484 | + var newTime = ut.gettimestamp(); | ||
| 3485 | + var List = th.data.teamgroup; | ||
| 3486 | + for (var j = 0; j < List.length; j++) { | ||
| 3487 | + // 对结束时间进行处理渲染到页面 | ||
| 3488 | + var endTime = List[j].kt_end_time; | ||
| 3489 | + let obj = null; | ||
| 3490 | + // 如果活动未结束,对时间进行处理 | ||
| 3491 | + if (endTime - newTime > 0) { | ||
| 3492 | + let time = (endTime - newTime); | ||
| 3493 | + // 获取天、时、分、秒 | ||
| 3494 | + let day = parseInt(time / (60 * 60 * 24)); | ||
| 3495 | + let hou = parseInt(time % (60 * 60 * 24) / 3600); | ||
| 3496 | + let min = parseInt(time % (60 * 60 * 24) % 3600 / 60); | ||
| 3497 | + let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); | ||
| 3498 | + obj = { | ||
| 3499 | + day: this.timeFormat(day), | ||
| 3500 | + hou: this.timeFormat(hou), | ||
| 3501 | + min: this.timeFormat(min), | ||
| 3502 | + sec: this.timeFormat(sec) | ||
| 3503 | + } | ||
| 3504 | + } else { | ||
| 3505 | + //活动已结束,全部设置为'00' | ||
| 3506 | + obj = { | ||
| 3507 | + day: '00', | ||
| 3508 | + hou: '00', | ||
| 3509 | + min: '00', | ||
| 3510 | + sec: '00' | ||
| 3511 | + } | ||
| 3512 | + } | ||
| 3513 | + var txt = "timer[" + j + "]"; | ||
| 3514 | + th.setData({ | ||
| 3515 | + [txt]: obj | ||
| 3516 | + }); | ||
| 3517 | + } | ||
| 3518 | + setTimeout(th.countDown2, 1000); | ||
| 3519 | + }, | ||
| 3520 | + //跳转参加团 | ||
| 3521 | + go_cj_team: function(e) { | ||
| 3522 | + var ind = e.currentTarget.dataset.ind; | ||
| 3523 | + var item = this.data.teamgroup[ind]; | ||
| 3524 | + var id = item.id; | ||
| 3525 | + var th = this; | ||
| 3526 | + | ||
| 3527 | + getApp().request.get("/api/weshop/order/page", { | ||
| 3528 | + data: { | ||
| 3529 | + pt_prom_id: item.team_id, | ||
| 3530 | + user_id: oo.user_id, | ||
| 3531 | + store_id: os.stoid, | ||
| 3532 | + pageSize: 1, | ||
| 3533 | + page: 1 | ||
| 3534 | + }, | ||
| 3535 | + success: function(e) { | ||
| 3536 | + if (e.data.code != 0) { | ||
| 3537 | + getApp().my_warnning("读取订单失败", 0, th); | ||
| 3538 | + return fasle; | ||
| 3539 | + } | ||
| 3540 | + //--跳转到已经购买的情况-- | ||
| 3541 | + if (e.data.data.pageData.length > 0) { | ||
| 3542 | + var odr = e.data.data.pageData[0]; | ||
| 3543 | + //还未支付 | ||
| 3544 | + if (odr.pt_status == 0 && (odr.order_status == 1 || odr.order_status == 0)) { | ||
| 3545 | + wx.showModal({ | ||
| 3546 | + title: "您已经购买了该商品待支付中", | ||
| 3547 | + success: function(a) { | ||
| 3548 | + if (a.confirm) { | ||
| 3549 | + wx.navigateTo({ | ||
| 3550 | + url: "/pages/user/order_detail/order_detail?order_id=" + odr.order_id, | ||
| 3551 | + }); | ||
| 3552 | + } | ||
| 3553 | + } | ||
| 3554 | + }); | ||
| 3555 | + } else if (odr.pt_status == 1 && odr.order_status == 1) { | ||
| 3556 | + | ||
| 3557 | + if(this.data.is_go_to_team_show) return false; | ||
| 3558 | + this.data.is_go_to_team_show=1; | ||
| 3559 | + wx.showLoading(); | ||
| 3560 | + | ||
| 3561 | + wx.redirectTo({ | ||
| 3562 | + url: "/pages/team/team_success/team_success?ordersn=" + odr.order_sn, | ||
| 3563 | + }); | ||
| 3564 | + } else { | ||
| 3565 | + wx.navigateTo({ | ||
| 3566 | + url: "/pages/team/team_show/team_show?tg_id=" + id, | ||
| 3567 | + }); | ||
| 3568 | + } | ||
| 3569 | + } | ||
| 3570 | + //--跳转到参团-- | ||
| 3571 | + else { | ||
| 3572 | + wx.navigateTo({ | ||
| 3573 | + url: "/pages/team/team_show/team_show?tg_id=" + id, | ||
| 3574 | + }); | ||
| 3575 | + } | ||
| 3576 | + } | ||
| 3577 | + }) | ||
| 3578 | + | ||
| 3579 | + }, | ||
| 3580 | + | ||
| 3581 | + //跳到团更多 | ||
| 3582 | + go_t_more: function() { | ||
| 3583 | + var team_id = this.data.prom_id; | ||
| 3584 | + wx.navigateTo({ | ||
| 3585 | + url: "/pages/team/team_more/team_more?team_id=" + team_id, | ||
| 3586 | + }); | ||
| 3587 | + }, | ||
| 3588 | + | ||
| 3589 | + //--点赞功能-- | ||
| 3590 | + click_zan: function(e) { | ||
| 3591 | + var com_id = e.currentTarget.dataset.com_id; | ||
| 3592 | + var item_id = e.currentTarget.dataset.item_id; | ||
| 3593 | + var app = getApp(), | ||
| 3594 | + th = this; | ||
| 3595 | + | ||
| 3596 | + if (app.globalData.userInfo == null || app.globalData.userInfo == undefined) { | ||
| 3597 | + app.confirmBox("您还未登录"); | ||
| 3598 | + return false; | ||
| 3599 | + } | ||
| 3600 | + | ||
| 3601 | + var iszan = th.data.comments[item_id].userZanNum; | ||
| 3602 | + if (this.data.iszaning) return false; | ||
| 3603 | + this.data.iszaning = 1; | ||
| 3604 | + | ||
| 3605 | + | ||
| 3606 | + app.request.post("/api/weshop/commentZan/save", { | ||
| 3607 | + data: { | ||
| 3608 | + store_id: o.stoid, | ||
| 3609 | + user_id: app.globalData.user_id, | ||
| 3610 | + goods_id: th.data.gid, | ||
| 3611 | + comment_id: com_id | ||
| 3612 | + }, | ||
| 3613 | + success: function(ee) { | ||
| 3614 | + | ||
| 3615 | + if (ee.data.code == "-1") { | ||
| 3616 | + app.my_warnning("不能给自己点赞", 0, th); | ||
| 3617 | + th.data.iszaning = 0; | ||
| 3618 | + return; | ||
| 3619 | + } | ||
| 3620 | + | ||
| 3621 | + if (ee.data.code == 0 && iszan != 1) { | ||
| 3622 | + var num = th.data.comments[item_id].zan_num; | ||
| 3623 | + num++; | ||
| 3624 | + var text = "comments[" + item_id + "].zan_num"; | ||
| 3625 | + var text1 = "comments[" + item_id + "].userZanNum"; | ||
| 3626 | + var _errObj = {}; | ||
| 3627 | + _errObj[text] = num; | ||
| 3628 | + _errObj[text1] = 1; | ||
| 3629 | + th.setData(_errObj); | ||
| 3630 | + | ||
| 3631 | + } else { | ||
| 3632 | + var num = th.data.comments[item_id].zan_num; | ||
| 3633 | + num--; | ||
| 3634 | + var text = "comments[" + item_id + "].zan_num"; | ||
| 3635 | + var text1 = "comments[" + item_id + "].userZanNum"; | ||
| 3636 | + var _errObj = {}; | ||
| 3637 | + _errObj[text] = num; | ||
| 3638 | + _errObj[text1] = 0; | ||
| 3639 | + th.setData(_errObj); | ||
| 3640 | + } | ||
| 3641 | + | ||
| 3642 | + setTimeout(function() { | ||
| 3643 | + th.data.iszaning = 0; | ||
| 3644 | + }, 500) | ||
| 3645 | + | ||
| 3646 | + } | ||
| 3647 | + }) | ||
| 3648 | + }, | ||
| 3649 | + | ||
| 3650 | + /*----券的开关---*/ | ||
| 3651 | + switchCoupon: async function(event) { | ||
| 3652 | + var coupon = event.currentTarget.dataset.coupon; | ||
| 3653 | + var app = getApp(); | ||
| 3654 | + var url = "/api/weshop/prom/coupon/pageCouponList"; | ||
| 3655 | + var quan_list = this.data.quan_list; | ||
| 3656 | + var th = this; | ||
| 3657 | + | ||
| 3658 | + //当开启,且列表为空的情况下要 | ||
| 3659 | + if (!quan_list && coupon == "1") { | ||
| 3660 | + wx.showLoading(); | ||
| 3661 | + await app.request.promiseGet(url, { | ||
| 3662 | + data: { | ||
| 3663 | + store_id: os.stoid, | ||
| 3664 | + type: 1, | ||
| 3665 | + pageSize: 100, | ||
| 3666 | + page: 1, | ||
| 3667 | + user_id: app.globalData.user_id, | ||
| 3668 | + is_share:0 | ||
| 3669 | + } | ||
| 3670 | + }).then(res => { | ||
| 3671 | + wx.hideLoading(); | ||
| 3672 | + quan_list = res.data.data.pageData; | ||
| 3673 | + }) | ||
| 3674 | + | ||
| 3675 | + if (quan_list) { | ||
| 3676 | + for (var ind in quan_list) { | ||
| 3677 | + var ep = quan_list[ind]; | ||
| 3678 | + var start = ut.formatTime(ep.use_start_time, "yyyy-MM-dd"); | ||
| 3679 | + var end = ut.formatTime(ep.use_end_time, "yyyy-MM-dd"); | ||
| 3680 | + start = start.replace("00:00:00", ""); | ||
| 3681 | + end = end.replace("00:00:00", ""); | ||
| 3682 | + quan_list[ind].start = start; | ||
| 3683 | + quan_list[ind].end = end; | ||
| 3684 | + } | ||
| 3685 | + } | ||
| 3686 | + | ||
| 3687 | + th.setData({ | ||
| 3688 | + coupon: coupon, | ||
| 3689 | + quan_list: quan_list | ||
| 3690 | + }); | ||
| 3691 | + } else { | ||
| 3692 | + th.setData({ | ||
| 3693 | + coupon: coupon | ||
| 3694 | + }); | ||
| 3695 | + } | ||
| 3696 | + }, | ||
| 3697 | + | ||
| 3698 | + //--查看评价-- | ||
| 3699 | + look_pj: function() { | ||
| 3700 | + this.tabComment(); | ||
| 3701 | + this.doScrollTop(); | ||
| 3702 | + }, | ||
| 3703 | + | ||
| 3704 | + //-----领取券----- | ||
| 3705 | + get_quan: function(e) { | ||
| 3706 | + var cid = e.currentTarget.dataset.cid; | ||
| 3707 | + var index = e.currentTarget.dataset.ind; | ||
| 3708 | + var item = this.data.quan_list[index]; | ||
| 3709 | + | ||
| 3710 | + | ||
| 3711 | + //--先判断会员状态-- | ||
| 3712 | + var user_info = getApp().globalData.userInfo; | ||
| 3713 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | ||
| 3714 | + wx.navigateTo({ | ||
| 3715 | + url: '/pages/togoin/togoin', | ||
| 3716 | + }) | ||
| 3717 | + return false; | ||
| 3718 | + } | ||
| 3719 | + | ||
| 3720 | + | ||
| 3721 | + //如果券还在领取中,不能再点 | ||
| 3722 | + if (item.linging == 1) { | ||
| 3723 | + getApp().my_warnning('领取中..', 0, this); | ||
| 3724 | + return false; | ||
| 3725 | + } | ||
| 3726 | + | ||
| 3727 | + //如果领取的次数到了 | ||
| 3728 | + if (item.everyone_num > 0 && item.lqnum >= item.everyone_num) { | ||
| 3729 | + getApp().my_warnning('领取失败,您已领完该券', 0, this); | ||
| 3730 | + return false; | ||
| 3731 | + } | ||
| 3732 | + | ||
| 3733 | + var lq_num = item.lqnum; | ||
| 3734 | + | ||
| 3735 | + var pdata = { | ||
| 3736 | + 'uid': oo.user_id, | ||
| 3737 | + 'cid': cid, | ||
| 3738 | + 'store_id': os.stoid, | ||
| 3739 | + 'type': 5 | ||
| 3740 | + }; | ||
| 3741 | + | ||
| 3742 | + //-- 导购ID -- | ||
| 3743 | + if(getApp().globalData.guide_id){ | ||
| 3744 | + pdata.guide_id=getApp().globalData.guide_id; | ||
| 3745 | + } | ||
| 3746 | + | ||
| 3747 | + var app = getApp(), | ||
| 3748 | + th = this; | ||
| 3749 | + app.request.post("/api/weshop/couponList/saveCouponList", { | ||
| 3750 | + data: pdata, | ||
| 3751 | + success: function(res) { | ||
| 3752 | + if (res.data.code == 0) { | ||
| 3753 | + app.my_warnning("领取成功", 1, th); | ||
| 3754 | + lq_num++; | ||
| 3755 | + var text = "quan_list[" + index + "].lqnum"; | ||
| 3756 | + var text2 = "quan_list[" + index + "].linging"; | ||
| 3757 | + var obj = {}; | ||
| 3758 | + obj[text] = lq_num; | ||
| 3759 | + obj[text2] = 0; | ||
| 3760 | + th.setData(obj); | ||
| 3761 | + } else { | ||
| 3762 | + app.confirmBox(res.data.msg); | ||
| 3763 | + var text2 = "quan_list[" + index + "].linging"; | ||
| 3764 | + var obj = {}; | ||
| 3765 | + obj[text2] = 0; | ||
| 3766 | + th.setData(obj); | ||
| 3767 | + } | ||
| 3768 | + } | ||
| 3769 | + }) | ||
| 3770 | + }, | ||
| 3771 | + | ||
| 3772 | + //--定义的保存图片方法,分享团--- | ||
| 3773 | + saveImageToPhotosAlbum: function() { | ||
| 3774 | + //--先判断会员状态-- | ||
| 3775 | + var user_info = getApp().globalData.userInfo; | ||
| 3776 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | ||
| 3777 | + //getApp().my_warnning("请先登录",0,this); | ||
| 3778 | + wx.navigateTo({ url: '/pages/togoin/togoin', }) | ||
| 3779 | + return false; | ||
| 3780 | + } | ||
| 3781 | + | ||
| 3782 | + //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团 4阶梯团 | ||
| 3783 | + var type = this.data.prom_type; | ||
| 3784 | + if (type == 6) type = 2; | ||
| 3785 | + if (this.data.prom_act && this.data.prom_act.kttype == 3) type = 3; | ||
| 3786 | + | ||
| 3787 | + wx.showLoading({ | ||
| 3788 | + title: '生成中...', | ||
| 3789 | + }) | ||
| 3790 | + var that = this, | ||
| 3791 | + th = that; | ||
| 3792 | + //设置画板显示,才能开始绘图 | ||
| 3793 | + that.setData({ | ||
| 3794 | + canvasHidden: false | ||
| 3795 | + }) | ||
| 3796 | + | ||
| 3797 | + var app = getApp(); | ||
| 3798 | + var unit = that.data.screenWidth / 750 * 1.35; //基础单位, | ||
| 3799 | + var path2 = that.data.data.original_img; | ||
| 3800 | + var scene = th.data.gid+""; | ||
| 3801 | + var user_id = getApp().globalData.user_id?getApp().globalData.user_id:0; | ||
| 3802 | + if(user_id>0) { | ||
| 3803 | + scene+="_"+user_id; | ||
| 3804 | + } | ||
| 3805 | + //-- 如果不是会员分享过来的要分享给别人 -- | ||
| 3806 | + if(getApp().globalData.room_id && th.data.data.goods_id==getApp().globalData.room_goods_id && !getApp().globalData.room_user_share) { | ||
| 3807 | + //固定房间是第3个字符 | ||
| 3808 | + if(!user_id) scene+="_0"; | ||
| 3809 | + scene+="_"+getApp().globalData.room_id ; | ||
| 3810 | + } | ||
| 3811 | + ///二微码 | ||
| 3812 | + var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + | ||
| 3813 | + os.stoid + "?sceneValue=" + scene + "&pageValue=pages/goods/goodsInfo/goodsInfo"; | ||
| 3814 | + | ||
| 3815 | + console.log(path3); | ||
| 3816 | + | ||
| 3817 | + //读取文件成功则OK-- | ||
| 3818 | + wx.getImageInfo({ | ||
| 3819 | + src: path3, | ||
| 3820 | + success: function(res) { | ||
| 3821 | + //回调写法 | ||
| 3822 | + th.get_head_temp(th.get_goods_temp, function() { | ||
| 3823 | + var vpath = res.path; | ||
| 3824 | + var context = wx.createCanvasContext('share'); | ||
| 3825 | + //先画背景 | ||
| 3826 | + var pg_path = "../../../images/share/share_bg.png"; | ||
| 3827 | + | ||
| 3828 | + // context.fillStyle="#FFFFFF"; | ||
| 3829 | + // context.fillRect(0,0,554 * unit, 899 * unit); | ||
| 3830 | + | ||
| 3831 | + //-- 如果有自定义海报的时候,判断背景的图片 -- | ||
| 3832 | + if(th.data.share_b_img){ | ||
| 3833 | + pg_path=th.data.share_b_img; | ||
| 3834 | + } | ||
| 3835 | + context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); | ||
| 3836 | + | ||
| 3837 | + //-- 是自定义海报的情况下 -- | ||
| 3838 | + if(th.data.poster && parseInt(th.data.poster.style)==2) { | ||
| 3839 | + //在线上分享人的情况下 | ||
| 3840 | + if(parseInt(th.data.poster.show_headpic)){ | ||
| 3841 | + //获取坐标 | ||
| 3842 | + var x=parseFloat(th.data.poster.head_x)*2; | ||
| 3843 | + var y=parseFloat(th.data.poster.head_y)*2; | ||
| 3844 | + var x1=(x+90) *unit; | ||
| 3845 | + var y1=(y+50) *unit; | ||
| 3846 | + //--昵称--- | ||
| 3847 | + context.setFontSize(24 * unit) | ||
| 3848 | + context.setFillStyle("black") | ||
| 3849 | + context.fillText(app.globalData.userInfo.nickname, x1, y1); | ||
| 3850 | + var width = 24 * app.globalData.userInfo.nickname.length * unit + 4 * unit; | ||
| 3851 | + //强烈推荐 改许程 | ||
| 3852 | + var tj_path = "../../../images/share/q_tj.png"; | ||
| 3853 | + context.drawImage(tj_path, x1 + width, y1-22*unit, 85 * unit, 30 * unit); | ||
| 3854 | + context.setFontSize(16 * unit) | ||
| 3855 | + context.setLineJoin('round'); //交点设置成圆角 | ||
| 3856 | + context.setFillStyle("white") | ||
| 3857 | + context.fillText('强烈推荐', x1 + width+8*unit, y1-1*unit); | ||
| 3858 | + | ||
| 3859 | + //context.setFillStyle("black") | ||
| 3860 | + //context.setFontSize(24 * unit) | ||
| 3861 | + //context.fillText(getApp().globalData.config.store_name, 40 * unit, 130 * unit); | ||
| 3862 | + } | ||
| 3863 | + } else { | ||
| 3864 | + //--昵称--- | ||
| 3865 | + context.setFontSize(24 * unit) | ||
| 3866 | + context.setFillStyle("black") | ||
| 3867 | + context.fillText(app.globalData.userInfo.nickname, 152 * unit, 76 * unit); | ||
| 3868 | + var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit; | ||
| 3869 | + //强烈推荐 改许程 | ||
| 3870 | + var tj_path = "../../../images/share/q_tj.png"; | ||
| 3871 | + context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit); | ||
| 3872 | + context.setFontSize(16 * unit); | ||
| 3873 | + context.setLineJoin('round'); //交点设置成圆角 | ||
| 3874 | + context.setFillStyle("white"); | ||
| 3875 | + context.fillText('强烈推荐', 149 * unit + width + 15 * unit, 75 * unit); | ||
| 3876 | + } | ||
| 3877 | + | ||
| 3878 | + | ||
| 3879 | + //---产品名称--- | ||
| 3880 | + //文本换行 参数:1、canvas对象,2、文本 3、距离左侧的距离 4、距离顶部的距离 5、6、文本的宽度 | ||
| 3881 | + if(type!=4){ | ||
| 3882 | + context.setFillStyle("black"); | ||
| 3883 | + context.setFontSize(21.3 * unit) | ||
| 3884 | + th.draw_Text(context, th.data.data.goods_name, | ||
| 3885 | + 38 * unit, 180 * unit, 200 * unit, 279 * unit, unit); | ||
| 3886 | + //------产品的价格------- | ||
| 3887 | + context.setFontSize(23 * unit) | ||
| 3888 | + context.setFillStyle("red") | ||
| 3889 | + context.fillText("¥", 416 * unit, 185 * unit); | ||
| 3890 | + context.setFontSize(31 * unit) | ||
| 3891 | + var pri0 = th.data.data.shop_price; | ||
| 3892 | + if (th.data.prom_act) | ||
| 3893 | + pri0 = th.data.prom_act.price; | ||
| 3894 | + pri0 = parseFloat(pri0).toFixed(2); | ||
| 3895 | + context.fillText(pri0, 438 * unit, 185 * unit); | ||
| 3896 | + //---市场价划掉--- | ||
| 3897 | + context.setFillStyle("gray") | ||
| 3898 | + context.setFontSize(22 * unit) | ||
| 3899 | + context.fillText("¥" + th.data.data.market_price, 426 * unit, 213 * unit); | ||
| 3900 | + context.setStrokeStyle('gray'); | ||
| 3901 | + context.setLineWidth(1 * unit); | ||
| 3902 | + context.moveTo(426 * unit, 206 * unit); | ||
| 3903 | + context.lineTo(510 * unit, 206 * unit); | ||
| 3904 | + context.stroke(); | ||
| 3905 | + | ||
| 3906 | + }else{ | ||
| 3907 | + context.setFillStyle("black"); | ||
| 3908 | + context.setFontSize(21.3 * unit) | ||
| 3909 | + th.draw_Text(context, th.data.data.goods_name, | ||
| 3910 | + 38 * unit, 170 * unit, 20 * unit, 300*unit, unit); | ||
| 3911 | + //------ 产品的价格 ----- | ||
| 3912 | + var pri0 = th.data.prom_act.addmoney; | ||
| 3913 | + var integral=th.data.prom_act.integral; | ||
| 3914 | + var text= ""; | ||
| 3915 | + if(integral){text=integral+"积分"; } | ||
| 3916 | + if(pri0 && integral){ text+="+";} | ||
| 3917 | + if(pri0){ text+="¥"+pri0;} | ||
| 3918 | + | ||
| 3919 | + if(!pri0 && !integral){ text="0积分";} | ||
| 3920 | + context.setFillStyle("red"); | ||
| 3921 | + context.fillText(text, 38 * unit, 235 * unit); | ||
| 3922 | + | ||
| 3923 | + } | ||
| 3924 | + | ||
| 3925 | + //---中间大图--- | ||
| 3926 | + context.drawImage(th.data.share_goods_img, 70 * unit, 250 * unit, 408 * unit, 408 * unit); | ||
| 3927 | + //-------大图后面就不一样了----------- | ||
| 3928 | + switch (type) { | ||
| 3929 | + case 0: //普通商品的展示 | ||
| 3930 | + case 4: | ||
| 3931 | + //中间的几个字 | ||
| 3932 | + if(th.data.poster && parseInt(th.data.poster.style)==2 ){ | ||
| 3933 | + if(parseInt(th.data.poster.show_quality)){ | ||
| 3934 | + var g_path = "../../../images/share/s_gou.png"; | ||
| 3935 | + context.drawImage(g_path, 56 * unit, 670 * unit, 22 * unit, 22 * unit); | ||
| 3936 | + context.setFillStyle("red") | ||
| 3937 | + context.setFontSize(18 * unit) | ||
| 3938 | + context.fillText("正品保证", 84 * unit, 690 * unit); | ||
| 3939 | + | ||
| 3940 | + context.drawImage(g_path, 218 * unit, 670 * unit, 22 * unit, 22 * unit); | ||
| 3941 | + context.setFillStyle("red") | ||
| 3942 | + context.setFontSize(18 * unit) | ||
| 3943 | + context.fillText("纯实体店", 246 * unit, 690 * unit); | ||
| 3944 | + | ||
| 3945 | + context.drawImage(g_path, 388 * unit, 670 * unit, 22 * unit, 22 * unit); | ||
| 3946 | + context.setFillStyle("red") | ||
| 3947 | + context.setFontSize(18 * unit) | ||
| 3948 | + context.fillText("官方验证", 420 * unit, 690 * unit); | ||
| 3949 | + } | ||
| 3950 | + | ||
| 3951 | + }else{ | ||
| 3952 | + var g_path = "../../../images/share/s_gou.png"; | ||
| 3953 | + context.drawImage(g_path, 56 * unit, 670 * unit, 22 * unit, 22 * unit); | ||
| 3954 | + context.setFillStyle("red") | ||
| 3955 | + context.setFontSize(18 * unit) | ||
| 3956 | + context.fillText("正品保证", 84 * unit, 690 * unit); | ||
| 3957 | + | ||
| 3958 | + context.drawImage(g_path, 218 * unit, 670 * unit, 22 * unit, 22 * unit); | ||
| 3959 | + context.setFillStyle("red") | ||
| 3960 | + context.setFontSize(18 * unit) | ||
| 3961 | + context.fillText("纯实体店", 246 * unit, 690 * unit); | ||
| 3962 | + | ||
| 3963 | + context.drawImage(g_path, 388 * unit, 670 * unit, 22 * unit, 22 * unit); | ||
| 3964 | + context.setFillStyle("red") | ||
| 3965 | + context.setFontSize(18 * unit) | ||
| 3966 | + context.fillText("官方验证", 420 * unit, 690 * unit); | ||
| 3967 | + } | ||
| 3968 | + | ||
| 3969 | + | ||
| 3970 | + //---画线--- | ||
| 3971 | + context.setLineWidth(1 * unit) | ||
| 3972 | + context.moveTo(32 * unit, 710 * unit) | ||
| 3973 | + context.lineTo(520 * unit, 710 * unit) | ||
| 3974 | + context.stroke(); | ||
| 3975 | + | ||
| 3976 | + //---文字--- | ||
| 3977 | + context.setFillStyle("black") | ||
| 3978 | + context.setFontSize(22 * unit) | ||
| 3979 | + | ||
| 3980 | + if(type==0){ | ||
| 3981 | + // 原来start ---> | ||
| 3982 | + context.setFontSize(24 * unit) | ||
| 3983 | + context.fillText(th.data.sto_sele_name_1, 40 * unit, 766 * unit); | ||
| 3984 | + | ||
| 3985 | + context.setFontSize(22 * unit) | ||
| 3986 | + context.fillText("优惠乐翻天,精彩就在你身边", 40 * unit, 806 * unit); | ||
| 3987 | + context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 846 * unit); | ||
| 3988 | + | ||
| 3989 | + }else{ | ||
| 3990 | + context.setFontSize(24 * unit) | ||
| 3991 | + context.fillText(th.data.sto_sele_name_1, 40 * unit, 766 * unit); | ||
| 3992 | + context.setFontSize(22 * unit) | ||
| 3993 | + context.fillText("长按识别二维码", 40 * unit, 806 * unit); | ||
| 3994 | + context.fillText("立即开始兑换", 40 * unit, 846 * unit); | ||
| 3995 | + | ||
| 3996 | + | ||
| 3997 | + } | ||
| 3998 | + | ||
| 3999 | + //---二维吗图--- | ||
| 4000 | + //-- 自定义海报 -- | ||
| 4001 | + if(th.data.poster){ | ||
| 4002 | + var erm_x= parseFloat(th.data.poster.ewm_x)*2; | ||
| 4003 | + var erm_y= parseFloat(th.data.poster.ewm_y)*2; | ||
| 4004 | + context.drawImage(vpath, erm_x * unit, erm_y * unit, 120 * unit, 120 * unit); | ||
| 4005 | + }else{ | ||
| 4006 | + //---二维吗图--- | ||
| 4007 | + context.drawImage(vpath, 410 * unit, 726 * unit, 115 * unit, 125 * unit); | ||
| 4008 | + } | ||
| 4009 | + | ||
| 4010 | + break; | ||
| 4011 | + case 1: //秒杀商品的展示 | ||
| 4012 | + //---画线--- | ||
| 4013 | + context.setLineWidth(1 * unit) | ||
| 4014 | + context.moveTo(32 * unit, 670 * unit) | ||
| 4015 | + context.lineTo(520 * unit, 670 * unit) | ||
| 4016 | + context.stroke(); | ||
| 4017 | + | ||
| 4018 | + //画秒杀的图片 | ||
| 4019 | + var miaos_path = '../../../images/share/miao_share.png'; | ||
| 4020 | + context.drawImage(miaos_path, 43 * unit, 700 * unit, 222 * unit, 40 * unit); | ||
| 4021 | + | ||
| 4022 | + context.setFillStyle("black") | ||
| 4023 | + context.setFontSize(24 * unit) | ||
| 4024 | + context.fillText(th.data.sto_sele_name_1, 40 * unit, 786 * unit); | ||
| 4025 | + //---文字--- | ||
| 4026 | + context.setFontSize(22 * unit) | ||
| 4027 | + context.setFillStyle("black") | ||
| 4028 | + context.fillText("特惠好物,限时秒杀", 40 * unit, 826 * unit); | ||
| 4029 | + context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 866 * unit); | ||
| 4030 | + | ||
| 4031 | + | ||
| 4032 | + //---二维吗图--- | ||
| 4033 | + //-- 自定义海报 -- | ||
| 4034 | + if(th.data.poster){ | ||
| 4035 | + var erm_x= parseFloat(th.data.poster.ewm_x)*2; | ||
| 4036 | + var erm_y= parseFloat(th.data.poster.ewm_y)*2; | ||
| 4037 | + context.drawImage(vpath, erm_x * unit, erm_y * unit, 120 * unit, 120 * unit); | ||
| 4038 | + }else{ | ||
| 4039 | + //---二维吗图--- | ||
| 4040 | + context.drawImage(vpath, 420 * unit, 726 * unit, 120 * unit, 120 * unit); | ||
| 4041 | + } | ||
| 4042 | + break; | ||
| 4043 | + | ||
| 4044 | + case 2: //会员团和商家团的展示 | ||
| 4045 | + //---画线--- | ||
| 4046 | + context.setLineWidth(1 * unit) | ||
| 4047 | + context.moveTo(32 * unit, 670 * unit) | ||
| 4048 | + context.lineTo(520 * unit, 670 * unit) | ||
| 4049 | + context.stroke(); | ||
| 4050 | + //---文字--- | ||
| 4051 | + | ||
| 4052 | + context.setFillStyle("black") | ||
| 4053 | + context.setFontSize(24 * unit) | ||
| 4054 | + context.fillText(th.data.sto_sele_name_1, 40 * unit, 720 * unit); | ||
| 4055 | + | ||
| 4056 | + //绘制成团图片 | ||
| 4057 | + var ct_img = "../../../images/share/ct_num.png"; | ||
| 4058 | + context.drawImage(ct_img, 40 * unit, 740 * unit, 120 * unit, 30 * unit); | ||
| 4059 | + var ct_num = th.data.prom_act.ct_num; | ||
| 4060 | + context.setFontSize(14 * unit) | ||
| 4061 | + context.font = 'normal'; | ||
| 4062 | + context.setFillStyle("red") | ||
| 4063 | + if (ct_num < 10) { | ||
| 4064 | + context.fillText(ct_num + "人拼团", 92 * unit, 760 * unit); | ||
| 4065 | + } else { | ||
| 4066 | + context.fillText(ct_num + "人拼团", 86 * unit, 760 * unit); | ||
| 4067 | + } | ||
| 4068 | + context.setFontSize(22 * unit) | ||
| 4069 | + context.fillText("已拼" + th.data.prom_act.buy_num + "份", 166 * unit, 763 * unit); | ||
| 4070 | + | ||
| 4071 | + context.setFillStyle("gray") | ||
| 4072 | + context.fillText("快来和我一起拼团吧!", 40 * unit, 806 * unit); | ||
| 4073 | + context.setFillStyle("black") | ||
| 4074 | + context.font = 'normal bold 18px sans-serif'; | ||
| 4075 | + context.setFontSize(21.3 * unit) | ||
| 4076 | + context.fillText("长按识别二维码,立即参团", 40 * unit, 836 * unit); | ||
| 4077 | + | ||
| 4078 | + | ||
| 4079 | + //---二维吗图--- | ||
| 4080 | + //-- 自定义海报 -- | ||
| 4081 | + if(th.data.poster){ | ||
| 4082 | + var erm_x= parseFloat(th.data.poster.ewm_x)*2; | ||
| 4083 | + var erm_y= parseFloat(th.data.poster.ewm_y)*2; | ||
| 4084 | + context.drawImage(vpath, erm_x * unit, erm_y * unit, 120 * unit, 120 * unit); | ||
| 4085 | + }else{ | ||
| 4086 | + //---二维吗图--- | ||
| 4087 | + context.drawImage(vpath, 420 * unit, 726 * unit, 120 * unit, 120 * unit); | ||
| 4088 | + } | ||
| 4089 | + break | ||
| 4090 | + case 3: //阶梯团的展示 | ||
| 4091 | + //---画线--- | ||
| 4092 | + context.setLineWidth(1 * unit) | ||
| 4093 | + context.moveTo(32 * unit, 670 * unit) | ||
| 4094 | + context.lineTo(520 * unit, 670 * unit) | ||
| 4095 | + context.stroke(); | ||
| 4096 | + //---文字--- | ||
| 4097 | + | ||
| 4098 | + context.setFillStyle("black") | ||
| 4099 | + context.setFontSize(24 * unit) | ||
| 4100 | + context.fillText(th.data.sto_sele_name_1, 40 * unit, 720 * unit); | ||
| 4101 | + | ||
| 4102 | + //---绘制中间阶梯的价格--- | ||
| 4103 | + var list = th.data.prom_act.ct_rylist; | ||
| 4104 | + for (var i = 0; i < list.length; i++) { | ||
| 4105 | + var item = list[i]; | ||
| 4106 | + var wi = i * 90 * unit; | ||
| 4107 | + context.font = 'normal'; | ||
| 4108 | + context.setFontSize(16 * unit) | ||
| 4109 | + context.setFillStyle("red") | ||
| 4110 | + context.fillText("¥", 40 * unit + wi, 756 * unit); | ||
| 4111 | + context.setFontSize(22 * unit) | ||
| 4112 | + var pri = parseFloat(item.price).toFixed(2); | ||
| 4113 | + context.fillText(pri, 56 * unit + wi, 756 * unit); | ||
| 4114 | + context.setFillStyle("gray") | ||
| 4115 | + context.fillText("满" + item.rynum + "人", 40 * unit + wi, 786 * unit); | ||
| 4116 | + } | ||
| 4117 | + //----------------下面部分---------------- | ||
| 4118 | + // context.setFillStyle("gray") | ||
| 4119 | + // context.fillText("快来和我一起拼团吧!", 40 * unit, 830 * unit); | ||
| 4120 | + // context.setFillStyle("black") | ||
| 4121 | + // context.font = 'normal bold 18px sans-serif'; | ||
| 4122 | + // context.setFontSize(22 * unit) | ||
| 4123 | + // context.fillText("长按识别二维码,立即参团", 40 * unit, 860 * unit); | ||
| 4124 | + //context.setFillStyle("gray") | ||
| 4125 | + context.setFillStyle("black") | ||
| 4126 | + context.fillText("快来和我一起拼团吧!", 40 * unit, 820 * unit); | ||
| 4127 | + //context.font = 'normal bold 18px sans-serif'; | ||
| 4128 | + context.setFontSize(22 * unit) | ||
| 4129 | + context.fillText("长按识别二维码,立即参团", 40 * unit, 850 * unit); | ||
| 4130 | + | ||
| 4131 | + | ||
| 4132 | + //-- 自定义海报 -- | ||
| 4133 | + if(th.data.poster){ | ||
| 4134 | + var erm_x= parseFloat(th.data.poster.ewm_x)*2; | ||
| 4135 | + var erm_y= parseFloat(th.data.poster.ewm_y)*2; | ||
| 4136 | + context.drawImage(vpath, erm_x * unit, erm_y * unit, 120 * unit, 120 * unit); | ||
| 4137 | + }else{ | ||
| 4138 | + //---二维吗图--- | ||
| 4139 | + context.drawImage(vpath, 420 * unit, 726 * unit, 120 * unit, 120 * unit); | ||
| 4140 | + } | ||
| 4141 | + break | ||
| 4142 | + | ||
| 4143 | + | ||
| 4144 | + } | ||
| 4145 | + | ||
| 4146 | + | ||
| 4147 | + //--- 如果是自定义海报的时候 --- | ||
| 4148 | + if(th.data.poster && parseInt(th.data.poster.style)==2){ | ||
| 4149 | + | ||
| 4150 | + //如果显示会员信息的话 | ||
| 4151 | + if(parseInt(th.data.poster.show_headpic)){ | ||
| 4152 | + //获取坐标 | ||
| 4153 | + var x= parseFloat(th.data.poster.head_x)*2; | ||
| 4154 | + var y=parseFloat(th.data.poster.head_y)*2; | ||
| 4155 | + //---绘制圆形要放在最后---- | ||
| 4156 | + context.save(); | ||
| 4157 | + context.beginPath(); | ||
| 4158 | + var h_x = x* unit; | ||
| 4159 | + var h_y = y * unit; | ||
| 4160 | + var h_r = 40 * unit; | ||
| 4161 | + var cx = h_x + h_r; | ||
| 4162 | + var cy = h_y + h_r; | ||
| 4163 | + context.arc(cx, cy, h_r, 0, Math.PI * 2, false); | ||
| 4164 | + context.closePath(); | ||
| 4165 | + context.fill(); | ||
| 4166 | + context.clip(); | ||
| 4167 | + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2); | ||
| 4168 | + context.restore(); | ||
| 4169 | + } | ||
| 4170 | + | ||
| 4171 | + }else{ | ||
| 4172 | + //---绘制圆形要放在最后---- | ||
| 4173 | + context.save(); | ||
| 4174 | + context.beginPath(); | ||
| 4175 | + var h_x = 60 * unit; | ||
| 4176 | + var h_y = 24 * unit; | ||
| 4177 | + var h_r = 40 * unit; | ||
| 4178 | + var cx = h_x + h_r; | ||
| 4179 | + var cy = h_y + h_r; | ||
| 4180 | + context.arc(cx, cy, h_r, 0, Math.PI * 2, false); | ||
| 4181 | + context.closePath(); | ||
| 4182 | + context.fill(); | ||
| 4183 | + context.clip(); | ||
| 4184 | + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2); | ||
| 4185 | + context.restore(); | ||
| 4186 | + } | ||
| 4187 | + | ||
| 4188 | + | ||
| 4189 | + //把画板内容绘制成图片,并回调 画板图片路径 | ||
| 4190 | + context.draw(false, function() { | ||
| 4191 | + setTimeout(function() { | ||
| 4192 | + wx.canvasToTempFilePath({ | ||
| 4193 | + x: 0, | ||
| 4194 | + y: 0, | ||
| 4195 | + width: 750, | ||
| 4196 | + height: 1217, | ||
| 4197 | + destWidth: 1.2 * 750 * 750 / that.data.screenWidth, | ||
| 4198 | + destHeight: 1.2 * 1217 * 750 / that.data.screenWidth, | ||
| 4199 | + canvasId: 'share', | ||
| 4200 | + success: function(res) { | ||
| 4201 | + that.setData({ | ||
| 4202 | + shareImgPath: res.tempFilePath, | ||
| 4203 | + canvasHidden: true | ||
| 4204 | + }) | ||
| 4205 | + if (!res.tempFilePath) { | ||
| 4206 | + wx.showModal({ | ||
| 4207 | + title: '提示', | ||
| 4208 | + content: '图片绘制中,请稍后重试', | ||
| 4209 | + showCancel: false | ||
| 4210 | + }) | ||
| 4211 | + return false; | ||
| 4212 | + } | ||
| 4213 | + // wx.previewImage({ | ||
| 4214 | + // //将图片预览出来 | ||
| 4215 | + // urls: [that.data.shareImgPath] | ||
| 4216 | + // }); | ||
| 4217 | + that.setData({ | ||
| 4218 | + showPoster: true, | ||
| 4219 | + }); | ||
| 4220 | + wx.hideLoading(); | ||
| 4221 | + } | ||
| 4222 | + }) | ||
| 4223 | + }, 500) | ||
| 4224 | + | ||
| 4225 | + }); | ||
| 4226 | + }); | ||
| 4227 | + } | ||
| 4228 | + }); | ||
| 4229 | + }, | ||
| 4230 | + | ||
| 4231 | + | ||
| 4232 | + //文本换行 参数:1、canvas对象,2、文本 3、距离左侧的距离 4、距离顶部的距离 5、6、文本的宽度 | ||
| 4233 | + draw_Text: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, unit) { | ||
| 4234 | + var lineWidth = 0; | ||
| 4235 | + var lastSubStrIndex = 0; //每次开始截取的字符串的索引 | ||
| 4236 | + var han = 0; | ||
| 4237 | + for (let i = 0; i < str.length; i++) { | ||
| 4238 | + if (han == 2) return; | ||
| 4239 | + //lineWidth += ctx.measureText(str[i]).width; | ||
| 4240 | + lineWidth += ut.measureText(str[i], 21.3 * unit); | ||
| 4241 | + if (lineWidth > canvasWidth) { | ||
| 4242 | + han++; | ||
| 4243 | + | ||
| 4244 | + if (han == 2) | ||
| 4245 | + ctx.fillText(str.substring(lastSubStrIndex, i) + '...', leftWidth, initHeight); //绘制截取部分 | ||
| 4246 | + else | ||
| 4247 | + ctx.fillText(str.substring(lastSubStrIndex, i), leftWidth, initHeight); | ||
| 4248 | + | ||
| 4249 | + initHeight += 22; //22为字体的高度 | ||
| 4250 | + lineWidth = 0; | ||
| 4251 | + lastSubStrIndex = i; | ||
| 4252 | + titleHeight += 20; | ||
| 4253 | + } | ||
| 4254 | + if (i == str.length - 1) { //绘制剩余部分 | ||
| 4255 | + ctx.fillText(str.substring(lastSubStrIndex, i + 1), leftWidth, initHeight); | ||
| 4256 | + } | ||
| 4257 | + } | ||
| 4258 | + }, | ||
| 4259 | + | ||
| 4260 | + // ----视频图片---- | ||
| 4261 | + // 图片计数器 | ||
| 4262 | + swiperChange: function(e) { | ||
| 4263 | + var that = this; | ||
| 4264 | + if (e.detail.current > 0) { | ||
| 4265 | + that.setData({ | ||
| 4266 | + hiddenn: 1, | ||
| 4267 | + videopicture: 1, | ||
| 4268 | + }) | ||
| 4269 | + } else { | ||
| 4270 | + that.setData({ | ||
| 4271 | + hiddenn: 0, | ||
| 4272 | + videopicture: 0, | ||
| 4273 | + }) | ||
| 4274 | + } | ||
| 4275 | + if (e.detail.source == 'touch') { | ||
| 4276 | + that.setData({ | ||
| 4277 | + current: e.detail.current | ||
| 4278 | + }) | ||
| 4279 | + } | ||
| 4280 | + }, | ||
| 4281 | + | ||
| 4282 | + /*---视频相关--*/ | ||
| 4283 | + videopicture: function(e) { | ||
| 4284 | + var vipi = e.currentTarget.dataset.vipi; | ||
| 4285 | + this.setData({ | ||
| 4286 | + videopicture: vipi, | ||
| 4287 | + swiperCurrent: vipi, | ||
| 4288 | + noon: 0, | ||
| 4289 | + current: 1 | ||
| 4290 | + }); | ||
| 4291 | + }, | ||
| 4292 | + | ||
| 4293 | + videoPlay: function(e) { | ||
| 4294 | + var _index = e.currentTarget.id | ||
| 4295 | + this.setData({ | ||
| 4296 | + _index: _index, | ||
| 4297 | + noon: 1 | ||
| 4298 | + }) | ||
| 4299 | + | ||
| 4300 | + setTimeout(function() { | ||
| 4301 | + //将点击视频进行播放 | ||
| 4302 | + var videoContext = wx.createVideoContext(_index) | ||
| 4303 | + videoContext.play(); | ||
| 4304 | + }, 500) | ||
| 4305 | + }, | ||
| 4306 | + | ||
| 4307 | + | ||
| 4308 | + | ||
| 4309 | + //--获取头像的本地缓存,回调写法-- | ||
| 4310 | + get_head_temp: function(tt, func) { | ||
| 4311 | + var ee = this; | ||
| 4312 | + if (ee.data.share_head) { | ||
| 4313 | + tt(func); | ||
| 4314 | + return false; | ||
| 4315 | + } | ||
| 4316 | + //---获取分享图片的本地地址,头像和商品图片---- | ||
| 4317 | + var path2 = getApp().globalData.userInfo.head_pic; | ||
| 4318 | + if (path2 == "") { | ||
| 4319 | + ee.data.share_head = "../../../images/share/hui_hear_pic.png"; | ||
| 4320 | + tt(func); | ||
| 4321 | + } else { | ||
| 4322 | + path2 = path2.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn"); | ||
| 4323 | + path2 = path2.replace("https://thirdwx.qlogo.cn", "https://wx.qlogo.cn"); | ||
| 4324 | + wx.getImageInfo({ | ||
| 4325 | + src: path2, | ||
| 4326 | + success: function(res) { | ||
| 4327 | + //res.path是网络图片的本地地址 | ||
| 4328 | + ee.data.share_head = res.path; | ||
| 4329 | + tt(func); | ||
| 4330 | + }, | ||
| 4331 | + fail: function(res) { | ||
| 4332 | + ee.data.share_head = "../../../images/share/hui_hear_pic.png"; //分享的图片不能用网络的 | ||
| 4333 | + tt(func); | ||
| 4334 | + } | ||
| 4335 | + }); | ||
| 4336 | + } | ||
| 4337 | + }, | ||
| 4338 | + //--获取商品图片的本地缓存,回调写法-- | ||
| 4339 | + get_goods_temp: function(tt) { | ||
| 4340 | + var ee = this; | ||
| 4341 | + if (ee.data.share_goods_img) { | ||
| 4342 | + tt(); | ||
| 4343 | + return false; | ||
| 4344 | + } | ||
| 4345 | + //获取商品是分享图信息 | ||
| 4346 | + wx.getImageInfo({ | ||
| 4347 | + src: ee.data.data.original_img, | ||
| 4348 | + success: function(res) { | ||
| 4349 | + //res.path是网络图片的本地地址 | ||
| 4350 | + ee.data.share_goods_img = res.path; | ||
| 4351 | + tt(); | ||
| 4352 | + }, | ||
| 4353 | + fail: function(res) { | ||
| 4354 | + | ||
| 4355 | + ee.data.share_goods_img = "../../../images/share/default_g_img.gif"; //分享的图片不能用网络的 | ||
| 4356 | + tt(); | ||
| 4357 | + } | ||
| 4358 | + }); | ||
| 4359 | + }, | ||
| 4360 | + | ||
| 4361 | + //--外侧评价的点击效果--- | ||
| 4362 | + clik_evaluate: function(e) { | ||
| 4363 | + var val = e.currentTarget.dataset.val; | ||
| 4364 | + this.setData({ | ||
| 4365 | + activeCategoryId: 2, | ||
| 4366 | + activeCategoryId3: val, | ||
| 4367 | + comments: null | ||
| 4368 | + }); | ||
| 4369 | + this.requestComments_new(); | ||
| 4370 | + }, | ||
| 4371 | + | ||
| 4372 | + //--跳转到商品详情页面-- | ||
| 4373 | + go_goods: function(e) { | ||
| 4374 | + var gid = e.currentTarget.dataset.gid; | ||
| 4375 | + var url = "/pages/goods/goodsInfo/goodsInfo?goods_id=" + gid; | ||
| 4376 | + getApp().goto(url); | ||
| 4377 | + }, | ||
| 4378 | + | ||
| 4379 | + //--跳转到支付尾款界面-- | ||
| 4380 | + go_pay_wk: function() { | ||
| 4381 | + var url = "/pages/cart/cart_wk/cart_wk?order_id=" + this.data.wk_order_id; | ||
| 4382 | + getApp().goto(url); | ||
| 4383 | + }, | ||
| 4384 | + | ||
| 4385 | + pop_err_img: function(e) { | ||
| 4386 | + var txt = e.currentTarget.dataset.errorimg; | ||
| 4387 | + var ob = {}; | ||
| 4388 | + ob[txt] = this.data.iurl + "/miniapp/images/default_g_img.gif"; | ||
| 4389 | + this.setData(ob); | ||
| 4390 | + }, | ||
| 4391 | + | ||
| 4392 | + //--调用更新阶梯团的接口-- | ||
| 4393 | + update_jiti: function(id) { | ||
| 4394 | + var th = this; | ||
| 4395 | + //--更新阶梯团-- | ||
| 4396 | + getApp().request.put("/api/weshop/teamgroup/updateTeamOrder/" + os.stoid + "/" + id, { | ||
| 4397 | + success: function(ee) { | ||
| 4398 | + //--等于0是要去支付尾款,接口调用失败,就要去查看参团详情-- | ||
| 4399 | + if (ee.data.code == 0) { | ||
| 4400 | + th.setData({ | ||
| 4401 | + user_order_pt_state: 3, | ||
| 4402 | + }); | ||
| 4403 | + } else if (ee.data.code == -1) { | ||
| 4404 | + th.setData({ | ||
| 4405 | + user_order_pt_state: 2, | ||
| 4406 | + }); | ||
| 4407 | + } | ||
| 4408 | + } | ||
| 4409 | + }) | ||
| 4410 | + }, | ||
| 4411 | + // 选择门店 | ||
| 4412 | + choice_store: function(ee) { | ||
| 4413 | + var th = this; | ||
| 4414 | + var ind=ee.currentTarget.dataset.ind; | ||
| 4415 | + var bconfig = th.data.bconfig; | ||
| 4416 | + | ||
| 4417 | + if(!th.data.only_pk && !th.data.def_pickpu_list){ | ||
| 4418 | + getApp().confirmBox("门店库存不足", null, 25000, !1); | ||
| 4419 | + return false; | ||
| 4420 | + } | ||
| 4421 | + | ||
| 4422 | + if(th.data.only_pk && !th.data.only_pk.length){ | ||
| 4423 | + getApp().confirmBox("门店库存不足", null, 25000, !1); | ||
| 4424 | + return false; | ||
| 4425 | + } | ||
| 4426 | + if(th.data.def_pickpu_list && !th.data.def_pickpu_list.length){ | ||
| 4427 | + getApp().confirmBox("门店库存不足", null, 25000, !1); | ||
| 4428 | + return false; | ||
| 4429 | + } | ||
| 4430 | + | ||
| 4431 | + | ||
| 4432 | + if (bconfig && bconfig.is_sort_storage) { | ||
| 4433 | + wx.getLocation({ | ||
| 4434 | + type: 'gcj02', | ||
| 4435 | + success: function(res) { | ||
| 4436 | + | ||
| 4437 | + th.data.lat = res.latitude; | ||
| 4438 | + th.data.lon = res.longitude; | ||
| 4439 | + th.data.is_get_local_ok = 1; | ||
| 4440 | + th.setData({ | ||
| 4441 | + is_gps: 1 | ||
| 4442 | + }); | ||
| 4443 | + //th.onShow(); | ||
| 4444 | + th.get_sto(th.data.is_normal); | ||
| 4445 | + }, | ||
| 4446 | + fail: function(res) { | ||
| 4447 | + //th.onShow(); | ||
| 4448 | + th.data.is_get_local_ok = 1; | ||
| 4449 | + th.get_sto(th.data.is_normal); | ||
| 4450 | + if (res.errCode == 2) { | ||
| 4451 | + th.setData({ | ||
| 4452 | + is_gps: 0 | ||
| 4453 | + }); | ||
| 4454 | + if (th.data.is_gps == 0) { | ||
| 4455 | + getApp().confirmBox("请开启GPS定位", null, 25000, !1); | ||
| 4456 | + } | ||
| 4457 | + } else { | ||
| 4458 | + th.setData({ | ||
| 4459 | + is_gps: "3" | ||
| 4460 | + }); | ||
| 4461 | + } | ||
| 4462 | + | ||
| 4463 | + } | ||
| 4464 | + }) | ||
| 4465 | + }else{ | ||
| 4466 | + th.data.is_get_local_ok = 1; | ||
| 4467 | + th.get_sto(th.data.is_normal); | ||
| 4468 | + } | ||
| 4469 | + | ||
| 4470 | + if(ind!=undefined && ind!=null ){ | ||
| 4471 | + this.setData({ | ||
| 4472 | + open_ind_store: ind, | ||
| 4473 | + store: 1, | ||
| 4474 | + openSpecModal: !1, | ||
| 4475 | + openSpecModal_pt: !1 | ||
| 4476 | + }) | ||
| 4477 | + }else{ | ||
| 4478 | + this.setData({ | ||
| 4479 | + store: 1, | ||
| 4480 | + openSpecModal: !1, | ||
| 4481 | + openSpecModal_pt: !1 | ||
| 4482 | + }) | ||
| 4483 | + } | ||
| 4484 | + }, | ||
| 4485 | + //关闭选择门店 | ||
| 4486 | + close_popup: function(e) { | ||
| 4487 | + var th=this; | ||
| 4488 | + this.setData({ | ||
| 4489 | + store: 0, | ||
| 4490 | + choice_sort_store: 0, | ||
| 4491 | + sort_store: 0, | ||
| 4492 | + fir_pick_index:0, | ||
| 4493 | + sec_pick_index:0 | ||
| 4494 | + }) | ||
| 4495 | + | ||
| 4496 | + var openindstore=this.data.open_ind_store; | ||
| 4497 | + if (openindstore == 1) { | ||
| 4498 | + th.setData({ | ||
| 4499 | + openSpecModal: !0, | ||
| 4500 | + openSpecModal_ind: openindstore, | ||
| 4501 | + }); | ||
| 4502 | + } else if (openindstore == 2) { | ||
| 4503 | + th.setData({ | ||
| 4504 | + openSpecModal: !0, | ||
| 4505 | + openSpecModal_ind: openindstore, | ||
| 4506 | + }); | ||
| 4507 | + } | ||
| 4508 | + else if (openindstore == 4) { //4就是拼团 | ||
| 4509 | + th.setData({ | ||
| 4510 | + openSpecModal_pt: 1, //打开拼团购买界面 | ||
| 4511 | + store: 0, //关闭门店 | ||
| 4512 | + choice_sort_store: 0, //关闭门店2级 | ||
| 4513 | + sort_store: 0, //关闭门店2级 | ||
| 4514 | + }); | ||
| 4515 | + } | ||
| 4516 | + else { | ||
| 4517 | + th.setData({ | ||
| 4518 | + store: 0, | ||
| 4519 | + choice_sort_store: 0, | ||
| 4520 | + sort_store: 0 | ||
| 4521 | + }) | ||
| 4522 | + } | ||
| 4523 | + | ||
| 4524 | + | ||
| 4525 | + }, | ||
| 4526 | + | ||
| 4527 | + //选择更多门店 | ||
| 4528 | + more_store: function() { | ||
| 4529 | + this.setData({ | ||
| 4530 | + sort_store: 1 | ||
| 4531 | + }); | ||
| 4532 | + }, | ||
| 4533 | + sort_store: function() { | ||
| 4534 | + | ||
| 4535 | + }, | ||
| 4536 | + // 返回按钮 | ||
| 4537 | + returns: function() { | ||
| 4538 | + this.setData({ | ||
| 4539 | + sort_store: 0, | ||
| 4540 | + choice_sort_store: 0 | ||
| 4541 | + }); | ||
| 4542 | + }, | ||
| 4543 | + //---选择分类门店--- | ||
| 4544 | + choice_sort_store: function(e) { | ||
| 4545 | + var index = e.currentTarget.dataset.index; | ||
| 4546 | + var region_name = e.currentTarget.dataset.region; | ||
| 4547 | + var item = this.data.all_sto[index]; | ||
| 4548 | + this.setData({ | ||
| 4549 | + region_name: region_name, | ||
| 4550 | + sort_store: 0, | ||
| 4551 | + choice_sort_store: 1, | ||
| 4552 | + sec_sto: item, | ||
| 4553 | + sec_pick_index: 0 | ||
| 4554 | + }); | ||
| 4555 | + }, | ||
| 4556 | + | ||
| 4557 | + choose_for_store_fir: function(e) { | ||
| 4558 | + var index_c = e.currentTarget.dataset.ind; | ||
| 4559 | + var th=this; | ||
| 4560 | + th.setData({ | ||
| 4561 | + fir_pick_index: index_c | ||
| 4562 | + }) | ||
| 4563 | + | ||
| 4564 | + }, | ||
| 4565 | + | ||
| 4566 | + //如果开启线下库存,已经急速库存才会使用 | ||
| 4567 | + async check_the_pick(item,func){ | ||
| 4568 | + var th=this; | ||
| 4569 | + var goodsinfo=th.data.sele_g; | ||
| 4570 | + var erpwareid=goodsinfo.erpwareid; | ||
| 4571 | + var plist=null; | ||
| 4572 | + var lock=0; | ||
| 4573 | + | ||
| 4574 | + //---如果是活动的时候,同时不是普通购买--- | ||
| 4575 | + if((th.data.prom_type==1 || th.data.prom_type==6 || th.data.prom_type==4) && !th.data.is_normal ) { | ||
| 4576 | + func(); return false; | ||
| 4577 | + } | ||
| 4578 | + | ||
| 4579 | + if(this.data.sales_rules!=2){ | ||
| 4580 | + func(); | ||
| 4581 | + }else{ | ||
| 4582 | + | ||
| 4583 | + //先读取门店的lock | ||
| 4584 | + await getApp().request.promiseGet("/api/weshop/order/ware/lock/page",{ | ||
| 4585 | + data:{store_id:os.stoid,wareId:goodsinfo.goods_id,storageId:item.pickup_id,pageSize:1000} | ||
| 4586 | + }).then(res=>{ | ||
| 4587 | + if(res.data.code==0 && res.data.data.total>0){ | ||
| 4588 | + for(var i in res.data.data.pageData ) | ||
| 4589 | + lock+=res.data.data.pageData[i].outQty; | ||
| 4590 | + } | ||
| 4591 | + }) | ||
| 4592 | + //读取线下的门店库存 | ||
| 4593 | + await getApp().request.promiseGet("/api/weshop/goods/getWareStorages",{ | ||
| 4594 | + data:{storageNos:item.pickup_no,wareIds:encodeURIComponent(erpwareid),storeId:os.stoid} | ||
| 4595 | + }).then(res=>{ | ||
| 4596 | + if(res.data.code==0 && res.data.data.total>0){ | ||
| 4597 | + plist=res.data.data.pageData[0]; | ||
| 4598 | + } | ||
| 4599 | + }) | ||
| 4600 | + | ||
| 4601 | + if(plist && plist.CanOutQty-lock>0){ | ||
| 4602 | + item.CanOutQty=plist.CanOutQty-lock; | ||
| 4603 | + func(); | ||
| 4604 | + return false; | ||
| 4605 | + } | ||
| 4606 | + getApp().my_warnning(item.pickup_name+"库存不足!", 0, th); | ||
| 4607 | + | ||
| 4608 | + } | ||
| 4609 | + }, | ||
| 4610 | + | ||
| 4611 | + | ||
| 4612 | + //确定def_pick为选择的门店 | ||
| 4613 | + sure_pick: function(e) { | ||
| 4614 | + var th = this; | ||
| 4615 | + var item = null; | ||
| 4616 | + var openindstore = th.data.open_ind_store; | ||
| 4617 | + | ||
| 4618 | + if (th.data.choice_sort_store == 0) { | ||
| 4619 | + var index = th.data.fir_pick_index; | ||
| 4620 | + if (th.data.is_show_sto_cat == 1) { | ||
| 4621 | + item = th.data.def_pickpu_list[index]; | ||
| 4622 | + } else { | ||
| 4623 | + item = th.data.only_pk[index]; //当没有门店分类的时候 | ||
| 4624 | + } | ||
| 4625 | + | ||
| 4626 | + } else { | ||
| 4627 | + var index = th.data.sec_pick_index; | ||
| 4628 | + item = th.data.sec_sto.s_arr[index]; | ||
| 4629 | + } | ||
| 4630 | + | ||
| 4631 | + //判断门店的配送方式是不是匹配 | ||
| 4632 | + var g_distr_type = th.data.sele_g.distr_type; | ||
| 4633 | + if(item.distr_type!=0 && g_distr_type!=0 && item.distr_type!=g_distr_type){ | ||
| 4634 | + wx.showToast({ | ||
| 4635 | + title: "门店配送方式不匹配", | ||
| 4636 | + icon: 'none', | ||
| 4637 | + duration: 2000 | ||
| 4638 | + }); | ||
| 4639 | + return false; | ||
| 4640 | + } | ||
| 4641 | + | ||
| 4642 | + //--回调函数的用法-- | ||
| 4643 | + th.check_the_pick(item,function(){ | ||
| 4644 | + th.setData({ | ||
| 4645 | + def_pick_store: item, | ||
| 4646 | + sto_sele_name: item.pickup_name, | ||
| 4647 | + sto_sele_id: item.pickup_id, | ||
| 4648 | + sto_sele_distr: item.distr_type, | ||
| 4649 | + store: 0, | ||
| 4650 | + choice_sort_store: 0, | ||
| 4651 | + fir_pick_index: 0 | ||
| 4652 | + }); | ||
| 4653 | + | ||
| 4654 | + if (openindstore == 1) { | ||
| 4655 | + th.setData({ | ||
| 4656 | + openSpecModal: !0, | ||
| 4657 | + openSpecModal_ind: openindstore, | ||
| 4658 | + }); | ||
| 4659 | + } else if (openindstore == 2) { | ||
| 4660 | + th.setData({ | ||
| 4661 | + openSpecModal: !0, | ||
| 4662 | + openSpecModal_ind: openindstore, | ||
| 4663 | + }); | ||
| 4664 | + } | ||
| 4665 | + else if (openindstore == 4) { //4就是拼团 | ||
| 4666 | + th.setData({ | ||
| 4667 | + openSpecModal_pt: 1, //打开拼团购买界面 | ||
| 4668 | + store: 0, //关闭门店 | ||
| 4669 | + choice_sort_store: 0, //关闭门店2级 | ||
| 4670 | + sort_store: 0, //关闭门店2级 | ||
| 4671 | + }); | ||
| 4672 | + } | ||
| 4673 | + else { | ||
| 4674 | + th.setData({ | ||
| 4675 | + store: 0, | ||
| 4676 | + choice_sort_store: 0, | ||
| 4677 | + sort_store: 0 | ||
| 4678 | + }) | ||
| 4679 | + } | ||
| 4680 | + //如果商品没有其他活动,要取一下线下价格 | ||
| 4681 | + th.get_off_price(); | ||
| 4682 | + }) | ||
| 4683 | + }, | ||
| 4684 | + //---点击二级之后的选择--- | ||
| 4685 | + choose_for_store: function(e) { | ||
| 4686 | + var index_c = e.currentTarget.dataset.ind; | ||
| 4687 | + var th=this; | ||
| 4688 | + th.setData({ | ||
| 4689 | + sec_pick_index: index_c, | ||
| 4690 | + fir_pick_index: index_c | ||
| 4691 | + }) | ||
| 4692 | + | ||
| 4693 | + }, | ||
| 4694 | + //把选择的门店设置成默认的门店def_pick | ||
| 4695 | + set_def_pick: function(e) { | ||
| 4696 | + var th = this; | ||
| 4697 | + var item = null; | ||
| 4698 | + if (th.data.choice_sort_store == 0) { | ||
| 4699 | + var index = th.data.fir_pick_index; | ||
| 4700 | + if (th.data.is_show_sto_cat == 1) { | ||
| 4701 | + item = th.data.def_pickpu_list[index]; | ||
| 4702 | + } else { | ||
| 4703 | + item = th.data.only_pk[index]; //当没有门店分类的时候 | ||
| 4704 | + } | ||
| 4705 | + } else { | ||
| 4706 | + var index = th.data.sec_pick_index; | ||
| 4707 | + item = th.data.sec_sto.s_arr[index]; | ||
| 4708 | + } | ||
| 4709 | + | ||
| 4710 | + //判断门店的配送方式是不是匹配 | ||
| 4711 | + var g_distr_type = th.data.sele_g.distr_type; | ||
| 4712 | + if(item.distr_type!=0 && g_distr_type!=0 && item.distr_type!=g_distr_type){ | ||
| 4713 | + wx.showToast({ | ||
| 4714 | + title: "门店配送方式不匹配", | ||
| 4715 | + icon: 'none', | ||
| 4716 | + duration: 2000 | ||
| 4717 | + }); | ||
| 4718 | + return false; | ||
| 4719 | + } | ||
| 4720 | + | ||
| 4721 | + //先设置之前,要判断是不是有库存 | ||
| 4722 | + th.check_the_pick(item,function(){ | ||
| 4723 | + var store_id = o.stoid; | ||
| 4724 | + var user_id = getApp().globalData.user_id; | ||
| 4725 | + var def_pickup_id = item.pickup_id; | ||
| 4726 | + | ||
| 4727 | + getApp().request.put('/api/weshop/users/update', { | ||
| 4728 | + data: { | ||
| 4729 | + user_id:user_id, | ||
| 4730 | + def_pickup_id:def_pickup_id | ||
| 4731 | + }, | ||
| 4732 | + success: function(res) { | ||
| 4733 | + if (res.data.code == 0) { | ||
| 4734 | + if (th.data.choice_sort_store == 0) th.setData({ | ||
| 4735 | + fir_pick_index: 0 | ||
| 4736 | + }); | ||
| 4737 | + getApp().globalData.pk_store = item; | ||
| 4738 | + } else { | ||
| 4739 | + //s.showWarning("设置默认门店地址失败", null, 500, !1); | ||
| 4740 | + getApp().my_warnning("设置默认门店地址失败",0,th) | ||
| 4741 | + } | ||
| 4742 | + | ||
| 4743 | + } | ||
| 4744 | + }); | ||
| 4745 | + | ||
| 4746 | + th.setData({ | ||
| 4747 | + def_pick_store: item, | ||
| 4748 | + sto_sele_name: item.pickup_name, | ||
| 4749 | + sto_sele_id: item.pickup_id, | ||
| 4750 | + sto_sele_distr: item.distr_type, | ||
| 4751 | + store: 0, | ||
| 4752 | + choice_sort_store: 0 | ||
| 4753 | + }); | ||
| 4754 | + | ||
| 4755 | + var openindstore = th.data.open_ind_store; | ||
| 4756 | + if (openindstore == 1) { | ||
| 4757 | + th.setData({ | ||
| 4758 | + openSpecModal: !0, | ||
| 4759 | + openSpecModal_ind: openindstore, | ||
| 4760 | + store: 0, | ||
| 4761 | + choice_sort_store: 0, | ||
| 4762 | + sort_store: 0, | ||
| 4763 | + }); | ||
| 4764 | + } else if (openindstore == 2) { | ||
| 4765 | + th.setData({ | ||
| 4766 | + openSpecModal: !0, | ||
| 4767 | + openSpecModal_ind: openindstore, | ||
| 4768 | + store: 0, | ||
| 4769 | + choice_sort_store: 0, | ||
| 4770 | + sort_store: 0, | ||
| 4771 | + }); | ||
| 4772 | + } | ||
| 4773 | + else if (openindstore == 4) { //4就是拼团 | ||
| 4774 | + th.setData({ | ||
| 4775 | + openSpecModal_pt: 1, //打开拼团购买界面 | ||
| 4776 | + store: 0, //关闭门店 | ||
| 4777 | + choice_sort_store: 0, //关闭门店2级 | ||
| 4778 | + sort_store: 0, //关闭门店2级 | ||
| 4779 | + }); | ||
| 4780 | + } | ||
| 4781 | + | ||
| 4782 | + else { | ||
| 4783 | + th.setData({ | ||
| 4784 | + store: 0, | ||
| 4785 | + choice_sort_store: 0, | ||
| 4786 | + sort_store: 0, | ||
| 4787 | + }) | ||
| 4788 | + } | ||
| 4789 | + | ||
| 4790 | + //如果商品没有其他活动,要取一下线下价格 | ||
| 4791 | + th.get_off_price(); | ||
| 4792 | + | ||
| 4793 | + }) | ||
| 4794 | + }, | ||
| 4795 | + | ||
| 4796 | + wait_for_store_config: function() { | ||
| 4797 | + var th = this; | ||
| 4798 | + var t_time = setInterval(function() { | ||
| 4799 | + if (th.data.bconfig == null) false; | ||
| 4800 | + var e = th.data.bconfig; | ||
| 4801 | + if (e && e.is_sort_storage) { | ||
| 4802 | + wx.getLocation({ | ||
| 4803 | + type: 'gcj02', | ||
| 4804 | + success: function(res) { | ||
| 4805 | + th.data.lat = res.latitude; | ||
| 4806 | + th.data.lon = res.longitude; | ||
| 4807 | + th.data.is_get_local_ok = 1; | ||
| 4808 | + }, | ||
| 4809 | + fail: function(res) { | ||
| 4810 | + if (res.errCode == 2) { | ||
| 4811 | + th.setData({ | ||
| 4812 | + is_gps: 0 | ||
| 4813 | + }); | ||
| 4814 | + if (th.data.is_gps == 0) { | ||
| 4815 | + getApp().confirmBox("请开启GPS定位", null, 10000, !1); | ||
| 4816 | + } | ||
| 4817 | + | ||
| 4818 | + } else { | ||
| 4819 | + th.setData({ | ||
| 4820 | + is_gps: "3" | ||
| 4821 | + }); | ||
| 4822 | + } | ||
| 4823 | + | ||
| 4824 | + th.data.is_get_local_ok = 1; | ||
| 4825 | + } | ||
| 4826 | + }) | ||
| 4827 | + } else { | ||
| 4828 | + th.data.is_get_local_ok = 1; | ||
| 4829 | + } | ||
| 4830 | + clearInterval(t_time); | ||
| 4831 | + }, 500) | ||
| 4832 | + }, | ||
| 4833 | + //显示全部 | ||
| 4834 | + toggleHandler: function(e) { | ||
| 4835 | + var that = this, | ||
| 4836 | + index = e.currentTarget.dataset.index; | ||
| 4837 | + for (var i = 0; i < that.data.comments.length; i++) { | ||
| 4838 | + if (index == i) { | ||
| 4839 | + for (var i = 0; i < that.data.comments.length; i++) { | ||
| 4840 | + that.data.comments[index].auto = true; | ||
| 4841 | + that.data.comments[index].seeMore = false; | ||
| 4842 | + } | ||
| 4843 | + } | ||
| 4844 | + } | ||
| 4845 | + that.setData({ | ||
| 4846 | + comments: that.data.comments | ||
| 4847 | + }) | ||
| 4848 | + }, | ||
| 4849 | + | ||
| 4850 | + //收起更多 | ||
| 4851 | + toggleContent: function(e) { | ||
| 4852 | + var that = this, | ||
| 4853 | + index = e.currentTarget.dataset.index; | ||
| 4854 | + for (var i = 0; i < that.data.comments.length; i++) { | ||
| 4855 | + if (index == i) { | ||
| 4856 | + that.data.comments[index].auto = true; | ||
| 4857 | + that.data.comments[index].seeMore = true; | ||
| 4858 | + } | ||
| 4859 | + } | ||
| 4860 | + that.setData({ | ||
| 4861 | + comments: that.data.comments | ||
| 4862 | + }) | ||
| 4863 | + }, | ||
| 4864 | + | ||
| 4865 | + //--- 获取卡类列表 --- | ||
| 4866 | + getPlusCardType: function (func) { | ||
| 4867 | + var storid = os.stoid; | ||
| 4868 | + var th = this; | ||
| 4869 | + var user=getApp().globalData.userInfo; | ||
| 4870 | + if(!user) return false; | ||
| 4871 | + getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => { | ||
| 4872 | + var plusCard = res.data.data; | ||
| 4873 | + var arr = [1219, 2089, 3031]; | ||
| 4874 | + var new_arr = new Array(); | ||
| 4875 | + var card_name_map=new Map(); | ||
| 4876 | + for (var i = 0; i < plusCard.length; i++) { | ||
| 4877 | + if((user.card_field==null || user.card_field=="") && plusCard[i].IsStopBuy==true) continue; | ||
| 4878 | + var name="card"+plusCard[i].CorrPrice.toLowerCase(); | ||
| 4879 | + card_name_map.set(name,plusCard[i].CardName); | ||
| 4880 | + } | ||
| 4881 | + | ||
| 4882 | + var ob={"card_list":plusCard,"name_map":card_name_map}; | ||
| 4883 | + func(ob); | ||
| 4884 | + }) | ||
| 4885 | + }, | ||
| 4886 | + | ||
| 4887 | + go_plus:function(){ | ||
| 4888 | + getApp().goto("/pages/user/plus/plus"); | ||
| 4889 | + }, | ||
| 4890 | + go_card_info:function(){ | ||
| 4891 | + getApp().goto("/pages/user/cardinfo/cardinfo"); | ||
| 4892 | + }, | ||
| 4893 | + //-- 根据ID拿出门店 -- | ||
| 4894 | + get_pick_from_list(pid){ | ||
| 4895 | + var all_pick_list=this.data.all_pick_list; | ||
| 4896 | + for(var i in all_pick_list){ | ||
| 4897 | + var item=all_pick_list[i]; | ||
| 4898 | + if(item.pickup_id==pid){ | ||
| 4899 | + return item; | ||
| 4900 | + } | ||
| 4901 | + } | ||
| 4902 | + }, | ||
| 4903 | + //-----显示优惠券的时候情况----- | ||
| 4904 | + show_more_cx:function () { | ||
| 4905 | + if(this.data.is_more_cx){ | ||
| 4906 | + this.setData({is_more_cx:0}); | ||
| 4907 | + }else{ | ||
| 4908 | + this.setData({is_more_cx:1}); | ||
| 4909 | + } | ||
| 4910 | + }, | ||
| 4911 | + | ||
| 4912 | + //----跳转到搭配购买---- | ||
| 4913 | + go_prom_list:function () { | ||
| 4914 | + | ||
| 4915 | + var url= "../../../packageA/pages/prom_list/prom_list?goods_id="+this.data.gid; | ||
| 4916 | + var room_id= getApp().globalData.room_id; | ||
| 4917 | + if(room_id && this.data.gid==getApp().globalData.room_goods_id){ | ||
| 4918 | + url+="&room_id="+room_id; | ||
| 4919 | + } | ||
| 4920 | + wx.navigateTo({ url: url,}) | ||
| 4921 | + }, | ||
| 4922 | + | ||
| 4923 | + //---检查有没有优惠活动--- | ||
| 4924 | + check_is_youhui:function(gid){ | ||
| 4925 | + var th=this; | ||
| 4926 | + //调用接口判断订单优惠, | ||
| 4927 | + getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid+"/"+gid+"/0", {}).then(res => { | ||
| 4928 | + if(res.data.code==0){ | ||
| 4929 | + var r_data=res.data.data; | ||
| 4930 | + var max=0,min=0; | ||
| 4931 | + if(r_data.collocationList){ | ||
| 4932 | + for(var i in r_data.collocationList){ | ||
| 4933 | + if(max==0) max=r_data.collocationList[i].price; | ||
| 4934 | + if(min==0) min=r_data.collocationList[i].price; | ||
| 4935 | + | ||
| 4936 | + if(max<parseFloat(r_data.collocationList[i].price)) max=r_data.collocationList[i].price; | ||
| 4937 | + if(min>parseFloat(r_data.collocationList[i].price)) min=r_data.collocationList[i].price; | ||
| 4938 | + } | ||
| 4939 | + r_data.collocationPromList.max=(max+th.data.data.shop_price).toFixed(2); | ||
| 4940 | + r_data.collocationPromList.min=(min+th.data.data.shop_price).toFixed(2); | ||
| 4941 | + } | ||
| 4942 | + th.setData({ | ||
| 4943 | + order_prom:r_data.promOrder, | ||
| 4944 | + collocationGoods:r_data.collocationPromList, | ||
| 4945 | + prom_goods:r_data.promGoodsLists, | ||
| 4946 | + }) | ||
| 4947 | + | ||
| 4948 | + th.is_show_more_buy(); | ||
| 4949 | + } | ||
| 4950 | + }) | ||
| 4951 | + }, | ||
| 4952 | + | ||
| 4953 | + closePoster() { | ||
| 4954 | + this.setData({ | ||
| 4955 | + showPoster: false, | ||
| 4956 | + }); | ||
| 4957 | + }, | ||
| 4958 | + | ||
| 4959 | + // 保存图片到手机 | ||
| 4960 | + savePic() { | ||
| 4961 | + console.log('保存图片'); | ||
| 4962 | + var self = this; | ||
| 4963 | + // 获取用户的当前设置,返回值中有小程序已经向用户请求过的权限 | ||
| 4964 | + this.getSetting().then((res) => { | ||
| 4965 | + // 判断用户是否授权了保存到相册的权限,如果没有发起授权 | ||
| 4966 | + if (!res.authSetting['scope.writePhotosAlbum']) { | ||
| 4967 | + this.authorize().then(() => { | ||
| 4968 | + // 同意授权后保存下载文件 | ||
| 4969 | + this.saveImage(self.data.shareImgPath) | ||
| 4970 | + .then(() => { | ||
| 4971 | + self.setData({ | ||
| 4972 | + showPoster: false | ||
| 4973 | + }); | ||
| 4974 | + }); | ||
| 4975 | + }) | ||
| 4976 | + } else { | ||
| 4977 | + // 如果已经授权,保存下载文件 | ||
| 4978 | + this.saveImage(self.data.shareImgPath) | ||
| 4979 | + .then(() => { | ||
| 4980 | + self.setData({ | ||
| 4981 | + showPoster: false | ||
| 4982 | + }); | ||
| 4983 | + }); | ||
| 4984 | + } | ||
| 4985 | + | ||
| 4986 | + }) | ||
| 4987 | + }, | ||
| 4988 | + | ||
| 4989 | + // 获取用户已经授予了哪些权限 | ||
| 4990 | + getSetting() { | ||
| 4991 | + return new Promise((resolve, reject) => { | ||
| 4992 | + wx.getSetting({ | ||
| 4993 | + success: res => { | ||
| 4994 | + resolve(res) | ||
| 4995 | + } | ||
| 4996 | + }) | ||
| 4997 | + }) | ||
| 4998 | + }, | ||
| 4999 | + | ||
| 5000 | + // 发起首次授权请求 | ||
| 5001 | + authorize() { | ||
| 5002 | + // isFirst 用来记录是否为首次发起授权, | ||
| 5003 | + // 如果首次授权拒绝后,isFirst赋值为1 | ||
| 5004 | + let isFirst = wx.getStorageSync('isFirst') || 0; | ||
| 5005 | + return new Promise((resolve, reject) => { | ||
| 5006 | + wx.authorize({ | ||
| 5007 | + scope: 'scope.writePhotosAlbum', | ||
| 5008 | + // 同意授权 | ||
| 5009 | + success: () => { | ||
| 5010 | + resolve(); | ||
| 5011 | + }, | ||
| 5012 | + // 拒绝授权,这里是用户拒绝授权后的回调 | ||
| 5013 | + fail: res => { | ||
| 5014 | + if(isFirst === 0) { | ||
| 5015 | + wx.setStorageSync('isFirst', 1); | ||
| 5016 | + wx.showToast({ | ||
| 5017 | + title: '保存失败', | ||
| 5018 | + icon: 'none', | ||
| 5019 | + duration: 1000 | ||
| 5020 | + }) | ||
| 5021 | + } else { | ||
| 5022 | + this.showModal(); | ||
| 5023 | + } | ||
| 5024 | + console.log('拒绝授权'); | ||
| 5025 | + reject(); | ||
| 5026 | + } | ||
| 5027 | + }) | ||
| 5028 | + }) | ||
| 5029 | + }, | ||
| 5030 | + | ||
| 5031 | + | ||
| 5032 | + // 保存图片到系统相册 | ||
| 5033 | + saveImage(saveUrl) { | ||
| 5034 | + var self = this; | ||
| 5035 | + return new Promise((resolve, reject) => { | ||
| 5036 | + wx.saveImageToPhotosAlbum({ | ||
| 5037 | + filePath: saveUrl, | ||
| 5038 | + success: (res) => { | ||
| 5039 | + wx.showToast({ | ||
| 5040 | + title: '保存成功', | ||
| 5041 | + duration: 1000, | ||
| 5042 | + }); | ||
| 5043 | + self.setData({ | ||
| 5044 | + showPlaybill: 'true' | ||
| 5045 | + }); | ||
| 5046 | + resolve(); | ||
| 5047 | + }, | ||
| 5048 | + fail: () => { | ||
| 5049 | + wx.showToast({ | ||
| 5050 | + title: '保存失败', | ||
| 5051 | + duration: 1000, | ||
| 5052 | + }); | ||
| 5053 | + } | ||
| 5054 | + }) | ||
| 5055 | + }) | ||
| 5056 | + }, | ||
| 5057 | + | ||
| 5058 | + previewImage() { | ||
| 5059 | + wx.previewImage({ | ||
| 5060 | + //将图片预览出来 | ||
| 5061 | + urls: [this.data.shareImgPath] | ||
| 5062 | + }); | ||
| 5063 | + }, | ||
| 5064 | + | ||
| 5065 | + is_show_more_buy:function(){ | ||
| 5066 | + var prom_goods=this.data.prom_goods; | ||
| 5067 | + var per_price=this.data.sele_g.shop_price | ||
| 5068 | + if(this.data.card_field && this.data.sele_g[this.data.card_field]>0){ | ||
| 5069 | + per_price=this.data.sele_g[this.data.card_field]; | ||
| 5070 | + } | ||
| 5071 | + var all_price=per_price*this.data.goodsInputNum; | ||
| 5072 | + var con=null; | ||
| 5073 | + for(var i in prom_goods){ | ||
| 5074 | + var item=prom_goods[i]; | ||
| 5075 | + if(item.prom_type==1){ | ||
| 5076 | + if(item.condition>this.data.goodsInputNum) { | ||
| 5077 | + con=item; | ||
| 5078 | + con.need=(item.condition-this.data.goodsInputNum)+"件"; | ||
| 5079 | + break; | ||
| 5080 | + } | ||
| 5081 | + }else{ | ||
| 5082 | + if(item.condition>all_price){ | ||
| 5083 | + con=item; | ||
| 5084 | + con.need=(item.condition-all_price)+"元"; | ||
| 5085 | + break; | ||
| 5086 | + } | ||
| 5087 | + } | ||
| 5088 | + } | ||
| 5089 | + | ||
| 5090 | + this.setData({hui_condition:con}); | ||
| 5091 | + | ||
| 5092 | + }, | ||
| 5093 | + | ||
| 5094 | + //-- 积分购 -- | ||
| 5095 | + go_pay_integral:function(){ | ||
| 5096 | + this.get_sto(0) | ||
| 5097 | + this.setData({openSpecModal_inte:1}); | ||
| 5098 | + }, | ||
| 5099 | + //-- 积分购普通购买 -- | ||
| 5100 | + go_pay_integral_normal:function(){ | ||
| 5101 | + this.get_sto(1) | ||
| 5102 | + this.setData({openSpecModal_inte_normal:1}); | ||
| 5103 | + }, | ||
| 5104 | + | ||
| 5105 | + closeSpecModal_inte:function(){ | ||
| 5106 | + this.setData({openSpecModal_inte:0}); | ||
| 5107 | + } , | ||
| 5108 | + closeSpecModal_inte_normal:function(){ | ||
| 5109 | + this.setData({openSpecModal_inte_normal:0}); | ||
| 5110 | + }, | ||
| 5111 | + | ||
| 5112 | + addCart_inte:function(t){ | ||
| 5113 | + this.add_cart_func_inte(t); | ||
| 5114 | + }, | ||
| 5115 | + | ||
| 5116 | + | ||
| 5117 | + | ||
| 5118 | + | ||
| 5119 | + onShareTimeline() { | ||
| 5120 | + return { | ||
| 5121 | + title:this.data.data.goods_name + '-' + getApp().globalData.config.store_name, | ||
| 5122 | + imageUrl:this.data.gallery[0].image_url, | ||
| 5123 | + } | ||
| 5124 | + }, | ||
| 5125 | + | ||
| 5126 | + | ||
| 5127 | + | ||
| 5128 | +}); | ||
| 5129 | + | ||
| 5130 | + |
packageA/pages/goodsInfo/goodsInfo.json
0 → 100644
| 1 | +{ | ||
| 2 | + "navigationBarTitleText": "卡项详情", | ||
| 3 | + "enablePullDownRefresh": false, | ||
| 4 | + "usingComponents": { | ||
| 5 | + "nav_box": "/components/nav_box/nav_box", | ||
| 6 | + "warn": "/components/long_warn/long_warn", | ||
| 7 | + "goods_recommend": "/components/goods_list/goods_list" | ||
| 8 | + } | ||
| 9 | +} | ||
| 0 | \ No newline at end of file | 10 | \ No newline at end of file |
packageA/pages/goodsInfo/goodsInfo.wxml
0 → 100644
| 1 | +<import src="../../../utils/wxParse/wxParse.wxml"></import> | ||
| 2 | +<wxs module="filters" src="../../../utils/filter.wxs"></wxs> | ||
| 3 | +<wxs module="g_filters" src="g_filter.wxs"></wxs> | ||
| 4 | +<wxs module="tool" src="filter.wxs"></wxs> | ||
| 5 | + | ||
| 6 | +<!-- 商品内容区域,普通商品,秒杀,拼团 --> | ||
| 7 | +<!-- <block wx:if="{{isshow}}"> --> | ||
| 8 | +<block> | ||
| 9 | + <view class="container"> | ||
| 10 | + <!-- <view class="type-navbar"> | ||
| 11 | + <view class="type-box" wx:for="{{categories}}" wx:key="categories"> | ||
| 12 | + <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> | ||
| 13 | + {{item.name}} | ||
| 14 | + </view> | ||
| 15 | + </view> | ||
| 16 | + </view> --> | ||
| 17 | + | ||
| 18 | + <view class="goods-detail"> | ||
| 19 | + <view class="goods-info" hidden="{{activeCategoryId==0?false:true}}"> | ||
| 20 | + <!-- 视频 --> | ||
| 21 | + <!-- <swiper bindchange="swiperChange"class="xc-pictures swiperContainer rel" current="{{swiperCurrent}}" | ||
| 22 | + indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}"> --> | ||
| 23 | + <view id="id" bindtouchstart="handletouchtart" bindtouchmove="handletouchmove"> | ||
| 24 | + | ||
| 25 | + <view class="xc-videos-picture rel"> | ||
| 26 | + <swiper autoplay="{{false}}" current="{{swiperCurrent}}" class="swiper_box swiperContainer rel" duration="{{1000}}" indicatorDots="{{mapurl?false:true}}" interval="{{3000}}" vertical="{{false}}" bindchange="swiperChange"> | ||
| 27 | + <!-- <swiper-item> --> | ||
| 28 | + <!-- <swiper-item wx:if="{{mapurl}}"> --> | ||
| 29 | + <!-- <view wx:if="{{noon == 0}}"> | ||
| 30 | + <image class="xc-picturess" src="{{iurl+mapurl_f_img}}" mode="aspectFit"> | ||
| 31 | + <image id="{{index}}" class="xc-play" src="{{iurl}}/miniapp/images/pofang.png" bindtap="videoPlay"></image> | ||
| 32 | + </image> | ||
| 33 | + </view> | ||
| 34 | + <view wx:else> | ||
| 35 | + <video class="xc-videos" src="{{iurl+mapurl}}" id="{{index}}" wx:if="{{_index == index}}"> </video> | ||
| 36 | + </view> | ||
| 37 | + </swiper-item> --> | ||
| 38 | + | ||
| 39 | + <!-- <swiper-item wx:for="{{gallery}}" wx:key="gallery"> --> | ||
| 40 | + <swiper-item> | ||
| 41 | + <image class="wh100" src="{{iurl + data.image_url}}" mode="aspectFit" binderror="bind_bnerr" lazy-load="true" data-errorimg="gallery[{{index}}].image_url"></image> | ||
| 42 | + </swiper-item> | ||
| 43 | + </swiper> | ||
| 44 | + <!-- <block wx:if="{{mapurl}}"> | ||
| 45 | + <view wx:if="{{hiddenn==1}}"> | ||
| 46 | + <view class="xc-imageCount">{{current}}/{{gallery.length}}</view> | ||
| 47 | + </view> | ||
| 48 | + <view class="xc-video-picture abs"> | ||
| 49 | + <view class="xc-video" data-vipi="0" bindtap="videopicture"> | ||
| 50 | + <view class="{{videopicture==0 ? 'xc-video-button':'xc-video-buttons'}} {{videopicture==0 ? 'xc-sn':''}}"> | ||
| 51 | + 视频 | ||
| 52 | + </view> | ||
| 53 | + </view> | ||
| 54 | + <view class="xc-picture {{videopicture==1 ? 'xc-sn':''}}" data-vipi="1" bindtap="videopicture"> | ||
| 55 | + <view> | ||
| 56 | + 图片 | ||
| 57 | + </view> | ||
| 58 | + </view> | ||
| 59 | + </view> | ||
| 60 | + </block> --> | ||
| 61 | + </view> | ||
| 62 | + </view> | ||
| 63 | + | ||
| 64 | + | ||
| 65 | + <!----显示秒杀价,团购,积分购----> | ||
| 66 | + <!-- <view class="prom_show rel" wx:if="{{prom_type==1}}"> | ||
| 67 | + | ||
| 68 | + <image class="secondkill-img" src='{{prom_st==1? iurl+"/miniapp/images/red_jx.png":iurl+"/miniapp/images/blue_ks.png"}}'></image> | ||
| 69 | + <image class="abs spike-img" src="{{iurl}}/miniapp/images/xsmiaosha.png"></image> | ||
| 70 | + | ||
| 71 | + <view class="stop fs26 abs" wx:if="{{prom_st==1}}">距活动结束还有</view> | ||
| 72 | + <view class="start fs26 abs" wx:if="{{prom_st==2}}">距活动开始还有</view> | ||
| 73 | + <view class="secview flex abs fs24 xc-miaosha-time"> | ||
| 74 | + <block wx:if="djs.day"> | ||
| 75 | + <view class='day-val' style="color:{{prom_st==1?'#d40022':'#0097e0'}}">{{djs.day}}</view> | ||
| 76 | + <view class="day white" style="color: {{prom_st==1?'#d40022':'#0097e0'}}">天</view> | ||
| 77 | + </block> | ||
| 78 | + <view class='time-val white t-c' style=" background:{{prom_st==1?'#d40022':'#0097e0'}}">{{djs.hou}}</view> | ||
| 79 | + <view class="time" style="color: {{prom_st==1?'#d40022':'#0097e0'}}">时</view> | ||
| 80 | + <view class='time-val white t-c' style=" background:{{prom_st==1?'#d40022':'#0097e0'}}">{{djs.min}}</view> | ||
| 81 | + <view class="time" style="color: {{prom_st==1?'#d40022':'#0097e0'}}"> 分</view> | ||
| 82 | + <view class='time-val white t-c' style=";background:{{prom_st==1?'#d40022':'#0097e0'}}">{{djs.sec}}</view> | ||
| 83 | + <view class="time" style="color: {{prom_st==1?'#d40022':'#0097e0'}}">秒</view> | ||
| 84 | + </view> | ||
| 85 | + </view> --> | ||
| 86 | + | ||
| 87 | + <!----拼单----> | ||
| 88 | + <!-- <view class="pt_show " wx:if="{{prom_type==6}}"> | ||
| 89 | + <view class="pt_view rel"> --> | ||
| 90 | + <!--许程 7. 24 --> | ||
| 91 | + <!-- <image class="secondkill-img" src="{{prom_st==1? iurl+'/miniapp/images/red_jx.png':iurl+'/miniapp/images/blue_ks.png'}}"></image> | ||
| 92 | + <view class="abs xc-qt-price"> | ||
| 93 | + <view class="flex" style='height:40rpx; margin-top:5rpx'> | ||
| 94 | + <view class="flex fs35 xc-qtsign">¥</view> | ||
| 95 | + <view class="fs50 val">{{prom_price}}</view> | ||
| 96 | + </view> | ||
| 97 | + <view class="word-line fs20 xc-qtunit-price">零售价¥{{data.market_price}}</view> | ||
| 98 | + </view> | ||
| 99 | + <view class="abs white xc-nanber"> | ||
| 100 | + <text class="fs22">已拼{{prom_act.buy_num}}件</text> | ||
| 101 | + <view class="flex" style='margin-top:-34rpx'> | ||
| 102 | + <view class="xc-people-img"> | ||
| 103 | + <image class="imgs" src="{{prom_st==1? iurl+'/miniapp/images/r_logo_red.png':iurl+'/miniapp/images/r_logo.png'}}"></image> | ||
| 104 | + </view> | ||
| 105 | + <view class="t-s fs20 xc-people-val"> | ||
| 106 | + {{prom_act.ct_num}}人拼 | ||
| 107 | + </view> | ||
| 108 | + </view> | ||
| 109 | + </view> | ||
| 110 | + <view class="hy-stop word-color fs26 abs" wx:if="{{prom_st==1}}">距活动结束还有</view> | ||
| 111 | + <view class="hy-stop word-color-lan fs26 abs" wx:if="{{prom_st==0}}">距活动开始还有</view> | ||
| 112 | + <view class="secview flex abs fs24 " style="color: black;right: 3px; top:46rpx;"> | ||
| 113 | + <block wx:if="djs.day"> | ||
| 114 | + <view class='day-val' style="color:{{prom_st==1?'#d40022':'#0097e0'}};margin-top:-34rpx;">{{djs.day}}</view> | ||
| 115 | + <view class="day white" style="margin-top:-34rpx;margin-right:10rpx;color: {{prom_st==1?'#d40022':'#0097e0'}}">天</view> | ||
| 116 | + </block> | ||
| 117 | + <view class='xc-time-val white t-c' style=" background:{{prom_st==1?'#d40022':'#0097e0'}}">{{djs.hou}}</view> | ||
| 118 | + <view class="xc-time" style="color: {{prom_st==1?'#d40022':'#0097e0'}}">时</view> | ||
| 119 | + <view class='xc-time-val white t-c' style=" background:{{prom_st==1?'#d40022':'#0097e0'}}">{{djs.min}}</view> | ||
| 120 | + <view class="xc-time" style="color: {{prom_st==1?'#d40022':'#0097e0'}}"> 分</view> | ||
| 121 | + <view class='xc-time-val white t-c' style=";background:{{prom_st==1?'#d40022':'#0097e0'}}">{{djs.sec}}</view> | ||
| 122 | + <view class="xc-time" style="color: {{prom_st==1?'#d40022':'#0097e0'}}">秒</view> | ||
| 123 | + </view> | ||
| 124 | + </view> | ||
| 125 | + | ||
| 126 | + <view class="pt_fir"> --> | ||
| 127 | + <!----显示团类型和团价格----> | ||
| 128 | + <!-- <view class="pt_fir_title "> --> | ||
| 129 | + <!-- 许程 商家团主页 --> | ||
| 130 | + <!-- <view class="xc-goods-explain flex-vertical-between"> | ||
| 131 | + <view class="xc-explain fs32 ellipsis-2" wx:if="{{prom_type!=0 }}"> | ||
| 132 | + {{data.goods_name}} | ||
| 133 | + </view> | ||
| 134 | + | ||
| 135 | + <view class="xc-share-frame-jieti flex" bindtap="saveImageToPhotosAlbum" style="top:0"> | ||
| 136 | + <image class="share-frame" src="{{iurl}}/miniapp/images/share.png"></image> | ||
| 137 | + <view class="share-font">分享</view> | ||
| 138 | + </view> | ||
| 139 | + </view> | ||
| 140 | + </view> --> | ||
| 141 | + | ||
| 142 | + <!----显示价格,阶梯团----> | ||
| 143 | + <!-- <block wx:if="{{prom_act.kttype==3}}"> | ||
| 144 | + <view class="jie_price flex"> | ||
| 145 | + <view style='margin-right:26rpx' wx:for="{{prom_act.ct_rylist}}"> | ||
| 146 | + <view class="fs35 word-color"> | ||
| 147 | + <text class="fs24">¥</text>{{item.price}}</view> | ||
| 148 | + <view class="fs24 t-c xc-person-number ">满{{item.rynum}}人</view> | ||
| 149 | + </view> | ||
| 150 | + </view> | ||
| 151 | + </block> | ||
| 152 | + </view> | ||
| 153 | + | ||
| 154 | + <view class="t_gz" wx:if="{{is_show_gz==1}}"> | ||
| 155 | + {{prom_act.remark}} | ||
| 156 | + </view> --> | ||
| 157 | + | ||
| 158 | + <!----------正有多少人在开团----------> | ||
| 159 | + <!-- <view class="pt_fir se2" wx:if="{{teamgroup}}"> | ||
| 160 | + <view class="xc-partner-frame"> | ||
| 161 | + <view class="zzk-1" bindtap="go_t_more">以下小伙伴正在拼单,可直接参与 | ||
| 162 | + <view class="ckgd flex">查看详细 | ||
| 163 | + <view class="bg_right arrow-one"></view> | ||
| 164 | + </view> | ||
| 165 | + </view> | ||
| 166 | + </view> | ||
| 167 | + <view class='group' wx:for="{{teamgroup}}" wx:for-index="t_ind" wx:key="teamgroup" style='padding-left:28rpx;'> | ||
| 168 | + <view class='group-list' bindtap="go_cj_team" data-ind="{{t_ind}}"> --> | ||
| 169 | + <!--//选项框头像--> | ||
| 170 | + <!-- <view class='gtou'> | ||
| 171 | + <image src='{{item.user.head_pic}}'></image> | ||
| 172 | + </view> --> | ||
| 173 | + <!--//等你来拼--> | ||
| 174 | + <!-- <view class='gdn ellipsis-1'>{{item.user.nickname}}</view> --> | ||
| 175 | + <!--//还差几人,剩余时间--> | ||
| 176 | + <!-- <view class="rel"> | ||
| 177 | + <view class='ghaicha ellipsis-2 abs'> | ||
| 178 | + <text class='gred' wx:if="{{prom_act.max_ct_num >0}}"><text class="flex" wx:if="{{prom_act.max_ct_num - item.open_num>0}}">还差<text class="word-color">{{prom_act.max_ct_num - item.open_num}}</text>人享最低优惠</text><text wx:else>您已经享最低优惠</text></text> | ||
| 179 | + <text class='gred' wx:else>还差<text style='color:#ff2753'>{{prom_act.ct_num - item.open_num}}</text>人成团 </text> | ||
| 180 | + <view class="t_show"> | ||
| 181 | + 剩余 | ||
| 182 | + <text wx:if="{{timer[t_ind].day}}">{{timer[t_ind].day}}天:</text> | ||
| 183 | + <text>{{timer[t_ind].hou}}</text>: | ||
| 184 | + <text>{{timer[t_ind].min}}</text>: | ||
| 185 | + <text>{{timer[t_ind].sec}}</text> | ||
| 186 | + </view> | ||
| 187 | + </view> | ||
| 188 | + </view> --> | ||
| 189 | + <!--//参加团--> | ||
| 190 | + <!-- <view class='cjt t-c'> | ||
| 191 | + 去参团 | ||
| 192 | + </view> | ||
| 193 | + <view class="clear"></view> | ||
| 194 | + </view> | ||
| 195 | + </view> | ||
| 196 | + </view> | ||
| 197 | + | ||
| 198 | + <view class="pt_fir se1"> | ||
| 199 | + <view class="pt_hb"> | ||
| 200 | + 拼团玩法 | ||
| 201 | + <view class="ptgz_an xq flex" bindtap="show_pt_xx">查看详细 | ||
| 202 | + <view class="bg_right arrow-two"></view> | ||
| 203 | + </view> | ||
| 204 | + </view> | ||
| 205 | + <view class="flex-level" style='height:198rpx; width:100%;'> | ||
| 206 | + <view class="flex-vertical-between rel" style='width:94%;margin-left:10rpx;'> --> | ||
| 207 | + <!-- 许程 7: 24 --> | ||
| 208 | + <!-- <view class="xc-item t-c"> | ||
| 209 | + <view class="circle yuan t-c circle-color">1</view> | ||
| 210 | + <view class="word">选择商品完成下单</view> | ||
| 211 | + </view> | ||
| 212 | + <view class="abs link {{color_type==0?'link-color-red':'link-color'}}"></view> | ||
| 213 | + | ||
| 214 | + <view class="xc-item t-c"> | ||
| 215 | + <view class="circle yuan t-c circle-color">2</view> | ||
| 216 | + <view class="word">支付开团或参团</view> | ||
| 217 | + </view> | ||
| 218 | + <view class="abs link1 {{color_type_one==0?'link-color-red':'link-color'}}"></view> | ||
| 219 | + | ||
| 220 | + <view class="xc-item t-c"> | ||
| 221 | + <view class="circle yuan t-c circle-color">3</view> | ||
| 222 | + <view class="word">邀请好友参团支付</view> | ||
| 223 | + </view> | ||
| 224 | + <view class="abs link2 {{color_type_two==0?'link-color-red':'link-color'}}"></view> | ||
| 225 | + | ||
| 226 | + | ||
| 227 | + <view class="xc-item t-c"> | ||
| 228 | + <view class="circle yuan t-c circle-color1">4</view> | ||
| 229 | + <view class="word">人满发货失败退款</view> | ||
| 230 | + </view> | ||
| 231 | + </view> | ||
| 232 | + </view> | ||
| 233 | + </view> | ||
| 234 | + </view> --> | ||
| 235 | + | ||
| 236 | + <!-- 积分购 --> | ||
| 237 | + <!-- <view wx:if="{{prom_type==4}}"> | ||
| 238 | + <view class="goods-price rel"> --> | ||
| 239 | + <!-- 价格显示 --> | ||
| 240 | + <!-- <view class="co-red" style="overflow: hidden" > | ||
| 241 | + <view class="market-price" style="overflow: hidden; height: 66rpx;"> | ||
| 242 | + <image class="rel_img" src="{{iurl}}/miniapp/images/integral/integral_red.png"></image> | ||
| 243 | + <block wx:if="{{prom_integral}}">{{prom_integral}} | ||
| 244 | + <text class="rel_txt">积分</text></block> | ||
| 245 | + <text class="rel_txt" wx:if="{{prom_integral && prom_price}}">+</text> | ||
| 246 | + <text class="rel_txt" wx:if="{{prom_price}}" >{{filters.toFix(prom_price,2)}}元</text> | ||
| 247 | + <text class="rel_txt" wx:if="{{!prom_integral && !prom_price}}">0积分</text> | ||
| 248 | + <text class="rel_txt" decode="{{true}}" space="{{true}}" style="color: #999; text-decoration: line-through;"> 零售价:¥{{data.market_price}}</text> | ||
| 249 | + </view> | ||
| 250 | + </view> --> | ||
| 251 | + | ||
| 252 | + <!-- 这个是分享按钮 --> | ||
| 253 | + <!-- <view class="xc-share-frame flex {{prom_type==1?'s_ms_bth':''}} " bindtap="saveImageToPhotosAlbum"> | ||
| 254 | + <image class="share-frame" src="{{iurl}}/miniapp/images/share.png"></image> | ||
| 255 | + <view class="share-font">分享</view> | ||
| 256 | + </view> | ||
| 257 | + | ||
| 258 | + <view class="goods-title"> | ||
| 259 | + <view class="goods-name elli">{{data.goods_name}}</view> | ||
| 260 | + </view> | ||
| 261 | + | ||
| 262 | + <view class="goods-num"> | ||
| 263 | + <view class="sales">销量:{{prom_act.buy_num}}件</view> --> | ||
| 264 | + <!-- <view class="stock">折扣:{{data.disc}}折</view> --> | ||
| 265 | + <!-- <view class="stock">折扣:{{g_filters.num((prom_price?prom_price:0)*100/data.shop_price)}}折</view> | ||
| 266 | + <view class="stock">{{categories3[0].num}}人评价</view> | ||
| 267 | + </view> | ||
| 268 | + </view> | ||
| 269 | + </view> --> | ||
| 270 | + | ||
| 271 | + <!-- 不是拼团,不是积分购 --> | ||
| 272 | + <block> | ||
| 273 | + <!-- <block wx:if="{{prom_type!=6 && prom_type!=4}}"> --> | ||
| 274 | + <view class="goods-price rel"> | ||
| 275 | + <view class="co-red" style="overflow: hidden" wx:if="{{prom_type==0 || prom_type==3}}"> | ||
| 276 | + <view class="market-price" style="overflow: hidden"> | ||
| 277 | + <!-- <block wx:if="{{card_field && data[card_field]>0}}"> | ||
| 278 | + <view class="flex ai-center grade-card-frame" style="margin-left:12rpx;"> | ||
| 279 | + <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> | ||
| 280 | + <view class="fs24 white view card-name ellipsis-1">{{card_name}}</view> | ||
| 281 | + </view> | ||
| 282 | + <text class="rel yuan">¥</text>{{filters.toFix(data[card_field],2)}} | ||
| 283 | + <view class='yj' style="top:35rpx"> | ||
| 284 | + <text>零售价:¥{{data.market_price}}</text> | ||
| 285 | + </view> | ||
| 286 | + </block> --> | ||
| 287 | + <!-- <block wx:else> | ||
| 288 | + <text class="rel yuan">¥</text>{{filters.toFix(data.shop_price,2)}} | ||
| 289 | + <view class='yj'><text>零售价:¥{{data.market_price}}</text></view> | ||
| 290 | + </block> --> | ||
| 291 | + </view> | ||
| 292 | + | ||
| 293 | + </view> | ||
| 294 | + | ||
| 295 | + <!-- 这个是分享按钮 --> | ||
| 296 | + <!-- <view class="xc-share-frame flex {{prom_type==1?'s_ms_bth':''}} " bindtap="saveImageToPhotosAlbum"> | ||
| 297 | + <image class="share-frame" src="{{iurl}}/miniapp/images/share.png"></image> | ||
| 298 | + <view class="share-font">分享</view> | ||
| 299 | + </view> --> | ||
| 300 | + | ||
| 301 | + <!-- 不是秒杀 --> | ||
| 302 | + <!-- 等级卡的价格,不是等级卡会员,且商品又有设置等级级价,商家后台有开通升级卡同能 --> | ||
| 303 | + <!-- <view class="flex ai_and" wx:if="{{!card_field && g_filters.is_has_rank(rank_switch,data) && prom_type!=1 }}"> | ||
| 304 | + | ||
| 305 | + <view class="flex ai-center grade-card-frame card-frame" > | ||
| 306 | + <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> | ||
| 307 | + <view class="fs24 white view card-name ellipsis-1">{{g_filters.get_card_price(data,card_list,1)}}</view> | ||
| 308 | + </view> | ||
| 309 | + <view class="fs32 xc-black3 ai_and carde_frame"> | ||
| 310 | + <text class="fs26"> | ||
| 311 | + ¥</text>{{g_filters.get_card_price(data,card_list,0)}} | ||
| 312 | + </view> | ||
| 313 | + </view> --> | ||
| 314 | + | ||
| 315 | + <!-- 等级卡的显示,购买, 等级卡近30天要显示续费--> | ||
| 316 | + | ||
| 317 | + <!-- <block wx:if="{{g_filters.is_has_rank(rank_switch,data)}}"> --> | ||
| 318 | + | ||
| 319 | + <!-- 不是秒杀,且会员不是等级会员 --> | ||
| 320 | + <!-- <view wx:if="{{!card_field && prom_type!=1 }}"> | ||
| 321 | + <view class="beauty-makeup-frame flex ai-center"> | ||
| 322 | + <view class="left flex ai-center"> | ||
| 323 | + <view class="flex ai-center grade-card-frame card-frame advert-card"> | ||
| 324 | + <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> | ||
| 325 | + <view class="fs24 white view card-name ellipsis-1">{{g_filters.get_card_price(data,card_list,1)}}</view> | ||
| 326 | + </view> | ||
| 327 | + <view class="card-effect"> | ||
| 328 | + <view class="fs24 xc-black3">成为{{g_filters.get_card_price(data,card_list,1)}}立<text class="co-red">省{{filters.toFix(data.shop_price-g_filters.get_card_price(data,card_list,0),2)}}</text>元</view> | ||
| 329 | + <view class="fs22 xc-ash"> 开通会员 尽享更多优惠 </view> | ||
| 330 | + </view> | ||
| 331 | + </view> | ||
| 332 | + <view class="right flex jc-center ai-center" bindtap="go_plus"> | ||
| 333 | + <view class="at_once_carde xc-black3 fs28">立即开卡</view> | ||
| 334 | + <view class="bg_right"></view> | ||
| 335 | + </view> | ||
| 336 | + | ||
| 337 | + </view> | ||
| 338 | + </view> --> | ||
| 339 | + <!-- 立即续费的显示 --> | ||
| 340 | + <!-- <view wx:elif="{{is_near_date && data[card_field]>0 && prom_type!=1}}"> | ||
| 341 | + <view class="beauty-makeup-frame flex ai-center"> | ||
| 342 | + <view class="left flex ai-center"> | ||
| 343 | + <view class="flex ai-center grade-card-frame card-frame advert-card"> | ||
| 344 | + <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> | ||
| 345 | + <view class="fs24 white view card-name ellipsis-1">{{card_name}}</view> | ||
| 346 | + </view> | ||
| 347 | + <view class="card-effect"> | ||
| 348 | + <view class="fs24 xc-black3">成为{{card_name}}立<text class="co-red">省{{filters.toFix(data.shop_price[card_field],2)}}</text>元</view> | ||
| 349 | + <view class="fs22 xc-ash"> 开通会员 尽享更多优惠 </view> | ||
| 350 | + </view> | ||
| 351 | + </view> | ||
| 352 | + <view class="right flex jc-center ai-center" bindtap="go_card_info"> | ||
| 353 | + <view class="at_once_carde xc-black3 fs28">立即续费</view> | ||
| 354 | + <view class="bg_right"></view> | ||
| 355 | + </view> | ||
| 356 | + | ||
| 357 | + </view> | ||
| 358 | + | ||
| 359 | + </view> --> | ||
| 360 | + | ||
| 361 | + <!-- </block> --> | ||
| 362 | + <!--许程商品名字--> | ||
| 363 | + | ||
| 364 | + <!-- <view wx:if="{{prom_type!=1}}"> --> | ||
| 365 | + <view> | ||
| 366 | + <view class="co-red"><text class="rel yuan">¥</text>{{filters.toFix(data.shop_price,2)}}</view> | ||
| 367 | + <view class="goods-title"> | ||
| 368 | + <view class="goods-name elli">{{data.goods_name}}</view> | ||
| 369 | + </view> | ||
| 370 | + </view> | ||
| 371 | + | ||
| 372 | + <view class="goods-num" wx:if="{{prom_type!=1}}"> | ||
| 373 | + <view class="sales">耗时:{{data.sales_sum}}</view> | ||
| 374 | + <view class="stock">次数:{{data.disc}}</view> | ||
| 375 | + <!-- <view class="stock">折扣:{{filters.pInt((prom_price?prom_price:0)*100/data.shop_price)}}折</view> --> | ||
| 376 | + <view class="stock">有效天数:{{data.validDays}}</view> | ||
| 377 | + <!-- <view class="stock">有效天数:1234{{categories3[0].num}}</view> --> | ||
| 378 | + </view> | ||
| 379 | + <!-- <view wx:if="{{prom_type==1}}"> | ||
| 380 | + <view class="flex"> | ||
| 381 | + <view> | ||
| 382 | + <view class="flex xc-price-frame"> | ||
| 383 | + <view class="flex fs45 sign">¥</view> | ||
| 384 | + <view class="fs60 val">{{prom_price}}</view> | ||
| 385 | + </view> | ||
| 386 | + <view class="word-line fs24 xc-unit-price">零售价¥{{data.market_price}}</view> | ||
| 387 | + </view> | ||
| 388 | + <view class="xc-val-price"> | ||
| 389 | + <view class="fs30" style='padding-left:13rpx;' wx:if="{{prom_st==1}}" >已抢:{{prom_act.buy_num+prom_act.virtual}}件</view> | ||
| 390 | + <view class="fs30" style='padding-left:13rpx;' wx:else >已抢:0件</view> | ||
| 391 | + <view class="fs30 save t-c">秒杀立省¥{{filters.toFix(data.market_price-prom_price,2)}}</view> | ||
| 392 | + </view> | ||
| 393 | + </view> | ||
| 394 | + </view> --> | ||
| 395 | + | ||
| 396 | + <!-- <view class="xc-explain fs32 ellipsis-2" wx:if="{{prom_type!=0 && prom_type!=4}}"> | ||
| 397 | + {{data.goods_name}} | ||
| 398 | + </view> --> | ||
| 399 | + | ||
| 400 | + <!-- <view wx:if="{{prom_type==1}}" style='height:58rpx'></view> --> | ||
| 401 | + <!-- 许程 7.24 暂时注释 --> | ||
| 402 | + <!-- <view wx:if="{{prom_type==1}}"> | ||
| 403 | + <view class="goods-num" wx:if="{{prom_type==1}}"> | ||
| 404 | + | ||
| 405 | + <block wx:if="prom_st>0" > | ||
| 406 | + <view class="stock">总数量:{{prom_act.goods_num+prom_act.virtual}}件</view> | ||
| 407 | + <view class="stock">限购:{{prom_act.buy_limit}}件</view> | ||
| 408 | + <block wx:if="{{prom_st==0}}"> | ||
| 409 | + <view class="sales">已购:0件</view> | ||
| 410 | + </block> | ||
| 411 | + <block wx:else> | ||
| 412 | + <view class="sales">已购:{{prom_act.buy_num+prom_act.virtual}}件</view> | ||
| 413 | + </block> | ||
| 414 | + </block> | ||
| 415 | + | ||
| 416 | + <block wx:else> | ||
| 417 | + <view class="stock">总数量:{{prom_act.goods_num}}件</view> | ||
| 418 | + <view class="stock">限购:{{prom_act.buy_limit}}件</view> | ||
| 419 | + <view class="sales">已购:{{prom_act.buy_num}}件</view> | ||
| 420 | + </block> | ||
| 421 | + | ||
| 422 | + </view> | ||
| 423 | + </view> --> | ||
| 424 | + | ||
| 425 | + </view> | ||
| 426 | + </block> | ||
| 427 | + | ||
| 428 | + <!-- 门店收货地址 --> | ||
| 429 | + <!-- <view class="xc-address_frame bdt16 flex-vertical xc-ash {{def_pick_store!=null?'sn_height':'on_height'}}" > | ||
| 430 | + <view class="address_frame" bindtap="choice_store" data-ind="0"> | ||
| 431 | + <view class="flex-vertical-between "> | ||
| 432 | + <view class="flex-vertical select_store_height"> | ||
| 433 | + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | ||
| 434 | + <view class="fs30" style="color:black;">选择门店</view> | ||
| 435 | + </view> | ||
| 436 | + <view class="red_bb fs30"> | ||
| 437 | + 更多门店 | ||
| 438 | + <text class="bg_jj"></text> | ||
| 439 | + </view> | ||
| 440 | + </view> | ||
| 441 | + | ||
| 442 | + <view wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | ||
| 443 | + <view class="flex-space-between address ai_end "> | ||
| 444 | + <view> | ||
| 445 | + <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | ||
| 446 | + </view> | ||
| 447 | + <view class="distance fs24"wx:if="{{def_pick_store.distance!=null}}"> | ||
| 448 | + 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | ||
| 449 | + | ||
| 450 | + </view> | ||
| 451 | + </view> | ||
| 452 | + | ||
| 453 | + | ||
| 454 | + <view class="no_store" wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> | ||
| 455 | + <block wx:else> | ||
| 456 | + <view class="no_store" wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view> | ||
| 457 | + <block wx:else> | ||
| 458 | + <view class="no_store" wx:if="{{def_pick_store && def_pick_store.is_no_dis}}">(配送不匹配)</view> | ||
| 459 | + <view class="no_store" wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules==2 && prom_type==0}}">(库存不足)</view> | ||
| 460 | + </block> | ||
| 461 | + </block> | ||
| 462 | + | ||
| 463 | + <view class="fs24 xc-ash-9f">地址:{{def_pick_store.fulladdress}}</view> | ||
| 464 | + </view> | ||
| 465 | + </view> | ||
| 466 | + | ||
| 467 | + </view> --> | ||
| 468 | + | ||
| 469 | + <!--许程 7.24暂时注释 --> | ||
| 470 | + <!-- <view class="bdt16" wx:if="{{prom_type!=1&&prom_act.kttype!=3&&prom_act.kttype!=2&&prom_act.kttype!=1 && is_closecoupon!=1}}"> | ||
| 471 | + <view class="cx-frame flex" style="position: relative" wx:if="{{fir_quan.length>0}}"> | ||
| 472 | + <view class="cx-sizs fs30">领券</view> | ||
| 473 | + <view class="xc-coupon-fram" wx:for="{{fir_quan}}" wx:key="{{index}}"> | ||
| 474 | + <view class="circle xc-circular xc-one"></view> | ||
| 475 | + <view class="xc-coupon t-c four-level-word">满{{item.condition}}减{{item.money}}</view> | ||
| 476 | + <view class="circle xc-circular xc-two"></view> | ||
| 477 | + </view> | ||
| 478 | + | ||
| 479 | + <view data-coupon="1" bindtap="switchCoupon" class="cx-obtain-coupon wsize"> | ||
| 480 | + <text class="bg_jj"></text> | ||
| 481 | + </view> | ||
| 482 | + </view> | ||
| 483 | + </view> --> | ||
| 484 | + | ||
| 485 | + <!-- 要判断是不是有促销活动 --> | ||
| 486 | + <!-- <block wx:if="{{prom_goods}}"> | ||
| 487 | + <view class="cx-frame flex" style="position: relative; height: auto" > | ||
| 488 | + <view class="cx-sizs wsize">促销</view> --> | ||
| 489 | + <!-- 中间显示层 --> | ||
| 490 | + <!-- <view style="margin-top: 36rpx"> | ||
| 491 | + <view class="cx_show_view flex fs28" wx:for="{{prom_goods}}"> | ||
| 492 | + <view class="prom_condition">消费满{{item.condition}}<text wx:if="{{item.prom_type==1}}">件</text><text wx:else>元</text></view> | ||
| 493 | + <view class="word {{is_more_cx?'':'ellipsis-1'}}"> | ||
| 494 | + <text wx:if="{{item.money>0}}">减价{{item.money}}元;</text> | ||
| 495 | + <text wx:if="{{item.sale>0}}">打{{item.sale}}折;</text> | ||
| 496 | + <text wx:if="{{item.past==1}}">包邮;</text> | ||
| 497 | + <text wx:if="{{item.intValue>0}}">送{{tem.intValue}}积分;</text> | ||
| 498 | + <text wx:if="{{item.couponId>0}}">送{{item.couponMoney}}元优惠券;</text> | ||
| 499 | + <text wx:if="{{item.gift_id>0}}">送商品{{item.goods_name}};</text> | ||
| 500 | + <text wx:if="{{item.lb_id>0}}">送{{item.lbtitle}};</text> | ||
| 501 | + </view> | ||
| 502 | + </view> | ||
| 503 | + | ||
| 504 | + </view> | ||
| 505 | + <view data-coupon="1" bindtap="show_more_cx" class="cx-obtain-coupon wsize"> | ||
| 506 | + <text class="bg_jj {{is_more_cx?'down1':''}}"></text> | ||
| 507 | + </view> | ||
| 508 | + </view> | ||
| 509 | + </block> --> | ||
| 510 | + | ||
| 511 | + <!-- 要判断是不是有订单优惠 --> | ||
| 512 | + <!-- <block wx:if="{{order_prom}}"> | ||
| 513 | + <view class="cx-frame flex" style="position: relative; height: auto" > | ||
| 514 | + <view class="cx-sizs wsize" style="width: 144rpx">订单优惠</view> --> | ||
| 515 | + <!-- 中间显示层 --> | ||
| 516 | + <!-- <view class="flex ai-center"> | ||
| 517 | + <image class="hui_img" src="{{iurl}}/miniapp//images/hui.png"></image> | ||
| 518 | + <view class="order_hui"> | ||
| 519 | + <view class="fs28 ellipsis-1">{{order_prom.name}}</view> | ||
| 520 | + <view class="fs26" >(活动时间:{{tool.format_tt(order_prom.start_time)}} - {{tool.format_tt(order_prom.end_time)}})</view> | ||
| 521 | + </view> | ||
| 522 | + </view> | ||
| 523 | + </view> | ||
| 524 | + </block> --> | ||
| 525 | + | ||
| 526 | + | ||
| 527 | + <!-- <view class="bz_view flex ai-center bdt16" wx:if="{{bconfig}}" style="line-height: 36rpx"> | ||
| 528 | + <image class="bzfu_img" src="{{iurl}}/miniapp/images/bzfu_w.png"></image> | ||
| 529 | + <view class="bz-content">{{bconfig.service_bz}}</view> | ||
| 530 | + </view> --> | ||
| 531 | + | ||
| 532 | + | ||
| 533 | + <!--- 搭配促销 ----> | ||
| 534 | + <!-- <view class="dp_cx_view" wx:if="{{collocationGoods}}"> | ||
| 535 | + <view class="bb_view"> | ||
| 536 | + <view>优惠热配</view> | ||
| 537 | + <view class="red_bb" bindtap="go_prom_list">查看全部 | ||
| 538 | + <text class="bg_jj"></text> | ||
| 539 | + </view> | ||
| 540 | + </view> --> | ||
| 541 | + | ||
| 542 | + <!-- 搭配的显示 --> | ||
| 543 | + <!-- <view class="flex" bindtap="go_prom_list"> | ||
| 544 | + <image class="dp_img" src="{{iurl+collocationGoods.img_url}}"></image> | ||
| 545 | + <view class="act_content"> | ||
| 546 | + <view class="fs32">{{collocationGoods.title}}</view> | ||
| 547 | + <view class="fs30 color_b" wx:if="{{collocationGoods.max!=collocationGoods.min}}">搭配价¥{{collocationGoods.min}}-{{collocationGoods.max}}</view> | ||
| 548 | + <view class="fs30 color_b" wx:else>搭配价¥{{collocationGoods.min}}</view> | ||
| 549 | + <view class="fs30 color-gray">活动至{{filters.format_time(collocationGoods.end_time,1)}}</view> | ||
| 550 | + </view> | ||
| 551 | + </view> --> | ||
| 552 | + <!-- </view> --> | ||
| 553 | + | ||
| 554 | + | ||
| 555 | + <!--- 宝贝评价 ----> | ||
| 556 | + <!-- <view class="bdt16" style="overflow: hidden"> | ||
| 557 | + <view class="bb_view"> | ||
| 558 | + <view>宝贝评价({{categories3[0].num}})</view> | ||
| 559 | + <view class="red_bb" bindtap="look_pj">查看全部 | ||
| 560 | + <text class="bg_jj"></text> | ||
| 561 | + </view> | ||
| 562 | + </view> | ||
| 563 | + | ||
| 564 | + <view class="xc_comment"> | ||
| 565 | + <view class="xc_comment-have-pictures" data-val="5" bindtap="clik_evaluate">有图({{categories3[1].num}}) </view> | ||
| 566 | + <view class="xc_comment-discuss" data-val="2" bindtap="clik_evaluate">好评({{categories3[2].num}}) </view> | ||
| 567 | + <view class="xc_comment-discuss" data-val="3" bindtap="clik_evaluate">中评({{categories3[3].num}}) </view> | ||
| 568 | + <view class="xc_comment-discuss" data-val="4"bindtap="clik_evaluate">差评({{categories3[4].num}}) </view> | ||
| 569 | + </view> | ||
| 570 | + | ||
| 571 | + <scroll-view scroll-x="true" class="pj_scroll"> | ||
| 572 | + | ||
| 573 | + <view class="xc_comment-detail" style="display: inline-block" wx:for="{{fir_comments}}" wx:key="fir_comments"> | ||
| 574 | + <view class="xc_comment-left"> | ||
| 575 | + <view class="xc_comment-user"> | ||
| 576 | + <view class="xc_user-img"> | ||
| 577 | + <image class="xc_imgs" src='{{item.is_anonymous!=1?item.head_pic:iurl+"/miniapp/images/hui_hear_pic.png"}}' binderror="bind_bnerr2" data-errorimg="fir_comments[{{index}}].head_pic"></image> | ||
| 578 | + </view> | ||
| 579 | + | ||
| 580 | + <view class="xc_user"> | ||
| 581 | + <view class="xc_user-name five-level-word">{{item.is_anonymous!=1?item.username:'匿名'}}</view> | ||
| 582 | + <image class="xc_comment-img" src="{{iurl}}/miniapp/images/star-red.png" wx:for="{{item.sum_rank}}" wx:key="{{index}}"></image> | ||
| 583 | + </view> | ||
| 584 | + </view> | ||
| 585 | + <view class="xc_comment-font pj_word_size ellipsis-2"> | ||
| 586 | + {{item.content?item.content:''}} | ||
| 587 | + </view> | ||
| 588 | + <view class="xc_comment-val"> | ||
| 589 | + <view class="xc_comment-time">{{item.add_time}}</view> | ||
| 590 | + | ||
| 591 | + </view> | ||
| 592 | + </view> | ||
| 593 | + <view class="xc_goods-img-frame"> | ||
| 594 | + <image wx:if="{{item.img[0]!=undefined && item.img[0]!=null}}" class="xc_goods-img" src='{{iurl+item.img[0]}}'></image> | ||
| 595 | + <image wx:elif="{{item.weapp_img[0]!=undefined && item.weapp_img[0]!=null}}" class="xc_goods-img" src='{{item.weapp_img[0]}}'></image> | ||
| 596 | + <image wx:else class="xc_goods-img" src='{{gallery[0].image_url}}'></image> | ||
| 597 | + </view> | ||
| 598 | + </view> | ||
| 599 | + | ||
| 600 | + </scroll-view> | ||
| 601 | + </view> --> | ||
| 602 | + | ||
| 603 | + <!-- 图文详情 --> | ||
| 604 | + <view> | ||
| 605 | + <view class="tuwen_title"> | ||
| 606 | + <view class="g_line"></view> | ||
| 607 | + <view class="center_s"> | ||
| 608 | + <image src="{{iurl}}/miniapp/images/tuwen_c.png"></image> | ||
| 609 | + <text>详情</text> | ||
| 610 | + </view> | ||
| 611 | + </view> | ||
| 612 | + <view>{{data.serviceContent}}</view> | ||
| 613 | + <!-- <view class="t_g_info"> | ||
| 614 | + <view class="red_shu"></view> | ||
| 615 | + <view class="fs30">商品信息</view> | ||
| 616 | + </view> --> | ||
| 617 | + <!-- <view class="table_s"> | ||
| 618 | + <view class="tb_item tb-l"> | ||
| 619 | + <view class="item_left"> | ||
| 620 | + <text>商品名称</text> | ||
| 621 | + </view> | ||
| 622 | + <view class="item_right"> | ||
| 623 | + <text>{{data.goods_name}}</text> | ||
| 624 | + </view> | ||
| 625 | + </view> | ||
| 626 | + <view class="tb_item tb-l"> | ||
| 627 | + <view class="item_left"> | ||
| 628 | + <text>商品编号</text> | ||
| 629 | + </view> | ||
| 630 | + <view class="item_right"> | ||
| 631 | + <text>{{data.goods_sn}}</text> | ||
| 632 | + </view> | ||
| 633 | + </view> | ||
| 634 | + <view class="tb_item tb-l"> | ||
| 635 | + <view class="item_left"> | ||
| 636 | + <text>商品条码</text> | ||
| 637 | + </view> | ||
| 638 | + <view class="item_right"> | ||
| 639 | + <text>{{data.sku}}</text> | ||
| 640 | + </view> | ||
| 641 | + </view> | ||
| 642 | + <view class="tb_item tb-l" wx:if="{{cat_name && is_show_pl}}"> | ||
| 643 | + <view class="item_left"> | ||
| 644 | + <text>品类</text> | ||
| 645 | + </view> | ||
| 646 | + <view class="item_right"> | ||
| 647 | + <text>{{cat_name}}</text> | ||
| 648 | + </view> | ||
| 649 | + </view> | ||
| 650 | + <view class="tb_item tb-l" wx:if="{{brand_name && is_show_pp}}"> | ||
| 651 | + <view class="item_left"> | ||
| 652 | + <text>品牌</text> | ||
| 653 | + </view> | ||
| 654 | + <view class="item_right"> | ||
| 655 | + <text>{{brand_name}}</text> | ||
| 656 | + </view> | ||
| 657 | + </view> | ||
| 658 | + <view class="tb_item tb-l" wx:if="{{nation_name && is_show_gb}}"> | ||
| 659 | + <view class="item_left"> | ||
| 660 | + <text>国别</text> | ||
| 661 | + </view> | ||
| 662 | + <view class="item_right"> | ||
| 663 | + <text>{{nation_name}}</text> | ||
| 664 | + </view> | ||
| 665 | + </view> | ||
| 666 | + <view class="tb_item tb-l"> | ||
| 667 | + <view class="item_left"> | ||
| 668 | + <text>规格</text> | ||
| 669 | + </view> | ||
| 670 | + <view class="item_right"> | ||
| 671 | + <text>{{filters.show_gui_ge(data.goods_spec,data.goods_color)}}</text> | ||
| 672 | + </view> | ||
| 673 | + </view> | ||
| 674 | + <view class="tb_item tb-l"> | ||
| 675 | + <view class="item_left"> | ||
| 676 | + <text>上架时间</text> | ||
| 677 | + </view> | ||
| 678 | + <view class="item_right"> | ||
| 679 | + <text>{{data.on_time}}</text> | ||
| 680 | + </view> | ||
| 681 | + </view> | ||
| 682 | + </view> --> | ||
| 683 | + <!--详情图片--> | ||
| 684 | + <!-- <view class="wxParse"> | ||
| 685 | + <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> | ||
| 686 | + </view> --> | ||
| 687 | + </view> | ||
| 688 | + | ||
| 689 | + <!-- 推荐商品 --> | ||
| 690 | + <!-- <view class="flex-center rel xc-linellae-frame"> | ||
| 691 | + <view class="xc-linellae"></view> | ||
| 692 | + <view class="abs flex-center xc-recommend-frame "> | ||
| 693 | + <image class=" xc-recommend" src="{{iurl}}/miniapp/images/diamond.png"> | ||
| 694 | + </image> | ||
| 695 | + <view class="xc-recommend-word">推荐</view> | ||
| 696 | + </view> | ||
| 697 | + </view> | ||
| 698 | + | ||
| 699 | + <goods_recommend id="goods_list"></goods_recommend> --> | ||
| 700 | + | ||
| 701 | + </view> | ||
| 702 | + | ||
| 703 | + <!------------商品详情图片页面----------------> | ||
| 704 | + <!-- <view class="goods-norms" hidden="{{activeCategoryId==1?false:true}}"> | ||
| 705 | + <view class="table_s"> | ||
| 706 | + <view class="tb_item tb-l"> | ||
| 707 | + <view class="item_left"> | ||
| 708 | + <text>商品名称</text> | ||
| 709 | + </view> | ||
| 710 | + <view class="item_right"> | ||
| 711 | + <text>{{data.goods_name}}</text> | ||
| 712 | + </view> | ||
| 713 | + </view> | ||
| 714 | + <view class="tb_item tb-l"> | ||
| 715 | + <view class="item_left"> | ||
| 716 | + <text>商品编号</text> | ||
| 717 | + </view> | ||
| 718 | + <view class="item_right"> | ||
| 719 | + <text>{{data.goods_sn}}</text> | ||
| 720 | + </view> | ||
| 721 | + </view> | ||
| 722 | + <view class="tb_item tb-l"> | ||
| 723 | + <view class="item_left"> | ||
| 724 | + <text>商品条码</text> | ||
| 725 | + </view> | ||
| 726 | + <view class="item_right"> | ||
| 727 | + <text>{{data.sku}}</text> | ||
| 728 | + </view> | ||
| 729 | + </view> | ||
| 730 | + <view class="tb_item tb-l" wx:if="{{cat_name && is_show_pl}}"> | ||
| 731 | + <view class="item_left"> | ||
| 732 | + <text>品类</text> | ||
| 733 | + </view> | ||
| 734 | + <view class="item_right"> | ||
| 735 | + <text>{{cat_name}}</text> | ||
| 736 | + </view> | ||
| 737 | + </view> | ||
| 738 | + <view class="tb_item tb-l" wx:if="{{brand_name && is_show_pp}}"> | ||
| 739 | + <view class="item_left"> | ||
| 740 | + <text>品牌</text> | ||
| 741 | + </view> | ||
| 742 | + <view class="item_right"> | ||
| 743 | + <text>{{brand_name}}</text> | ||
| 744 | + </view> | ||
| 745 | + </view> | ||
| 746 | + <view class="tb_item tb-l" wx:if="{{nation_name && is_show_gb}}"> | ||
| 747 | + <view class="item_left"> | ||
| 748 | + <text>国别</text> | ||
| 749 | + </view> | ||
| 750 | + <view class="item_right"> | ||
| 751 | + <text>{{nation_name}}</text> | ||
| 752 | + </view> | ||
| 753 | + </view> | ||
| 754 | + <view class="tb_item tb-l"> | ||
| 755 | + <view class="item_left"> | ||
| 756 | + <text>规格</text> | ||
| 757 | + </view> | ||
| 758 | + <view class="item_right"> | ||
| 759 | + <text>{{data.goods_spec==""?"规格1":data.goods_spec}}</text> | ||
| 760 | + </view> | ||
| 761 | + </view> | ||
| 762 | + <view class="tb_item tb-l"> | ||
| 763 | + <view class="item_left"> | ||
| 764 | + <text>上架时间</text> | ||
| 765 | + </view> | ||
| 766 | + <view class="item_right"> | ||
| 767 | + <text>{{data.on_time}}</text> | ||
| 768 | + </view> | ||
| 769 | + </view> | ||
| 770 | + </view> | ||
| 771 | + | ||
| 772 | + <view class="wxParse"> | ||
| 773 | + <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> | ||
| 774 | + </view> | ||
| 775 | + </view> --> | ||
| 776 | + <!---------------评价页面--------------> | ||
| 777 | + <!-- <view class="goods-comment" hidden="{{activeCategoryId==2?false:true}}"> | ||
| 778 | + <view class="topframe"> | ||
| 779 | + <view class="topframe-top"> | ||
| 780 | + <view class="topframe-top-content"> | ||
| 781 | + <view>宝贝评价</view> | ||
| 782 | + <view class="topframe-top-val">({{categories3[0].num}})</view> | ||
| 783 | + </view> | ||
| 784 | + <view class="topframe-praise" wx:if="{{categories3[0].num}}">好评{{ filters.toFix(categories3[2].num/categories3[0].num*100,2) }}%</view> | ||
| 785 | + <view wx:else>好评 0%</view> | ||
| 786 | + </view> | ||
| 787 | + <view class="buttem-list"> | ||
| 788 | + <view bindtap="tabClick3" id="{{item.id}}" wx:for="{{categories3}}" wx:key="categories3" class="item {{activeCategoryId3==item.id?'red':''}}">{{item.name}}({{item.num}})</view> | ||
| 789 | + </view> | ||
| 790 | + </view> | ||
| 791 | + | ||
| 792 | + <block wx:for="{{comments}}" wx:for-index="cIdx" wx:key="{{cIdx}}"> | ||
| 793 | + <view style='border-bottom:4rpx solid #eee;'> | ||
| 794 | + <view class="middle"> | ||
| 795 | + <view class="middle-img-frame"> | ||
| 796 | + <image class="middle-img" src="{{item.is_anonymous!=1?item.head_pic:iurl+'/miniapp/images/hui_hear_pic.png'}}" binderror="bind_bnerr2" data-errorimg="comments[{{cIdx}}].head_pic"></image> | ||
| 797 | + <view class="middle-user-frame"> | ||
| 798 | + <view class="middle-user">{{item.username==''||item.is_anonymous==1 ?'匿名用户':item.username}}</view> | ||
| 799 | + <image class="star" src="{{iurl}}/miniapp/images/star-red.png" wx:for="{{item.sum_rank}}" wx:key="{{index}}"></image> | ||
| 800 | + </view> | ||
| 801 | + </view> | ||
| 802 | + <view class="xc-pirces"> | ||
| 803 | + <view class="middle-font {{item.seeMore==true?'ellipsis-3':''}}" > | ||
| 804 | + {{item.content?item.content:''}} | ||
| 805 | + </view> | ||
| 806 | + </view> | ||
| 807 | + <view wx:if='{{item.seeMore}}' data-index='{{cIdx}}' class="s_btn fs30 red-co" catchtap='toggleHandler'>全部显示</view> | ||
| 808 | + <view wx:if='{{!item.seeMore && item.auto}}' data-index='{{cIdx}}' class="s_btn fs30 red-co" catchtap='toggleContent'>收起</view> | ||
| 809 | + <view class="img-ul"> | ||
| 810 | + | ||
| 811 | + <block wx:if="{{item.source_type==0}}"> | ||
| 812 | + <view class="img-li" wx:for="{{item.img}}" wx:key="{{index}}"> | ||
| 813 | + <image bindtap="previewCommentImgs" class="wh100" data-cidx="{{cIdx}}" data-img="{{iurl}}{{item}}" | ||
| 814 | + data-id="{{index}}" src="{{iurl}}{{item}}"></image> | ||
| 815 | + </view> | ||
| 816 | + </block> | ||
| 817 | + <block wx:if="{{item.source_type==1}}"> | ||
| 818 | + <view class="img-li" wx:for="{{item.weapp_img}}" wx:if="{{aitem.length>10}}" wx:key="{{index}}" wx:for-item="aitem"> | ||
| 819 | + <image bindtap="previewCommentImgs_w" class="wh100" data-cidx="{{cIdx}}" data-img="{{aitem}}" | ||
| 820 | + data-id="{{index}}" src="{{aitem}}"></image> | ||
| 821 | + </view> | ||
| 822 | + </block> | ||
| 823 | + </view> | ||
| 824 | + | ||
| 825 | + <view class="z_parameter"> | ||
| 826 | + <view class="parameter-font">{{item.add_time}}</view> | ||
| 827 | + <view class="parameter-dian" bindtap="click_zan" data-com_id="{{item.comment_id}}" data-item_id="{{cIdx}}"> | ||
| 828 | + <image wx:if="{{item.userZanNum==1}}" class="parameter-img" src="{{iurl}}/miniapp/images/zan_red.png"></image> | ||
| 829 | + <image wx:else class="parameter-img" src="{{iurl}}/miniapp/images/dianzan.png"></image> | ||
| 830 | + <view class="parameter-val" style='color:{{item.userZanNum==1? "#d60022":"#999" }}' >{{item.zan_num}}</view> | ||
| 831 | + </view> | ||
| 832 | + </view> | ||
| 833 | + | ||
| 834 | + </view> | ||
| 835 | + <view class="reply rel" wx:if="{{item.replay_list}}"> | ||
| 836 | + <view class="line_bulge"></view> | ||
| 837 | + <view class="shop-reply">店家回复: </view> | ||
| 838 | + <view class="shop-font" wx:for="{{item.replay_list}}" wx:for-item="r_item" wx:key="{{index}}"> | ||
| 839 | + {{r_item.content}} | ||
| 840 | + </view> | ||
| 841 | + </view> | ||
| 842 | + </view> | ||
| 843 | + </block> | ||
| 844 | + <block wx:if="{{(!comments || comments.length==0) && get_c }}"> | ||
| 845 | + <text class="no_pj_list">暂无评价</text> | ||
| 846 | + </block> | ||
| 847 | + <block wx:if="{{comments.length>10 && comments_no_more}}"> | ||
| 848 | + <text class="no_pj_list">已经加载到底部</text> | ||
| 849 | + </block> | ||
| 850 | + </view> --> | ||
| 851 | + </view> | ||
| 852 | + </view> | ||
| 853 | + <!---滚动到顶部----> | ||
| 854 | + <view bindtap="doScrollTop" class="toTop" wx:if="{{supportPageScroll}}"> | ||
| 855 | + <image class="wh100" src="{{iurl}}/miniapp/images/topup.png"></image> | ||
| 856 | + </view> | ||
| 857 | + | ||
| 858 | + <!-------------------底部按钮--------------------> | ||
| 859 | + <view class="join-cart"> | ||
| 860 | + <!-- bindtap="contactService" --> | ||
| 861 | + <button wx:if="{{sys_switch.weapp_customertype}}" class="custom-service cart-ico new_split" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> | ||
| 862 | + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | ||
| 863 | + <view>客服</view> | ||
| 864 | + </button> | ||
| 865 | + <view wx:else class="custom-service cart-ico new_split" bindtap="contactService"> | ||
| 866 | + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | ||
| 867 | + <view>客服</view> | ||
| 868 | + </view> | ||
| 869 | + | ||
| 870 | + <view bindtap="collectGoods" class="custom-service cart-ico new_split"> | ||
| 871 | + <image hidden="{{is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart.png"></image> | ||
| 872 | + <image hidden="{{!is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart-h.png"></image> | ||
| 873 | + <view>收藏</view> | ||
| 874 | + </view> | ||
| 875 | + <view class="shopping-cart cart-ico new_split"> | ||
| 876 | + <navigator open-type="switchTab" url="/pages/cart/cart/cart"> | ||
| 877 | + <image class="sc-img" src="{{iurl}}/miniapp/images/shopping-cart.png"></image> | ||
| 878 | + <view class="cart-num ellipsis-1"> {{cartGoodsNum}} </view> | ||
| 879 | + <view>购物车</view> | ||
| 880 | + </navigator> | ||
| 881 | + </view> | ||
| 882 | + <view bindtap="openSpecModel" class="buy-btn cart-btn cart-btn-lg" wx:if="{{data.goods.is_virtual}}">立即购买</view> | ||
| 883 | + | ||
| 884 | + <!-- 普通商品购买 --> | ||
| 885 | + <block wx:if="{{prom_type==0 || prom_type==2 || prom_type==3}}"> | ||
| 886 | + | ||
| 887 | + <!-- 线上销售的时候,要判断库存量, 线下库存的时候不用判断 --> | ||
| 888 | + <!-- <block wx:if="{{(sele_g.store_count>0 && sales_rules==1) || sales_rules==2 }}"> --> | ||
| 889 | + <block> | ||
| 890 | + <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn">加入购物车</view> | ||
| 891 | + <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn">立即购买</view> | ||
| 892 | + </block> | ||
| 893 | + <!-- <block wx:else> | ||
| 894 | + <view class="is_stock cart-btn is_stock xc-ash-b " style="width:55.5%">库存不足</view> | ||
| 895 | + </block> --> | ||
| 896 | + | ||
| 897 | + </block> | ||
| 898 | + | ||
| 899 | + <!-------秒杀--------> | ||
| 900 | + <!-- <block wx:if="{{prom_type==1}}"> | ||
| 901 | + <block wx:if="{{prom_st==1 && !prom_r_null}}"> | ||
| 902 | + <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn">加入购物车</view> | ||
| 903 | + <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn">立即抢购</view> | ||
| 904 | + </block> | ||
| 905 | + <block wx:if="{{prom_st==0 && !prom_r_null}}"> | ||
| 906 | + <view class="buy-btn cart-btn cart-btn-lg lanse set_width">即将开始</view> | ||
| 907 | + </block> | ||
| 908 | + <block wx:if="{{prom_r_null}}"> | ||
| 909 | + <view class="buy-btn cart-btn cart-btn-lg huise set_width">已抢光</view> | ||
| 910 | + </block> | ||
| 911 | + <block wx:if="{{prom_st==3 && !prom_r_null}}"> | ||
| 912 | + <view class="buy-btn cart-btn cart-btn-lg lanse set_width">活动已经结束</view> | ||
| 913 | + </block> | ||
| 914 | + </block> --> | ||
| 915 | + | ||
| 916 | + <!-------拼单--------> | ||
| 917 | + <!-- <block wx:if="{{prom_type==6}}"> --> | ||
| 918 | + <!-- <view bindtap="openSpecModel_pt" data-it="1" data-ind="1" class="join-btn cart-btn line-h"> | ||
| 919 | + <view class="fir-v"> --> | ||
| 920 | + <!-- ¥{{data.shop_price,2)}} --> | ||
| 921 | + <!-- <block wx:if="{{card_field && sele_g[card_field]>0}}"> | ||
| 922 | + {{filters.toFix(sele_g[card_field],2)}} | ||
| 923 | + </block> | ||
| 924 | + <block wx:else> | ||
| 925 | + {{filters.toFix(sele_g.shop_price,2)}} | ||
| 926 | + </block> | ||
| 927 | + </view> | ||
| 928 | + <view>单独购买</view> | ||
| 929 | + </view> --> | ||
| 930 | + | ||
| 931 | + <!-- <block wx:if="{{user_order_pt_state==0}}"> --> | ||
| 932 | + <!----商家团----> | ||
| 933 | + <!-- <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"> | ||
| 934 | + <view class="fir-v">¥{{prom_act.price}}</view> | ||
| 935 | + <view>去参团</view> | ||
| 936 | + </view> --> | ||
| 937 | + <!----会员团----> | ||
| 938 | + <!-- <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"> --> | ||
| 939 | + <!--<view class="fir-v">¥{{prom_act.price}}</view>--> | ||
| 940 | + <!-- <view class="pd_top1" wx:if="{{prom_act.tz_yhjgtype>1}}"> | ||
| 941 | + <view>一键开团</view> | ||
| 942 | + <view wx:if="{{prom_act.tz_yhjgtype==3}}">佣金<text style="font-size: 23rpx">¥</text>{{filters.toFix(prom_act.tz_yyhjg,2)}}</view> | ||
| 943 | + <view wx:if="{{prom_act.tz_yhjgtype==2}}">团长免单</view> | ||
| 944 | + </view> | ||
| 945 | + <view wx:else> | ||
| 946 | + <view class="fir-v">¥{{ filters.toFix(prom_act.price,2)}}</view> | ||
| 947 | + <view>一键开团</view> | ||
| 948 | + </view> --> | ||
| 949 | + | ||
| 950 | + <!-- </view> --> | ||
| 951 | + <!---阶梯团----> | ||
| 952 | + <!-- <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"> | ||
| 953 | + <view class="fir-v">¥{{filters.toFix(prom_act.yf_price,2)}}</view> | ||
| 954 | + <view>支付定金</view> | ||
| 955 | + </view> | ||
| 956 | + | ||
| 957 | + <view wx:if="{{prom_st==0}}" class="buy-btn cart-btn lanse">即将开始</view> | ||
| 958 | + <view wx:if="{{prom_r_null}}" class="buy-btn cart-btn huise">已抢光</view> | ||
| 959 | + <view wx:if="{{prom_st==3 && !prom_r_null}}" class="buy-btn cart-btn lanse">活动已经结束</view> | ||
| 960 | + </block> | ||
| 961 | + <block wx:else> | ||
| 962 | + <view bindtap="go_to_nopay" wx:if="{{user_order_pt_state==1}}" class="buy-btn cart-btn huise">您还未支付</view> | ||
| 963 | + <view bindtap="go_to_team_show" wx:if="{{user_order_pt_state==2}}" class="buy-btn cart-btn">查看支付详情</view> | ||
| 964 | + <view wx:if="{{user_order_pt_state==3}}" bindtap="go_pay_wk" class="buy-btn cart-btn">支付尾款</view> | ||
| 965 | + </block> --> | ||
| 966 | + <!-- </block> --> | ||
| 967 | + | ||
| 968 | + | ||
| 969 | + <!-------积分购--------> | ||
| 970 | + <!-- <block wx:if="{{prom_type==4}}"> | ||
| 971 | + | ||
| 972 | + <block wx:if="{{is_shopbuy}}"> | ||
| 973 | + <view bindtap="go_pay_integral_normal" class="join-btn cart-btn line-h"> | ||
| 974 | + <view class="fir-v"> | ||
| 975 | + <block wx:if="{{card_field && sele_g[card_field]>0}}"> | ||
| 976 | + {{filters.toFix(sele_g[card_field],2)}} | ||
| 977 | + </block> | ||
| 978 | + <block wx:else> | ||
| 979 | + {{filters.toFix(sele_g.shop_price,2)}} | ||
| 980 | + </block> | ||
| 981 | + </view> | ||
| 982 | + <view>单独购买</view> | ||
| 983 | + </view> | ||
| 984 | + <view bindtap="go_pay_integral" class="buy-btn cart-btn" wx:if="{{can_integral}}" >立即兑换</view> | ||
| 985 | + <view class="buy-btn cart-btn" style="background-color: #aaa;" wx:else >积分不足</view> | ||
| 986 | + </block> | ||
| 987 | + | ||
| 988 | + <block wx:else> | ||
| 989 | + <view bindtap="go_pay_integral" class="buy-btn-all cart-btn" style="width: 58%; margin-left:1%;" wx:if="{{can_integral}}" >立即兑换</view> | ||
| 990 | + <view class="buy-btn-all cart-btn" style="background-color: #aaa; width: 58%;margin-left:1%" wx:else >积分不足</view> | ||
| 991 | + </block> | ||
| 992 | + | ||
| 993 | + </block> --> | ||
| 994 | + | ||
| 995 | + <!---<view bindtap="openSpecModel" class="buy-btn cart-btn cart-btn-lg" wx:else>立即兑换</view>--> | ||
| 996 | + </view> | ||
| 997 | + | ||
| 998 | + <!-- 制作一个圆球导航 --> | ||
| 999 | + <nav_box></nav_box> | ||
| 1000 | + | ||
| 1001 | +</block> | ||
| 1002 | + | ||
| 1003 | +<!----弹起来,选择规格数量,普通商品购买和秒杀------> | ||
| 1004 | +<view hidden="{{!openSpecModal}}"> | ||
| 1005 | + <view bindtap="closeSpecModal" class="cover-layer"></view> | ||
| 1006 | + <view class="spec-model"> | ||
| 1007 | + <view class="pding"> | ||
| 1008 | + <icon bindtap="closeSpecModal" class="modal-close" color="black" size="22" type="cancel"></icon> | ||
| 1009 | + <view class="spec-goods"> | ||
| 1010 | + <image class="wh100 spec-img" src="{{iurl + data.image_url}}" binderror="pop_err_img" data-errorimg="sele_g.original_img"/> | ||
| 1011 | + <view class="spec-goods-info"> | ||
| 1012 | + <view class="spec-goods-name ellipsis-2">{{data.goods_name}}</view> | ||
| 1013 | + <!-- <view class="spec-goods-name ellipsis-2">{{sele_g.goods_name}}</view> --> | ||
| 1014 | + <view class="flex ai_end xc-val-money" > | ||
| 1015 | + <view class="spec-goods-price" wx:if="{{prom_price==null}}" > | ||
| 1016 | + <text class="fs20">¥</text> | ||
| 1017 | + <!-- 如果是等级会员,且有等级价 --> | ||
| 1018 | + <block wx:if="{{card_field && sele_g[card_field]>0}}">{{sele_g[card_field]}} </block> | ||
| 1019 | + <!-- <block wx:else>{{sele_g.shop_price}}</block> --> | ||
| 1020 | + <block wx:else>{{data.shop_price}}</block> | ||
| 1021 | + </view> | ||
| 1022 | + <view class="spec-goods-price" wx:else><text class="fs20">¥</text>{{prom_price}}</view> | ||
| 1023 | + <!-- 显示线下价格 --> | ||
| 1024 | + <!-- <view wx:if="{{sele_g.offline_price}}" class="quan_price flex ai-center jc-center"> | ||
| 1025 | + 券后¥<text class="fs32">{{sele_g.offline_price}}</text> | ||
| 1026 | + </view> --> | ||
| 1027 | + </view> | ||
| 1028 | + | ||
| 1029 | + <!-- <block wx:if="{{prom_type==0}}"> | ||
| 1030 | + <view class="flex"> | ||
| 1031 | + <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view> | ||
| 1032 | + <block wx:if="{{sales_rules==2}}"> | ||
| 1033 | + <view class="spec-goods-stock" wx:if="{{def_pick_store && def_pick_store.CanOutQty}}">可售:{{def_pick_store.CanOutQty}}</view> | ||
| 1034 | + <view class="spec-goods-stock" wx:else>可售:0</view> | ||
| 1035 | + </block> | ||
| 1036 | + <block wx:else><view class="spec-goods-stock">可售:{{sele_g.store_count}}</view></block> | ||
| 1037 | + </view> | ||
| 1038 | + </block> --> | ||
| 1039 | + <!-- <block wx:if="{{prom_type==1}}"> | ||
| 1040 | + <view class="flex"> | ||
| 1041 | + <view class="spec-goods-stock" wx:if="{{prom_st>0}}">已售:{{prom_act.buy_num+prom_act.virtual}}</view> | ||
| 1042 | + <view class="spec-goods-stock" wx:else >已售:{{prom_act.buy_num}}</view> | ||
| 1043 | + <view class="spec-goods-stock">可售:{{prom_act.goods_num-prom_act.buy_num}}</view> | ||
| 1044 | + </view> | ||
| 1045 | + </block> --> | ||
| 1046 | + </view> | ||
| 1047 | + | ||
| 1048 | + <!-- 选择门店模块 --> | ||
| 1049 | + <!-- <view class="flex-space-between address ai_end xc-width "> | ||
| 1050 | + | ||
| 1051 | + <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | ||
| 1052 | + <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | ||
| 1053 | + <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}"> | ||
| 1054 | + 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | ||
| 1055 | + | ||
| 1056 | + </view> | ||
| 1057 | + </view> --> | ||
| 1058 | + | ||
| 1059 | + <!-- 没有门店的时候 --> | ||
| 1060 | + <!-- <view class="flex" bindtap="choice_store" wx:else> | ||
| 1061 | + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | ||
| 1062 | + <view class="fs30" style="color:black;">选择门店</view> | ||
| 1063 | + </view> | ||
| 1064 | + | ||
| 1065 | + <view class="red-co fs28" bindtap="choice_store" > | ||
| 1066 | + 更多门店 | ||
| 1067 | + <text class="right-arrow"></text> | ||
| 1068 | + </view> | ||
| 1069 | + </view> --> | ||
| 1070 | + <!-- <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> | ||
| 1071 | + <block wx:else> | ||
| 1072 | + <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view> | ||
| 1073 | + <block wx:else> | ||
| 1074 | + <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view> | ||
| 1075 | + <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules==2 && prom_type==0}}">(库存不足)</view> | ||
| 1076 | + </block> | ||
| 1077 | + </block> --> | ||
| 1078 | + | ||
| 1079 | + <!-- <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store && def_pick_store.fulladdress}}">地址:{{def_pick_store.fulladdress}}</view> --> | ||
| 1080 | + </view> | ||
| 1081 | + | ||
| 1082 | + <!--商品的属性项目--> | ||
| 1083 | + <!-- <view class="xc-goods-attribute"> | ||
| 1084 | + <view hidden="{{ismend==1}}" class="spec-name">商品属性</view> | ||
| 1085 | + <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> | ||
| 1086 | + <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g"> | ||
| 1087 | + {{item.gg}} | ||
| 1088 | + </view> | ||
| 1089 | + </view> | ||
| 1090 | + </view> --> | ||
| 1091 | + | ||
| 1092 | + | ||
| 1093 | + <view class="b_num"> | ||
| 1094 | + <view>购买数量</view> | ||
| 1095 | + <view class="count"> | ||
| 1096 | + <view bindtap="subCartNum" class="sub">-</view> | ||
| 1097 | + <input bindblur="inputCartNum" type="number" value="{{goodsInputNum}}"></input> | ||
| 1098 | + <view bindtap="addCartNum" class="add">+</view> | ||
| 1099 | + </view> | ||
| 1100 | + </view> | ||
| 1101 | + | ||
| 1102 | + <!-- 提示再买多少优惠 --> | ||
| 1103 | + <!-- <view style="margin-top: 35rpx;color:#333;font-size:28rpx;" wx:if="{{hui_condition && openSpecModal_ind==2}}"> | ||
| 1104 | + 再买{{hui_condition.need}} | ||
| 1105 | + <text wx:if="{{hui_condition.money}}">,免{{hui_condition.money}}元</text> | ||
| 1106 | + <text wx:if="{{hui_condition.sale}}">,打{{hui_condition.sale}}折</text> | ||
| 1107 | + <text wx:if="{{hui_condition.past==1}}">,包邮</text> | ||
| 1108 | + <text wx:if="{{hui_condition.intValue>0}}">,送{{hui_condition.intValue}}积分</text> | ||
| 1109 | + <text wx:if="{{hui_condition.couponId>0}}">,送优惠券</text> | ||
| 1110 | + <text wx:if="{{hui_condition.gift_id>0}}">,送赠品</text> | ||
| 1111 | + <text wx:if="{{hui_condition.lb_id>0}}">,送礼包</text> | ||
| 1112 | + </view> --> | ||
| 1113 | + | ||
| 1114 | + | ||
| 1115 | + </view> | ||
| 1116 | + <!-- <view class="spec-cart-btns"> --> | ||
| 1117 | + <!-- <view wx:if="{{def_pick_store && def_pick_store.is_no_dis}}" class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">配送不匹配</view> --> | ||
| 1118 | + <!-- <block wx:else> --> | ||
| 1119 | + | ||
| 1120 | + <!-- 根本就找不到门店 --> | ||
| 1121 | + <!-- <block wx:if="{{!only_pk && !def_pickpu_list}}"> | ||
| 1122 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | ||
| 1123 | + </block> --> | ||
| 1124 | + <!-- <block wx:else> | ||
| 1125 | + | ||
| 1126 | + | ||
| 1127 | + <block wx:if="{{only_pk.length && !only_pk.length}}"> | ||
| 1128 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | ||
| 1129 | + </block> | ||
| 1130 | + <block wx:else> | ||
| 1131 | + <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | ||
| 1132 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | ||
| 1133 | + </block> | ||
| 1134 | + <block wx:else> | ||
| 1135 | + <block wx:if="{{!def_pick_store}}"> | ||
| 1136 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view> | ||
| 1137 | + </block> | ||
| 1138 | + <block wx:else> --> | ||
| 1139 | + <!-- 如果是线下库存购买的时候,且是普通商品购买的时候 --> | ||
| 1140 | + <!-- <block wx:if="{{sales_rules==2 && prom_type==0}}"> | ||
| 1141 | + <block wx:if="{{!def_pick_store.CanOutQty}}"> | ||
| 1142 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | ||
| 1143 | + </block> | ||
| 1144 | + <block wx:else> | ||
| 1145 | + <view wx:if="{{openSpecModal_ind==1}}" bindtap="addCart"data-openSpecModal_ind="{{openSpecModal_ind}}" | ||
| 1146 | + class="spec-cart-btn yellow fs32" data-action="add">加入购物车</view> | ||
| 1147 | + <view wx:if="{{openSpecModal_ind==2}}" bindtap="addCart"data-openSpecModal_ind="{{openSpecModal_ind}}" | ||
| 1148 | + class="spec-cart-btn spec-buy" data-action="buy"> | ||
| 1149 | + {{sele_g.offline_price?"券后购买":"立即购买"}} | ||
| 1150 | + </view> | ||
| 1151 | + </block> | ||
| 1152 | + </block> --> | ||
| 1153 | + <!-- 线上销售 --> | ||
| 1154 | + <!-- <block wx:else> | ||
| 1155 | + <block wx:if="{{sele_g.store_count<=0}}"> | ||
| 1156 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | ||
| 1157 | + </block> | ||
| 1158 | + <block wx:else> | ||
| 1159 | + <view wx:if="{{openSpecModal_ind==1}}" bindtap="addCart"data-openSpecModal_ind="{{openSpecModal_ind}}" | ||
| 1160 | + class="spec-cart-btn yellow fs32" data-action="add">加入购物车</view> | ||
| 1161 | + <view wx:if="{{openSpecModal_ind==2}}" bindtap="addCart"data-openSpecModal_ind="{{openSpecModal_ind}}" | ||
| 1162 | + class="spec-cart-btn spec-buy" data-action="buy"> | ||
| 1163 | + {{sele_g.offline_price?"券后购买":"立即购买"}} | ||
| 1164 | + </view> | ||
| 1165 | + </block> | ||
| 1166 | + </block> --> | ||
| 1167 | + <!-- </block> --> | ||
| 1168 | + <!-- </block> | ||
| 1169 | + </block> | ||
| 1170 | + </block> | ||
| 1171 | + | ||
| 1172 | + </block> | ||
| 1173 | + </view> --> | ||
| 1174 | + | ||
| 1175 | + <view class="clear"></view> | ||
| 1176 | + <!---选择门店的列表---> | ||
| 1177 | + <view hidden="{{ismend==0}}" class="sto_v"> | ||
| 1178 | + <view class="title" hidden="{{is_sec_mend==1}}" bindtap="hidemend"> | ||
| 1179 | + <image class="tubiao" src="{{iurl}}/miniapp/images/icon-left.png"></image>选择门店 | ||
| 1180 | + </view> | ||
| 1181 | + <!-----第一级显示------> | ||
| 1182 | + <!-- <view class="itemlists" hidden="{{is_sec_mend==1}}"> | ||
| 1183 | + <block wx:if="{{is_show_sto_cat}}"> | ||
| 1184 | + <view wx:for="{{all_sto}}" wx:key="all_sto" class="item" bindtap="show_sec" data-index="{{index}}">{{item.name}}</view> | ||
| 1185 | + </block> | ||
| 1186 | + <block wx:else> | ||
| 1187 | + <view wx:for="{{only_pk}}" wx:key="only_pk" class="item" bindtap="hidemend" data-p_id="{{item.pickup_id}}" data-p_name="{{item.pickup_name}}" data-p_dis="{{item.distr_type}}">{{item.pickup_name}}</view> | ||
| 1188 | + </block> | ||
| 1189 | + </view> --> | ||
| 1190 | + <!-----第二级显示------> | ||
| 1191 | + <!-- <view class="stitle" hidden="{{is_sec_mend==0}}" bindtap="hide_sec_mend"> | ||
| 1192 | + <image class="tubiao" src="{{iurl}}/miniapp/images/icon-left.png"></image>{{sec_sto.name}} | ||
| 1193 | + </view> --> | ||
| 1194 | + <!-- <view class="itemlists" hidden="{{is_sec_mend==0}}"> | ||
| 1195 | + <view wx:for="{{sec_sto.s_arr}}" wx:key="{{index}}" class="item" bindtap="hidemend" data-p_id="{{item.pickup_id}}" data-p_name="{{item.pickup_name}}" data-p_dis="{{item.distr_type}}">{{item.pickup_name}} | ||
| 1196 | + </view> | ||
| 1197 | + </view> --> | ||
| 1198 | + </view> | ||
| 1199 | + </view> | ||
| 1200 | +</view> | ||
| 1201 | + | ||
| 1202 | +<!-- 弹起来,购买积分购 --> | ||
| 1203 | +<!-- <view hidden="{{!openSpecModal_inte}}"> | ||
| 1204 | + <include src="buy_integral.wxml" /> | ||
| 1205 | +</view> --> | ||
| 1206 | +<!-- 弹起来,购买积分购的普通购买 --> | ||
| 1207 | +<!-- <view hidden="{{!openSpecModal_inte_normal}}"> | ||
| 1208 | + <include src="buy_integral_normal.wxml" /> | ||
| 1209 | +</view> --> | ||
| 1210 | + | ||
| 1211 | +<!----弹起来,选择规格数量,拼单商品购买------> | ||
| 1212 | +<!-- <view hidden="{{!openSpecModal_pt}}"> | ||
| 1213 | + <include src="buy_pt.wxml" /> | ||
| 1214 | +</view> --> | ||
| 1215 | + | ||
| 1216 | +<!----弹起来优惠信息------> | ||
| 1217 | +<!-- <view hidden="{{!openPromModal}}"> | ||
| 1218 | + <view bindtap="closePromModal" class="cover-layer"></view> | ||
| 1219 | + <view class="prom-model"> | ||
| 1220 | + <icon bindtap="closePromModal" class="modal-close" color="gray" size="22" type="cancel"></icon> | ||
| 1221 | + <view class="prom-title">优惠信息</view> | ||
| 1222 | + <view class="logistics-item" wx:for="{{select.activity.data}}" wx:key="{{index}}"> | ||
| 1223 | + <view class="item-title"> | ||
| 1224 | + <text class="prom-item">{{item.title}}</text> | ||
| 1225 | + </view> | ||
| 1226 | + <view class="item-mes ellipsis-1">{{item.content}}</view> | ||
| 1227 | + </view> | ||
| 1228 | + </view> | ||
| 1229 | +</view> --> | ||
| 1230 | +<!----弹起的----> | ||
| 1231 | +<!-- <block wx:if="{{pd_xx==1}}"> | ||
| 1232 | + <view class="bview"></view> | ||
| 1233 | + <view class="juzhong"> | ||
| 1234 | + <view class="xq"> | ||
| 1235 | + <view class="title" bindtap="close_pt_xx">拼团玩法介绍 | ||
| 1236 | + <image src="{{iurl}}/miniapp/images/gbi.png" class="close"></image> | ||
| 1237 | + </view> | ||
| 1238 | + <view>1.开团: | ||
| 1239 | + <text class="hs1">选择心仪商品,点击“发起X人团”按钮,付款后即为开团成功;</text> | ||
| 1240 | + </view> | ||
| 1241 | + <view>2.参团: | ||
| 1242 | + <text class="hs1">进入朋友分享的页面,点击“立即参团”按钮,付款后即为参团成功,若多人同时支付,支付成功时间较早的人获得参团资格;</text> | ||
| 1243 | + </view> | ||
| 1244 | + <view>3.成团: | ||
| 1245 | + <text class="hs1">在开团或参团成功后,点击“邀请小伙伴参团”将页面分享给好友,在有效时间内凑齐人数即为成团,此时商家会开始发货;</text> | ||
| 1246 | + </view> | ||
| 1247 | + <view>4.组团失败: | ||
| 1248 | + <text class="hs1">在有效时间内未凑齐人数,即为组团失败,此时付款项会原路退回到支付账户;</text> | ||
| 1249 | + </view> | ||
| 1250 | + <view>5. | ||
| 1251 | + <text class="hs1">组团有效期间内,拼购商品订单不允许取消。 </text> | ||
| 1252 | + </view> | ||
| 1253 | + </view> | ||
| 1254 | + </view> | ||
| 1255 | +</block> --> | ||
| 1256 | +<!----弹起领券----> | ||
| 1257 | +<view wx:if='{{coupon==1}}'> | ||
| 1258 | + <view class="cover-layer flex-center" data-coupon='0' bindtap="switchCoupon"></view> | ||
| 1259 | + <view class="cx-popup {{coupon== true ? 'up' : 'down'}} "> | ||
| 1260 | + <!-- <view class="top-frame"> | ||
| 1261 | + <view class="top two-level-word t-c"> | ||
| 1262 | + 优惠券领取 | ||
| 1263 | + </view> | ||
| 1264 | + </view> --> | ||
| 1265 | + <!-- <view class="top-frame"> | ||
| 1266 | + <view class="xc-valid-coupon four-level-word">可以领优惠券</view> | ||
| 1267 | + </view> --> | ||
| 1268 | + <view class="xc-frame"> | ||
| 1269 | + <view class="top-frame"> | ||
| 1270 | + <view class="xc-coupon-frame"> | ||
| 1271 | + <!---单张的券---> | ||
| 1272 | + <view class="rel" wx:for="{{quan_list}}" wx:key="{{index}}"> | ||
| 1273 | + <view class="coupon flex"> | ||
| 1274 | + <view class="circle xc-circular-one"></view> | ||
| 1275 | + <view class="xc-coupon-left "> | ||
| 1276 | + <view class="flex xc-money-frame"> | ||
| 1277 | + <view class=" xc-money two-level-word xc-rmb">¥</view> | ||
| 1278 | + <view class="one-level-word xc-money">{{item.money}}</view> | ||
| 1279 | + </view> | ||
| 1280 | + <view class="xc-money four-level-word xc-spacing"> | ||
| 1281 | + 满{{item.condition}}元可用 | ||
| 1282 | + </view> | ||
| 1283 | + </view> | ||
| 1284 | + <view class="xc-coupon-right flex"> | ||
| 1285 | + <view class="xc-detail-coupon"> | ||
| 1286 | + <view class="four-level-word">订单金额满{{item.condition}}元可用</view> | ||
| 1287 | + <view class="four-level-word xc-below">{{item.start}}-{{item.end}}</view> | ||
| 1288 | + </view> | ||
| 1289 | + <view class="flex-vertical"> | ||
| 1290 | + <view class="three-level-word xc-get background {{item.everyone_num>0 && item.lqnum>=item.everyone_num?'nouse':''}}" | ||
| 1291 | + data-ind="{{index}}" data-cid="{{item.id}}" bindtap="get_quan">{{ item.linging==1?'领取中':'领取'}}</view> | ||
| 1292 | + </view> | ||
| 1293 | + </view> | ||
| 1294 | + <view class="circle xc-circular-two"></view> | ||
| 1295 | + </view> | ||
| 1296 | + </view> | ||
| 1297 | + </view> | ||
| 1298 | + </view> | ||
| 1299 | + </view> | ||
| 1300 | + <view class="cx-confirm flex-center" data-coupon='0' bindtap="switchCoupon"> | ||
| 1301 | + <view class="confirm t-c">确定</view> | ||
| 1302 | + </view> | ||
| 1303 | + </view> | ||
| 1304 | +</view> | ||
| 1305 | + | ||
| 1306 | +<!-- 选择门店的弹框,1.1版最新的 --> | ||
| 1307 | +<block wx:if="{{store==1}}"> | ||
| 1308 | + <view class="mongolia-layer" bindtap="close_popup"></view> | ||
| 1309 | + <view class="popup-frame"> | ||
| 1310 | + <block wx:if="{{sort_store==0}}"> | ||
| 1311 | + <!-- 头部 标题 --> | ||
| 1312 | + <view class="popup-top flex-space-between"> | ||
| 1313 | + <text class="fs32 nearby_store">{{choice_sort_store==0?'附近的门店':region_name}}</text> | ||
| 1314 | + <view> | ||
| 1315 | + <view> | ||
| 1316 | + <icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon> | ||
| 1317 | + </view> | ||
| 1318 | + <view class="felx choose_more" bindtap="more_store"> | ||
| 1319 | + <text class="fs26 red-co" wx:if="{{is_show_sto_cat}}">{{choice_sort_store==0?'更多门店':'返回'}}</text> | ||
| 1320 | + <view class="bg_rights" wx:if="{{is_show_sto_cat}}"></view> | ||
| 1321 | + </view> | ||
| 1322 | + </view> | ||
| 1323 | + </view> | ||
| 1324 | + <!-- 门店列表,最外层的门店列表,一开始 --> | ||
| 1325 | + <view class="store-list"> | ||
| 1326 | + <!--如果还没有点击更多门店的时候 --> | ||
| 1327 | + <block wx:if="{{choice_sort_store==0}}"> | ||
| 1328 | + <!-- 需要for循环 --> | ||
| 1329 | + <block wx:if="{{is_show_sto_cat==1}}"> | ||
| 1330 | + <view class="store_choose flex" wx:for="{{def_pickpu_list}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> | ||
| 1331 | + <view class="store flex-vertical"> | ||
| 1332 | + <!-- 需要点击事件 --> | ||
| 1333 | + <block wx:if="{{index==fir_pick_index}}"> | ||
| 1334 | + <view class="circle white xc-hook fs20 red-b">Г</view> | ||
| 1335 | + </block> | ||
| 1336 | + <block wx:else> | ||
| 1337 | + <view class="circle xc-hooks"></view> | ||
| 1338 | + </block> | ||
| 1339 | + <view class="address-frame xc-ash"> | ||
| 1340 | + <view class="flex-vertical-between butttem5"> | ||
| 1341 | + <view class="flex xc-ash"> | ||
| 1342 | + <view class="fs30 xc-black3 address_name">{{item.pickup_name}}</view> | ||
| 1343 | + </view> | ||
| 1344 | + <view> | ||
| 1345 | + <view class="distance fs24 address-val"wx:if="{{item.distance!=null}}"> | ||
| 1346 | + 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+'km':filters.toFix(item.distance,0)+"m"}}</view> | ||
| 1347 | + </view> | ||
| 1348 | + </view> | ||
| 1349 | + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view> | ||
| 1350 | + </view> | ||
| 1351 | + </view> | ||
| 1352 | + </view> | ||
| 1353 | + </block> | ||
| 1354 | + <block wx:else> | ||
| 1355 | + <view class="store_choose flex" wx:for="{{only_pk}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> | ||
| 1356 | + <view class="store flex-vertical"> | ||
| 1357 | + <!-- 需要点击事件 --> | ||
| 1358 | + <block wx:if="{{index==fir_pick_index}}" > | ||
| 1359 | + <view class="circle white xc-hook fs20 red-b">Г</view> | ||
| 1360 | + </block> | ||
| 1361 | + <block wx:else> | ||
| 1362 | + <view class="circle xc-hooks"></view> | ||
| 1363 | + </block> | ||
| 1364 | + | ||
| 1365 | + <view class="address-frame xc-ash"> | ||
| 1366 | + <view class="flex-vertical-between "> | ||
| 1367 | + <view class="flex xc-ash"> | ||
| 1368 | + <view class="fs30 xc-black3 address_name">{{item.pickup_name}}</view> | ||
| 1369 | + </view> | ||
| 1370 | + <view> | ||
| 1371 | + <view class="distance fs24 address-val" | ||
| 1372 | + wx:if="{{item.distance!=null}}">距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}} | ||
| 1373 | + </view> | ||
| 1374 | + </view> | ||
| 1375 | + </view> | ||
| 1376 | + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view> | ||
| 1377 | + </view> | ||
| 1378 | + </view> | ||
| 1379 | + </view> | ||
| 1380 | + </block> | ||
| 1381 | + </block> | ||
| 1382 | + <block wx:else> <!-- 如果是点击选择门店分类后显示分类下的门店 --> | ||
| 1383 | + <view class="store_choose flex" wx:for="{{sec_sto.s_arr}}" data-ind="{{index}}" bindtap="choose_for_store"> | ||
| 1384 | + <view class="store flex-vertical"> | ||
| 1385 | + <!-- 需要点击事件 --> | ||
| 1386 | + <block wx:if="{{index==sec_pick_index}}"> | ||
| 1387 | + <view class="circle white xc-hook fs20 red-b">Г</view> | ||
| 1388 | + </block> | ||
| 1389 | + <block wx:else> | ||
| 1390 | + <view class="circle xc-hooks"></view> | ||
| 1391 | + </block> | ||
| 1392 | + | ||
| 1393 | + <view class="address-frame xc-ash"> | ||
| 1394 | + <view class="flex-vertical-between "> | ||
| 1395 | + <view class="flex xc-ash"> | ||
| 1396 | + <view class="fs28 xc-black3 address_name">{{item.pickup_name}}</view> | ||
| 1397 | + </view> | ||
| 1398 | + <view> | ||
| 1399 | + <view class="distance fs24 address-val"wx:if="{{item.distance!=null}}"> | ||
| 1400 | + 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}}</view> | ||
| 1401 | + </view> | ||
| 1402 | + </view> | ||
| 1403 | + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view> | ||
| 1404 | + </view> | ||
| 1405 | + </view> | ||
| 1406 | + </view> | ||
| 1407 | + </block> | ||
| 1408 | + | ||
| 1409 | + </view> | ||
| 1410 | + | ||
| 1411 | + <!-- 门店列表底部 --> | ||
| 1412 | + <view class="store-bottom-frame"> | ||
| 1413 | + <view class="store-bottom flex-vertical-between"> | ||
| 1414 | + <view class="determine red-b fs28 white t-c" bindtap="sure_pick" | ||
| 1415 | + data-openindstore="{{open_ind_store}}">确定</view> | ||
| 1416 | + <view class="default t-c fs28" bindtap="set_def_pick"data-openindstore="{{open_ind_store}}">设为默认</view> | ||
| 1417 | + </view> | ||
| 1418 | + </view> | ||
| 1419 | + | ||
| 1420 | + </block> | ||
| 1421 | + | ||
| 1422 | + | ||
| 1423 | + <block wx:else> | ||
| 1424 | + <view class="popup-top flex-space-between"> | ||
| 1425 | + <text class="fs32 nearby_store">门店分类选择</text> | ||
| 1426 | + <view> | ||
| 1427 | + <view> | ||
| 1428 | + <icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon> | ||
| 1429 | + </view> | ||
| 1430 | + <view class="felx choose_mores" bindtap="returns"> | ||
| 1431 | + <text class="fs26 red-co">返回</text> | ||
| 1432 | + </view> | ||
| 1433 | + </view> | ||
| 1434 | + </view> | ||
| 1435 | + <view class="sort_store_list"> | ||
| 1436 | + | ||
| 1437 | + <view class="sort-store-frame" wx:for="{{all_sto}}" data-index="{{index}}" bindtap="choice_sort_store" data-region="{{item.name}}"> | ||
| 1438 | + <view class="sort-store flex-vertical-between" > | ||
| 1439 | + <view class="fs30" di>{{item.name}}</view> | ||
| 1440 | + <view class="black_rights-frame"> | ||
| 1441 | + <view class="black_rights"></view> | ||
| 1442 | + </view> | ||
| 1443 | + </view> | ||
| 1444 | + </view> | ||
| 1445 | + | ||
| 1446 | + </view> | ||
| 1447 | + </block> | ||
| 1448 | + </view> | ||
| 1449 | +</block> | ||
| 1450 | +<!-- ---------------分享弹窗--------------- --> | ||
| 1451 | +<!--二维码显示页面--> | ||
| 1452 | +<canvas canvas-id='share' style='width:750rpx;height:1217rpx;background-color:white;' wx:if='{{!canvasHidden}}'></canvas> | ||
| 1453 | +<warn id="warn"></warn> | ||
| 1454 | + | ||
| 1455 | + | ||
| 1456 | +<view wx:if="{{showPoster}}"> | ||
| 1457 | + <view class="mask" catchtap="closePoster"></view> | ||
| 1458 | + <view class="poster-container"> | ||
| 1459 | + <view class="poster-wrapper"> | ||
| 1460 | + <view class="poster"> | ||
| 1461 | + <!-- <view class="poster" bindtap="previewImage"> --> | ||
| 1462 | + <image src="{{shareImgPath}}" class="poster-img" show-menu-by-longpress></image> | ||
| 1463 | + <view class="btn-close" catchtap="closePoster"><text class="iconfont icon-close"></text></view> | ||
| 1464 | + </view> | ||
| 1465 | + <!-- <view class="btn-container"> | ||
| 1466 | + <button class="btn-share" open-type="share" bindtap="">微信好友分享</button> | ||
| 1467 | + <button class="btn-share" bindtap="savePic">保存到相册</button> | ||
| 1468 | + </view> --> | ||
| 1469 | + </view> | ||
| 1470 | + </view> | ||
| 1471 | +</view> | ||
| 1472 | + |
packageA/pages/goodsInfo/goodsInfo.wxss
0 → 100644
| 1 | +@import "../../../utils/wxParse/wxParse.wxss"; | ||
| 2 | +.container { margin-bottom: 100rpx; overflow: hidden;} | ||
| 3 | +image { | ||
| 4 | + vertical-align: top; | ||
| 5 | +} | ||
| 6 | +.goods-detail{overflow: hidden} | ||
| 7 | + | ||
| 8 | +.type-navbar { | ||
| 9 | + display: flex; | ||
| 10 | + justify-content: center; | ||
| 11 | + width: 100%; | ||
| 12 | + /* height: 80rpx; */ | ||
| 13 | + /* margin-bottom: 20rpx; */ | ||
| 14 | + background-color: #fff; | ||
| 15 | + /* border-bottom: 1rpx #fafafa solid; */ | ||
| 16 | +} | ||
| 17 | +.type-box { | ||
| 18 | + width: 25%; | ||
| 19 | + box-sizing: border-box; | ||
| 20 | + font-size: 28rpx; | ||
| 21 | + line-height: 76rpx; | ||
| 22 | + padding: 0 20rpx; | ||
| 23 | + text-align: center; | ||
| 24 | + display: inline-block; | ||
| 25 | + overflow: hidden; | ||
| 26 | +} | ||
| 27 | +.type-navbar-item { | ||
| 28 | + /* border-bottom: 4rpx solid #fff; */ | ||
| 29 | + display: flex; | ||
| 30 | + justify-content: center; | ||
| 31 | + width: 100%; | ||
| 32 | +} | ||
| 33 | +.type-item-on { | ||
| 34 | + color: #F95D74; | ||
| 35 | + font-weight: bold; | ||
| 36 | + /* border-bottom: 4rpx solid #F95D74; */ | ||
| 37 | + position: relative; | ||
| 38 | +} | ||
| 39 | +.type-item-on:after { | ||
| 40 | + content: ''; | ||
| 41 | + position: absolute; | ||
| 42 | + width: 50%; | ||
| 43 | + height: 4rpx; | ||
| 44 | + background-color: #F95D74; | ||
| 45 | + left: 0; | ||
| 46 | + right: 0; | ||
| 47 | + bottom: 0; | ||
| 48 | + margin: 0 auto; | ||
| 49 | +} | ||
| 50 | +.swiper_box { | ||
| 51 | + width: 100%; | ||
| 52 | + height: 750rpx; | ||
| 53 | +} | ||
| 54 | +.goods-title { | ||
| 55 | + display: flex; | ||
| 56 | + justify-content: space-between; overflow: hidden; | ||
| 57 | + /* height: 108rpx; */ | ||
| 58 | +} | ||
| 59 | +.goods-name { | ||
| 60 | + width: 560rpx; | ||
| 61 | + line-height: 46rpx; | ||
| 62 | + font-size: 32rpx; | ||
| 63 | + font-weight: bold; | ||
| 64 | + color: #333; | ||
| 65 | + margin-top: 30rpx; | ||
| 66 | + margin-bottom:30rpx; | ||
| 67 | + flex: 1; | ||
| 68 | + text-align: justify; | ||
| 69 | +} | ||
| 70 | + | ||
| 71 | +.goods-collect { | ||
| 72 | + width: 112rpx; | ||
| 73 | + padding-top: 30rpx; | ||
| 74 | +} | ||
| 75 | + | ||
| 76 | +.collect-img { | ||
| 77 | + width: 50rpx; | ||
| 78 | + height: 44rpx; | ||
| 79 | + margin: 0 auto; | ||
| 80 | + overflow: hidden; | ||
| 81 | +} | ||
| 82 | + | ||
| 83 | +.collect-des { | ||
| 84 | + text-align: center; | ||
| 85 | + font-size: 24rpx; | ||
| 86 | + color: #333; | ||
| 87 | +} | ||
| 88 | + | ||
| 89 | +.goods-price { | ||
| 90 | + font-size: 60rpx; | ||
| 91 | + /* padding: 20rpx 34rpx; */ | ||
| 92 | + padding:0rpx 34rpx; | ||
| 93 | + /* line-height: 60rpx; */ | ||
| 94 | + color: #999; | ||
| 95 | + | ||
| 96 | + /* margin-top: 46rpx; */ | ||
| 97 | + margin-top:26rpx; | ||
| 98 | + padding-bottom:20rpx; | ||
| 99 | +} | ||
| 100 | + | ||
| 101 | +.prom-info { | ||
| 102 | + margin: 10rpx 0; | ||
| 103 | + color: #f23030; | ||
| 104 | +} | ||
| 105 | + | ||
| 106 | +.prom-info>.prom-type { | ||
| 107 | + color: white; | ||
| 108 | + background-color: #f23030; | ||
| 109 | + margin-right: 14rpx; | ||
| 110 | + padding: 2rpx 8rpx; | ||
| 111 | + border-radius: 4rpx; | ||
| 112 | +} | ||
| 113 | +.market-price { | ||
| 114 | + display: flex; | ||
| 115 | + margin-left: -5rpx; | ||
| 116 | +} | ||
| 117 | + | ||
| 118 | +.market-price .yuan{ | ||
| 119 | + top:24rpx; | ||
| 120 | + font-size: 36rpx | ||
| 121 | +} | ||
| 122 | + | ||
| 123 | +.market-price>view>text { | ||
| 124 | + text-decoration: line-through; | ||
| 125 | +} | ||
| 126 | + | ||
| 127 | +.market-price>.yj{ | ||
| 128 | + color: #999999; font-size: 26rpx;margin-left: 16rpx;position: relative;top:30rpx; | ||
| 129 | +} | ||
| 130 | + | ||
| 131 | +.goods-price>.tm{ color: #999999; font-size: 26rpx;margin-top: 10rpx;} | ||
| 132 | + | ||
| 133 | +.goods-num { | ||
| 134 | + display: flex; | ||
| 135 | + font-size: 24rpx; | ||
| 136 | + justify-content: space-between; | ||
| 137 | +} | ||
| 138 | + | ||
| 139 | +.goods-detail .twen{ | ||
| 140 | + background: #fff;height: 60rpx; line-height: 60rpx; font-size: 30rpx;padding-left: 30rpx;display: flex; | ||
| 141 | +} | ||
| 142 | +.goods-detail .twen .img{ width: 32rpx; height: 32rpx; margin-left: 200rpx; background: #fff} | ||
| 143 | +.goods-detail .twen image.img{vertical-align:auto;} | ||
| 144 | + | ||
| 145 | + | ||
| 146 | +.logistics-item { | ||
| 147 | + display: flex; | ||
| 148 | + justify-content: space-between; | ||
| 149 | + align-items: center; | ||
| 150 | + height: 90rpx; | ||
| 151 | + /*border-bottom: 1px solid #f5f5f5;*/ | ||
| 152 | + font-size: 32rpx; | ||
| 153 | + color: #666; | ||
| 154 | +} | ||
| 155 | +.logistics-item .small{color: #999; font-size: 24rpx;} | ||
| 156 | + | ||
| 157 | +.item-title { width: 180rpx;} | ||
| 158 | +.item-mes { | ||
| 159 | + color: #333; width: 420rpx; | ||
| 160 | + height: 90rpx; line-height: 90rpx; | ||
| 161 | +} | ||
| 162 | +.item-img { width: 32rpx; height: 32rpx;} | ||
| 163 | +.prom-item { | ||
| 164 | + color: #f23030; | ||
| 165 | + border: 1px solid #f23030; | ||
| 166 | + border-radius: 18rpx; | ||
| 167 | + line-height: 40rpx; | ||
| 168 | + height: 40rpx; | ||
| 169 | + padding: 2rpx 8rpx; | ||
| 170 | +} | ||
| 171 | + | ||
| 172 | +.guarantee { | ||
| 173 | + justify-content: space-around; | ||
| 174 | +} | ||
| 175 | + | ||
| 176 | +.ico-item { | ||
| 177 | + width: 32rpx; | ||
| 178 | + height: 32rpx; | ||
| 179 | + margin-right: 10rpx; | ||
| 180 | +} | ||
| 181 | + | ||
| 182 | +.guarantee>view { | ||
| 183 | + display: flex; | ||
| 184 | + align-items: center; | ||
| 185 | + height: 32rpx; | ||
| 186 | + color: #666; | ||
| 187 | +} | ||
| 188 | + | ||
| 189 | +.user-comment { | ||
| 190 | + margin: 10rpx 0; | ||
| 191 | + font-size: 28rpx; | ||
| 192 | +} | ||
| 193 | + | ||
| 194 | +.good-comment,.comment-num { | ||
| 195 | + display: flex; | ||
| 196 | +} | ||
| 197 | + | ||
| 198 | +.recommend { | ||
| 199 | + background-color: #fff; | ||
| 200 | + border-bottom: 1px solid #ddd; | ||
| 201 | + padding-bottom: 20rpx; | ||
| 202 | +} | ||
| 203 | + | ||
| 204 | +.recommend-title { | ||
| 205 | + height: 70rpx; | ||
| 206 | + line-height: 70rpx; | ||
| 207 | + font-size: 28rpx; | ||
| 208 | + padding: 0 30rpx; | ||
| 209 | +} | ||
| 210 | + | ||
| 211 | +.recommend-ul { | ||
| 212 | + display: flex; | ||
| 213 | + justify-content: flex-start; | ||
| 214 | +} | ||
| 215 | + | ||
| 216 | +.recommend-ul .li { | ||
| 217 | + width: 25%; | ||
| 218 | + box-sizing: border-box; | ||
| 219 | + text-align: center; | ||
| 220 | + font-size: 28rpx; | ||
| 221 | + color: #333; | ||
| 222 | +} | ||
| 223 | + | ||
| 224 | +.li-img { | ||
| 225 | + width: 120rpx; | ||
| 226 | + height: 120rpx; | ||
| 227 | + margin: 0 auto; | ||
| 228 | +} | ||
| 229 | + | ||
| 230 | +.li-title { | ||
| 231 | + height: 58rpx; | ||
| 232 | + line-height: 30rpx; | ||
| 233 | + margin: 10rpx 0; | ||
| 234 | +} | ||
| 235 | + | ||
| 236 | +.comment-item { | ||
| 237 | + background-color: #fff; | ||
| 238 | + font-size: 28rpx; | ||
| 239 | +} | ||
| 240 | + | ||
| 241 | +.comment-title { | ||
| 242 | + display: flex; | ||
| 243 | + justify-content: space-between; | ||
| 244 | + align-items: center; | ||
| 245 | + height: 102rpx; | ||
| 246 | + margin: 0 30rpx; | ||
| 247 | + color: #333; | ||
| 248 | + border-bottom: 1px solid #eee; | ||
| 249 | +} | ||
| 250 | + | ||
| 251 | +.user-name { | ||
| 252 | + display: flex; | ||
| 253 | + align-items: center; | ||
| 254 | +} | ||
| 255 | + | ||
| 256 | +.user-pic { | ||
| 257 | + width: 54rpx; | ||
| 258 | + height: 54rpx; | ||
| 259 | + margin-right: 10rpx; | ||
| 260 | + border-radius: 50%; | ||
| 261 | + overflow: hidden; | ||
| 262 | +} | ||
| 263 | + | ||
| 264 | +.stars { | ||
| 265 | + float: left; | ||
| 266 | + display: flex; | ||
| 267 | + height: 42rpx; | ||
| 268 | + line-height: 42rpx; | ||
| 269 | + margin: 15rpx 0; | ||
| 270 | + width: 200rpx; | ||
| 271 | +} | ||
| 272 | + | ||
| 273 | +.star { | ||
| 274 | + width: 26rpx; | ||
| 275 | + height: 26rpx; | ||
| 276 | + margin-right: 5rpx; | ||
| 277 | +} | ||
| 278 | + | ||
| 279 | +.state-spec { | ||
| 280 | + margin: 15rpx 0; | ||
| 281 | + float: right; | ||
| 282 | + font-size: 24rpx; | ||
| 283 | + color: #666; | ||
| 284 | + width: 460rpx; | ||
| 285 | + text-align: right; | ||
| 286 | +} | ||
| 287 | + | ||
| 288 | +.comment-cont { | ||
| 289 | + padding: 0 30rpx 30rpx; | ||
| 290 | + border-bottom: 1px solid #eee; | ||
| 291 | +} | ||
| 292 | + | ||
| 293 | +.comment-mes { | ||
| 294 | + line-height: 42rpx; | ||
| 295 | +} | ||
| 296 | + | ||
| 297 | +.img-ul { | ||
| 298 | + display: flex; | ||
| 299 | + flex-wrap: wrap; | ||
| 300 | +} | ||
| 301 | + | ||
| 302 | +.img-li { | ||
| 303 | + width: 150rpx; | ||
| 304 | + height: 150rpx; | ||
| 305 | + margin-top: 8rpx; | ||
| 306 | + margin-right: 10rpx; | ||
| 307 | +} | ||
| 308 | + | ||
| 309 | +.comment-btn { | ||
| 310 | + height: 60rpx; | ||
| 311 | + padding: 20rpx 30rpx; | ||
| 312 | +} | ||
| 313 | + | ||
| 314 | +.comment-btn .btn { | ||
| 315 | + display: flex; | ||
| 316 | + justify-content: center; | ||
| 317 | + align-items: center; | ||
| 318 | + height: 60rpx; | ||
| 319 | + width: 45%; | ||
| 320 | + border: 1px solid #eee; | ||
| 321 | +} | ||
| 322 | + | ||
| 323 | +.comment-btn .btn-img { | ||
| 324 | + width: 30rpx; | ||
| 325 | + height: 28rpx; | ||
| 326 | + margin: 0 10rpx; | ||
| 327 | +} | ||
| 328 | + | ||
| 329 | +.reply-ul { | ||
| 330 | + margin-top: 20rpx; | ||
| 331 | +} | ||
| 332 | + | ||
| 333 | +.reply-li { | ||
| 334 | + color: #aaa; | ||
| 335 | +} | ||
| 336 | + | ||
| 337 | +.join-cart { | ||
| 338 | + position: fixed; | ||
| 339 | + left: 0; | ||
| 340 | + bottom: 0; | ||
| 341 | + display: flex; | ||
| 342 | + width: 100%; | ||
| 343 | + height: 100rpx; | ||
| 344 | + background-color: #fff; | ||
| 345 | + z-index: 9; | ||
| 346 | + border-top: 4rpx solid #eee; | ||
| 347 | + | ||
| 348 | +} | ||
| 349 | + | ||
| 350 | +.join-cart>view { | ||
| 351 | + width: 29%; | ||
| 352 | +} | ||
| 353 | + | ||
| 354 | +.join-cart>.new_split { | ||
| 355 | + width: 13%; | ||
| 356 | + text-align: center; | ||
| 357 | + padding: 0; | ||
| 358 | + margin: 0; | ||
| 359 | +} | ||
| 360 | + | ||
| 361 | +.cart-ico { | ||
| 362 | + font-size: 24rpx; | ||
| 363 | + color: #333; | ||
| 364 | +} | ||
| 365 | + | ||
| 366 | +.shopping-cart { | ||
| 367 | + position: relative; | ||
| 368 | +} | ||
| 369 | + | ||
| 370 | +.cs-img { | ||
| 371 | + width: 45rpx; | ||
| 372 | + height: 40rpx; | ||
| 373 | + margin-top: 15rpx; | ||
| 374 | +} | ||
| 375 | + | ||
| 376 | +.sc-img { | ||
| 377 | + width: 42rpx; | ||
| 378 | + height: 40rpx; | ||
| 379 | + margin-top: 15rpx; | ||
| 380 | +} | ||
| 381 | + | ||
| 382 | +.cart-num { | ||
| 383 | + position: absolute; | ||
| 384 | + left: 50%; | ||
| 385 | + top: 1rpx; | ||
| 386 | + width: 40rpx; | ||
| 387 | + height: 40rpx; | ||
| 388 | + line-height: 40rpx; | ||
| 389 | + text-align: center; | ||
| 390 | + border-radius: 50%; | ||
| 391 | + color: #fff; | ||
| 392 | + background-color: rgba(217,81,99,0.9); | ||
| 393 | +} | ||
| 394 | + | ||
| 395 | +.cart-btn { | ||
| 396 | + font-size: 28rpx; | ||
| 397 | + color: #fff; | ||
| 398 | + line-height: 70rpx; | ||
| 399 | + margin-top: 16rpx; | ||
| 400 | + text-align: center; | ||
| 401 | + | ||
| 402 | + | ||
| 403 | +} | ||
| 404 | + | ||
| 405 | +.join-btn { | ||
| 406 | + background-color: #ffb03f; | ||
| 407 | + height: 70rpx; | ||
| 408 | +border-radius: 55rpx 0rpx 0rpx 55rpx; | ||
| 409 | +margin-top: 16rpx; | ||
| 410 | + | ||
| 411 | + | ||
| 412 | +} | ||
| 413 | + | ||
| 414 | +view.cart-btn-lg { | ||
| 415 | + width: 50%; | ||
| 416 | +} | ||
| 417 | + | ||
| 418 | +.buy-btn { | ||
| 419 | + background-color: #f23030; | ||
| 420 | + height: 70rpx; | ||
| 421 | +border-radius: 0 56rpx 55rpx 0; | ||
| 422 | + | ||
| 423 | +} | ||
| 424 | + | ||
| 425 | +.buy-btn-all{ | ||
| 426 | + background-color: #f23030; | ||
| 427 | + height: 70rpx; | ||
| 428 | + border-radius: 56rpx; | ||
| 429 | +} | ||
| 430 | + | ||
| 431 | + | ||
| 432 | +.toTop { | ||
| 433 | + position: fixed; | ||
| 434 | + z-index: 3; | ||
| 435 | + right: 20rpx; | ||
| 436 | + bottom: 160rpx; | ||
| 437 | + width: 68rpx; | ||
| 438 | + height: 68rpx; | ||
| 439 | + border: 1px solid #ddd; | ||
| 440 | + border-radius: 50%; | ||
| 441 | + overflow: hidden; | ||
| 442 | + cursor: pointer; | ||
| 443 | +} | ||
| 444 | + | ||
| 445 | +.comment-more { | ||
| 446 | + height: 56rpx; | ||
| 447 | + line-height: 56rpx; | ||
| 448 | + font-size: 26rpx; | ||
| 449 | + color: #999; | ||
| 450 | + text-align: center; | ||
| 451 | + background-color: #eee; | ||
| 452 | +} | ||
| 453 | + | ||
| 454 | +.goods-more { | ||
| 455 | + background-color: #fff; | ||
| 456 | +} | ||
| 457 | + | ||
| 458 | +.goods-norms { | ||
| 459 | + background-color: #fff; | ||
| 460 | +} | ||
| 461 | + | ||
| 462 | +.type-navbar2 { | ||
| 463 | + display: flex; | ||
| 464 | + height: 72rpx; | ||
| 465 | + border-top: 1px solid #ddd; | ||
| 466 | + border-bottom: 1px solid #ddd; | ||
| 467 | +} | ||
| 468 | + | ||
| 469 | +.type-box2 { | ||
| 470 | + width: 50%; | ||
| 471 | + font-size: 26rpx; | ||
| 472 | + line-height: 72rpx; | ||
| 473 | + text-align: center; | ||
| 474 | + overflow: hidden; | ||
| 475 | +} | ||
| 476 | + | ||
| 477 | +.type-item2-on { | ||
| 478 | + color: #f23030; | ||
| 479 | +} | ||
| 480 | + | ||
| 481 | +.parameter { | ||
| 482 | + padding: 40rpx 0; | ||
| 483 | +} | ||
| 484 | + | ||
| 485 | +.table { | ||
| 486 | + width: 698rpx; | ||
| 487 | + margin: 0 auto; | ||
| 488 | + border: 1px solid #ddd; | ||
| 489 | + border-bottom: none; | ||
| 490 | +} | ||
| 491 | + | ||
| 492 | +.tb { | ||
| 493 | + width: 100%; | ||
| 494 | + min-height: 69rpx; | ||
| 495 | + line-height: 69rpx; | ||
| 496 | + border-bottom: 1px solid #ddd; | ||
| 497 | + font-size: 28rpx; | ||
| 498 | + text-align: center; | ||
| 499 | + color: #333; | ||
| 500 | +} | ||
| 501 | + | ||
| 502 | +.th-thitle { | ||
| 503 | + font-weight: bold; | ||
| 504 | + background-color: #f5fafe; | ||
| 505 | +} | ||
| 506 | + | ||
| 507 | +.td-cont { | ||
| 508 | + display: flex; | ||
| 509 | +} | ||
| 510 | + | ||
| 511 | +.td-title { | ||
| 512 | + width: 259rpx; | ||
| 513 | + background-color: #f5fafe; | ||
| 514 | + border-right: 1px solid #ddd; | ||
| 515 | +} | ||
| 516 | + | ||
| 517 | +.td-text { | ||
| 518 | + width: 439rpx; | ||
| 519 | +} | ||
| 520 | + | ||
| 521 | +.goods-comment { | ||
| 522 | + background-color: #fff; | ||
| 523 | +} | ||
| 524 | + | ||
| 525 | +.type-navbar3 { | ||
| 526 | + display: flex; | ||
| 527 | + height: 88rpx; | ||
| 528 | + border-top: 1px solid #ddd; | ||
| 529 | + border-bottom: 1px solid #ddd; | ||
| 530 | + padding: 10rpx 0; | ||
| 531 | +} | ||
| 532 | + | ||
| 533 | +.type-box3 { | ||
| 534 | + width: 20%; | ||
| 535 | + font-size: 30rpx; | ||
| 536 | + line-height: 44rpx; | ||
| 537 | + text-align: center; | ||
| 538 | + overflow: hidden; | ||
| 539 | +} | ||
| 540 | + | ||
| 541 | +.type-item3-on { | ||
| 542 | + color: #f23030; | ||
| 543 | +} | ||
| 544 | + | ||
| 545 | +.spec-model { | ||
| 546 | + position: fixed; | ||
| 547 | + bottom: 0; | ||
| 548 | + z-index: 20; | ||
| 549 | + background: white; | ||
| 550 | + width: 100%; | ||
| 551 | + /* padding: 0 30rpx; */ | ||
| 552 | + font-size: 32rpx; | ||
| 553 | + box-sizing: border-box; | ||
| 554 | + border-radius: 20rpx; | ||
| 555 | + /* height: 72%; */ | ||
| 556 | +} | ||
| 557 | + | ||
| 558 | +.spec-model .pding{padding: 0 30rpx;} | ||
| 559 | + | ||
| 560 | +.spec-goods { | ||
| 561 | + padding: 30rpx 0 20rpx; | ||
| 562 | + /* float: left; */ | ||
| 563 | + display: flex; | ||
| 564 | + width: 100%; | ||
| 565 | + border-bottom:2rpx solid #eee; | ||
| 566 | +} | ||
| 567 | + | ||
| 568 | +.spec-img { | ||
| 569 | + /* float: left; */ | ||
| 570 | + height: 186rpx; | ||
| 571 | + width: 186rpx; | ||
| 572 | + border: 4rpx solid #eee | ||
| 573 | +} | ||
| 574 | + | ||
| 575 | +.spec-goods-info { | ||
| 576 | + /* float: left; */ | ||
| 577 | + padding: 0 25rpx; | ||
| 578 | + width: 400rpx; | ||
| 579 | +} | ||
| 580 | + | ||
| 581 | +.spec-goods-name { | ||
| 582 | + font-size: 30rpx; | ||
| 583 | + line-height: 35rpx; | ||
| 584 | + height: 70rpx; | ||
| 585 | + margin: 15rpx 20rpx 25rpx 0; | ||
| 586 | + overflow: hidden; | ||
| 587 | + text-overflow: ellipsis;color: #333; | ||
| 588 | +} | ||
| 589 | + | ||
| 590 | +.spec-goods-price { | ||
| 591 | + color: #d60021; | ||
| 592 | + font-size: 33rpx; | ||
| 593 | + font-weight: bold; | ||
| 594 | +} | ||
| 595 | + | ||
| 596 | +.spec-goods-stock { | ||
| 597 | + margin-top: 3rpx; | ||
| 598 | + font-size: 24rpx; | ||
| 599 | + color: #999999; | ||
| 600 | + margin-right: 15rpx; | ||
| 601 | +} | ||
| 602 | + | ||
| 603 | +.spec-name { | ||
| 604 | + clear: both; | ||
| 605 | + padding: 20rpx 0; | ||
| 606 | + font-size: 30rpx;color: #333; | ||
| 607 | +} | ||
| 608 | + | ||
| 609 | +.quhuo{font-size: 30rpx; color: #000} | ||
| 610 | +.b_num{ | ||
| 611 | + display: flex; | ||
| 612 | + font-size: 30rpx; | ||
| 613 | + color: #333; | ||
| 614 | + padding: 20rpx; | ||
| 615 | +} | ||
| 616 | + | ||
| 617 | +.count { | ||
| 618 | + position: fixed; | ||
| 619 | + display: flex; | ||
| 620 | + height: 50rpx; | ||
| 621 | + border: 1rpx solid #000; | ||
| 622 | + font-size: 28rpx; | ||
| 623 | + right: 30rpx; | ||
| 624 | +} | ||
| 625 | + | ||
| 626 | + | ||
| 627 | +.count>view,.count>input { | ||
| 628 | + width: 60rpx; | ||
| 629 | + height: 50rpx; | ||
| 630 | + line-height: 50rpx; | ||
| 631 | + text-align: center; | ||
| 632 | +} | ||
| 633 | +.spec_bt{ | ||
| 634 | + background: fff;color: #333; margin-left: 10rpx;padding: 4rpx 15rpx 4rpx; display: inline-block; | ||
| 635 | + border-radius:30rpx;font-size: 24rpx;border: 1rpx solid #ccc; margin: 10rpx; height: 40rpx; line-height: 40rpx; | ||
| 636 | +} | ||
| 637 | +.spec_bt.act{background: #d60021;color: #fff;border: 1rpx solid #d60021;} | ||
| 638 | +.sub { | ||
| 639 | + border-right: 1px solid #000; | ||
| 640 | +} | ||
| 641 | + | ||
| 642 | +.add { | ||
| 643 | + border-left: 1px solid #000; | ||
| 644 | +} | ||
| 645 | + | ||
| 646 | +.spec-btn { | ||
| 647 | + color: black; | ||
| 648 | + background-color: white; | ||
| 649 | + padding: 10rpx 10rpx; | ||
| 650 | + font-size: 26rpx; | ||
| 651 | + line-height: 28rpx; | ||
| 652 | + float: left; | ||
| 653 | + border: 1rpx solid #dedede; | ||
| 654 | + margin: 4rpx 10rpx 4rpx 0; | ||
| 655 | + border-radius: 4rpx; | ||
| 656 | +} | ||
| 657 | + | ||
| 658 | +.spec-btn-click { | ||
| 659 | + color: white; | ||
| 660 | + background-color: #f23030; | ||
| 661 | + border: 1rpx solid #f23030; | ||
| 662 | +} | ||
| 663 | + | ||
| 664 | +.spec-cart-btns { | ||
| 665 | + width: 92%; | ||
| 666 | + line-height: 70rpx; | ||
| 667 | + margin: 20rpx auto; | ||
| 668 | + /* margin-top: 160rpx; */ | ||
| 669 | + border-radius: 20rpx; | ||
| 670 | +/* position: fixed; | ||
| 671 | +bottom: 50rpx; | ||
| 672 | +left: 4%; */ | ||
| 673 | +} | ||
| 674 | + | ||
| 675 | +.spec-cart-btn { | ||
| 676 | + | ||
| 677 | + width:100%; | ||
| 678 | + font-size: 30rpx; | ||
| 679 | + text-align: center; | ||
| 680 | + color: white; | ||
| 681 | + border-radius: 40rpx; | ||
| 682 | +} | ||
| 683 | + | ||
| 684 | +.spec-cart-btn.w40 { | ||
| 685 | + width: 46%; | ||
| 686 | +} | ||
| 687 | + | ||
| 688 | +.spec-add-cart { | ||
| 689 | + background-color: #ffb03f; | ||
| 690 | +} | ||
| 691 | + | ||
| 692 | +.spec-buy { | ||
| 693 | + background-color: #f23030; | ||
| 694 | + /* margin-left: 34rpx; */ | ||
| 695 | +} | ||
| 696 | + | ||
| 697 | +.spec-cart-disable { | ||
| 698 | + background: #bbbbbb; | ||
| 699 | +} | ||
| 700 | + | ||
| 701 | +.spec-cart-btn-lg { | ||
| 702 | + width: 614rpx; | ||
| 703 | +} | ||
| 704 | + | ||
| 705 | +.prom-model { | ||
| 706 | + position: fixed; | ||
| 707 | + bottom: 0; | ||
| 708 | + z-index: 20; | ||
| 709 | + background: white; | ||
| 710 | + width: 100%; | ||
| 711 | + padding: 0 30rpx 30rpx; | ||
| 712 | + font-size: 32rpx; | ||
| 713 | + box-sizing: border-box; | ||
| 714 | + overflow-x: hidden; | ||
| 715 | +} | ||
| 716 | + | ||
| 717 | +.prom-model .prom-title {text-align: center;margin: 30rpx 0;} | ||
| 718 | +.prom-model .logistics-item {border: 0;} | ||
| 719 | +.prom-model .item-mes {width: 500rpx;} | ||
| 720 | +.integral-btn {width: 100%; padding: 0rpx;margin: 0rpx;} | ||
| 721 | +.clear{clear: both;} | ||
| 722 | +.sto_v .title,.sto_v .stitle{ border-top: 1rpx solid #dedede;border-bottom: 1rpx solid #dedede; height: 78rpx; line-height: 78rpx;} | ||
| 723 | +.sto_v .title .tubiao,.sto_v .stitle .tubiao{width: 32rpx; height: 32rpx; margin-top: 23rpx;} | ||
| 724 | +.itemlists .item{border-bottom: 1rpx solid #dedede; height: 72rpx; line-height: 72rpx;font-size: 28rpx; margin: 0 10rpx;} | ||
| 725 | + | ||
| 726 | +.cshu{margin-bottom: 30rpx; margin-top: 20rpx;} | ||
| 727 | +.cshu view{color: #999; font-size: 30rpx; margin-left: 26rpx;} | ||
| 728 | + | ||
| 729 | + | ||
| 730 | +/*---活动特殊显示---*/ | ||
| 731 | +.prom_show{height: 120rpx; display: flex;} | ||
| 732 | +.prom_show .secondkill-img{width: 100%; height: 100%;} | ||
| 733 | +.prom_show .spike-img{width: 283rpx; height: 57rpx; top:35rpx; | ||
| 734 | +left:31rpx;} | ||
| 735 | +.prom_show .stop{ color:#d81731;top: 17rpx;right:65rpx; font-weight:600;} | ||
| 736 | +.prom_show .start{ color:#009ae2;top: 17rpx;right:65rpx; font-weight:600;} | ||
| 737 | +.prom_show .timeac { font-size: 32rpx; height: 120rpx; color: #333; } | ||
| 738 | +.prom_show .timeac.left{width: 66%; color: #fff;background:#f23030;} | ||
| 739 | +.prom_show .timeac.right{width: 34%;background-color: #d7d7d7; text-align: center} | ||
| 740 | + | ||
| 741 | +.prom_show .secview .day{padding-right:10rpx;} | ||
| 742 | +.prom_show .secview .time-val{width:36rpx;height:36rpx;border-radius:7rpx; line-height: 36rpx;} | ||
| 743 | +.prom_show .secview .time{margin-right:10rpx; margin-left:10rpx;} | ||
| 744 | + | ||
| 745 | + | ||
| 746 | +.prom_show .timeac.left view{ margin-left: 20rpx} | ||
| 747 | +.prom_show .timeac.left view.firview{margin-top: 10rpx} | ||
| 748 | +.prom_show .timeac.left view .tr_line{ text-decoration: line-through; font-size: 28rpx;} | ||
| 749 | +.prom_show .timeac.left view .bprice{ font-size: 50rpx; } | ||
| 750 | + | ||
| 751 | +.prom_show .timeac.right view.firview{margin-top:12rpx; margin-bottom: 10rpx} | ||
| 752 | +.prom_show .timeac.right view.secview{display: flex; text-align: center; justify-content:center; flex-direction: row;} | ||
| 753 | +.prom_show .timeac.right view .tui-conutdown-box{ | ||
| 754 | + /* background: #6b6b6b; */ | ||
| 755 | + width: auto; | ||
| 756 | + /* min-width: 45rpx; */ | ||
| 757 | + height: 45rpx; color: #c4182e; font-size: 27rpx; text-align: center; line-height: 46rpx;} | ||
| 758 | + | ||
| 759 | +.huise{ background:gray} | ||
| 760 | +.lanse{background:#0199e2} | ||
| 761 | + | ||
| 762 | + | ||
| 763 | +/*------拼单------*/ | ||
| 764 | +.pt_view{ text-align: center; width: 100%; height: 100rpx; line-height: 100rpx; font-size: 26rpx} | ||
| 765 | +.pt_view .secondkill-img{width: 100%;height: 100%;} | ||
| 766 | +.pt_fir{ background: #fff;margin-bottom: 10rpx; } | ||
| 767 | +.pt_fir .pt_fir_title{display: flex; align-items: center; margin-left: 10rpx; margin-top: 20rpx; font-size: 28rpx; position: relative;} | ||
| 768 | +.pt_fir .pt_fir_title .kt_type{ color: #fff;background:#e9030d; width: 100rpx; line-height: 40rpx; border-radius: 6rpx; margin: 0 10rpx; | ||
| 769 | + height: 40rpx; font-size: 24rpx; text-align: center;} | ||
| 770 | +.pt_fir .pt_fir_title .price{color: #e9030d;font-size: 26rpx;} | ||
| 771 | +.pt_fir .pt_fir_title .bigw{font-size: 36rpx;} | ||
| 772 | +.pt_fir .pt_fir_title .tprice{text-decoration: line-through;color: #949494} | ||
| 773 | +.pt_fir .pt_fir_title .tprice.ml50{margin-left: 50rpx} | ||
| 774 | + | ||
| 775 | +.pt_fir .pt_fir_title .js{padding: 0 15rpx;height: 40rpx;background:#e9030d; text-align: center; border-radius: 8rpx; color: #fff; margin-left: 10rpx;} | ||
| 776 | +.pt_fir .pt_fir_title .tuannum{color: #e9030d; position: absolute; right: 20rpx; font-size: 26rpx;} | ||
| 777 | +.pding{padding-top: 20rpx;padding-left: 20rpx;height: 81%; | ||
| 778 | + padding-right: 20rpx;font-size: 26rpx;color: #ea120f} | ||
| 779 | +.pdres{margin-left: 10rpx;color: #8f8f94} | ||
| 780 | +.ptgz{position: relative;font-size: 30rpx;padding-left: 20rpx;margin-top: 10rpx; overflow: hidden } | ||
| 781 | +.shuxian{width: 6rpx;height: 28rpx; background: #ea120f; display: inline-block;top: 5rpx;position: relative; margin-right: 5rpx} | ||
| 782 | +.ptgz_an{position: absolute;top:5rpx; right: 6rpx} | ||
| 783 | +.ptgz_an .arrow-two{width:18rpx;height:18rpx;border-color:#da0b31; margin-top:30rpx;} | ||
| 784 | + | ||
| 785 | +.pt_fir.se{height: auto; margin-bottom: 10rpx} | ||
| 786 | +.t_gz{padding: 10rpx 20rpx; font-size:28rpx } | ||
| 787 | + | ||
| 788 | +.pt_fir.se1{height: auto; margin: 0} | ||
| 789 | +.pt_fir.se2{height: auto; margin: 0;border-top:6rpx solid #eeeeee;border-bottom:2rpx solid #eeeeee;} | ||
| 790 | + | ||
| 791 | +.pt_hb{height:78rpx; line-height: 75rpx; position: relative; font-size: 32rpx;overflow: hidden;width:695rpx;margin-left:28rpx; | ||
| 792 | + border-bottom: 1rpx solid #E5E5E5 } | ||
| 793 | +.ptgz_an.xq{font-size: 32rpx; color:#d40024} | ||
| 794 | +.wf{display: flex; padding: 20rpx 0;} | ||
| 795 | +.wf .item{width: 24.5%; text-align: center; font-size: 26rpx; color: #666} | ||
| 796 | +.wf .item .item_txy{position: relative;width: 60rpx; height: 60rpx; background: #ea120f; border-radius: 50%;left: 50%;margin-left: -30rpx; | ||
| 797 | + border: 3px #dfdfdf solid; text-align: center;line-height: 60rpx; color: #fff; margin-bottom: 10rpx;} | ||
| 798 | +.wf .item .item_txy.hs{ background: #cbcbcb;} | ||
| 799 | +.po{margin-bottom: 20rpx;} | ||
| 800 | + | ||
| 801 | +.cart-btn.line-h{ line-height: 26rpx;} | ||
| 802 | +.cart-btn .fir-v{ margin-top: 10rpx;} | ||
| 803 | + | ||
| 804 | +.hyt{ padding: 0 20rpx; font-size: 30rpx; display: flex; align-items:center; margin-top: 10rpx;} | ||
| 805 | +.hyt .r_f{color: #e9120f;font-size: 26rpx;position: relative;top:3rpx} | ||
| 806 | +.hyt .byj{color: #e9120f;font-size: 32rpx;position: relative;top:5rpx} | ||
| 807 | + | ||
| 808 | +.pt_fir .pt_fir_title.no-mar-b{margin-bottom: 0;padding-bottom: 10rpx; margin-left: 20rpx} | ||
| 809 | +.pt_fir .pt_fir_title.boder-1{border-bottom: 1rpx #e7e7e7 solid} | ||
| 810 | + | ||
| 811 | +.jie_price{padding: 10rpx 30rpx;} | ||
| 812 | +.jie_price_title{font-size: 30rpx; color: #a26270; margin-bottom: 10rpx} | ||
| 813 | +.price_list{display: flex; width: 100%;} | ||
| 814 | +.price_item{width: 25%;font-size: 28rpx; color: #4c336c} | ||
| 815 | + | ||
| 816 | +.pt_fir.se2 .zzk-1{margin-top: 23rpx; font-size: 30rpx;position: relative; margin-bottom: 30rpx; border-left:4rpx solid red;margin-left:14rpx;height:30rpx;line-height:30rpx;padding-left:5rpx;} | ||
| 817 | +.ckgd{position: absolute;top:0;right:57rpx; color:#d70025; font-size: 32rpx;} | ||
| 818 | +.ckgd .arrow-one{width:18rpx;height:18rpx;border-color:#da0b31;margin-top:5rpx;} | ||
| 819 | +.bview{ | ||
| 820 | + position: fixed; top:0; left:0; width: 100%; height: 100%; | ||
| 821 | + background-color: rgba(0, 0, 0, 0.5); | ||
| 822 | +} | ||
| 823 | +.juzhong{ | ||
| 824 | + position: fixed; top:0; left:0; width: 100%; height: 100%; | ||
| 825 | + display: flex; | ||
| 826 | + flex-direction:row; | ||
| 827 | + justify-content: center; | ||
| 828 | + align-items: center; | ||
| 829 | +} | ||
| 830 | + | ||
| 831 | +.juzhong .xq{ padding: 0 20rpx; background: #fff; font-size: 30rpx; padding-bottom: 20rpx;} | ||
| 832 | +.juzhong .xq .title{text-align: center; margin: 20rpx 0; position: relative; height: 50rpx;} | ||
| 833 | +.juzhong .xq .hs1{font-size: 28rpx; color: #ab8f9e} | ||
| 834 | +.juzhong .xq .title .close{position: absolute;top: 0; right: 0; width: 45rpx; height: 45rpx;} | ||
| 835 | + | ||
| 836 | +.pt_qd{margin-top: 40rpx; height: auto;} | ||
| 837 | +.spec-cart-btn.w100{width: 95%; margin-left: 0; height: 75rpx; line-height:75rpx;margin: auto; } | ||
| 838 | + | ||
| 839 | +.sto_v{color: #333;} | ||
| 840 | +.ellipsis{overflow: hidden; white-space: nowrap; text-overflow: ellipsis;} | ||
| 841 | + | ||
| 842 | + | ||
| 843 | +/*---多少人参加团--*/ | ||
| 844 | +.group { | ||
| 845 | + padding-top:25rpx; | ||
| 846 | + width: 91%; | ||
| 847 | + min-height: 92rpx; | ||
| 848 | + border-bottom:2rpx solid #eee; | ||
| 849 | + padding-bottom:25rpx; | ||
| 850 | + | ||
| 851 | +} | ||
| 852 | + | ||
| 853 | +.group .group-list { | ||
| 854 | + | ||
| 855 | + height: 90rpx; | ||
| 856 | + padding: 0 130rpx 0 100rpx; | ||
| 857 | + width: 470rpx; | ||
| 858 | + | ||
| 859 | + position: absolute; | ||
| 860 | +} | ||
| 861 | + | ||
| 862 | +.group .group-list .gtou { | ||
| 863 | + width: 80rpx; | ||
| 864 | + height: 80rpx; | ||
| 865 | + float: left; | ||
| 866 | + position: relative; | ||
| 867 | + top: 6rpx; | ||
| 868 | + left: -96rpx; | ||
| 869 | +} | ||
| 870 | + | ||
| 871 | +.group .group-list .gtou image { | ||
| 872 | + width: 80rpx; | ||
| 873 | + height: 80rpx; | ||
| 874 | + border-radius: 200rpx; | ||
| 875 | + background-color: green; | ||
| 876 | +} | ||
| 877 | + | ||
| 878 | +.group .group-list .gdn { | ||
| 879 | + float: left; | ||
| 880 | + font-size: 26rpx; | ||
| 881 | + line-height: 48rpx; | ||
| 882 | + height: 48rpx; | ||
| 883 | + width: 168rpx; | ||
| 884 | + position: relative; | ||
| 885 | + left: -80rpx; | ||
| 886 | + top:20rpx; | ||
| 887 | + font-weight:600; | ||
| 888 | +} | ||
| 889 | + | ||
| 890 | +.group .group-list .ghaicha { | ||
| 891 | + width:300rpx; | ||
| 892 | + font-size: 27rpx; | ||
| 893 | + margin-left:180rpx; | ||
| 894 | + top:13rpx; | ||
| 895 | + left:-3rpx; | ||
| 896 | + font-weight:600; | ||
| 897 | + | ||
| 898 | + | ||
| 899 | +} | ||
| 900 | + | ||
| 901 | +.group .group-list .ghaicha .gred { | ||
| 902 | + height: 48rpx; | ||
| 903 | + width: 300rpx; | ||
| 904 | +} | ||
| 905 | + | ||
| 906 | +.gsj { | ||
| 907 | + float: left; | ||
| 908 | + color: #8f8f94; | ||
| 909 | +} | ||
| 910 | + | ||
| 911 | +.group .group-list .cjt { | ||
| 912 | + height:42rpx; | ||
| 913 | + width: 137rpx; | ||
| 914 | + position: absolute; | ||
| 915 | + right: 4rpx; | ||
| 916 | + top:25rpx; | ||
| 917 | + line-height: 42rpx; | ||
| 918 | + font-size: 24rpx; | ||
| 919 | + color: #fff; | ||
| 920 | + border:2rpx solid #d60024; | ||
| 921 | + background-color:#d60024; | ||
| 922 | + border-radius:25rpx; | ||
| 923 | + | ||
| 924 | +} | ||
| 925 | + | ||
| 926 | +.gbody { | ||
| 927 | + background-color: white; | ||
| 928 | +} | ||
| 929 | +.t_show{overflow: hidden; display: flex; width: 300rpx; color: #292929; line-height: 36rpx;font-size:26rpx; | ||
| 930 | +} | ||
| 931 | +.join-cart>view.set_width { | ||
| 932 | + width:58%; | ||
| 933 | +} | ||
| 934 | + | ||
| 935 | +/*秒杀样式zwp*/ | ||
| 936 | +#zwpMs{ | ||
| 937 | + width: 31%; | ||
| 938 | + color: #fff; | ||
| 939 | + background: url(https://mshopimg.yolipai.net/miniapp/images/user/bgred.png) no-repeat; | ||
| 940 | + background-size: 100% 60px; | ||
| 941 | +} | ||
| 942 | + | ||
| 943 | + | ||
| 944 | +/*--------- 修改后的样式 -----------*/ | ||
| 945 | +.elli{ | ||
| 946 | + overflow : hidden; | ||
| 947 | + text-overflow: ellipsis; | ||
| 948 | + display: -webkit-box; | ||
| 949 | + -webkit-line-clamp: 2; | ||
| 950 | + -webkit-box-orient: vertical; | ||
| 951 | +} | ||
| 952 | +.one_elli{ | ||
| 953 | + overflow : hidden; | ||
| 954 | + text-overflow: ellipsis; | ||
| 955 | + white-space:nowrap; | ||
| 956 | +} | ||
| 957 | + | ||
| 958 | +.tuwen_title{ height: 86rpx; background-color:#eeeeee; margin-bottom: 32rpx; position: relative; | ||
| 959 | + display: flex; justify-content: center;align-items: center; } | ||
| 960 | + | ||
| 961 | +.tuwen_title .g_line{ | ||
| 962 | + width:496rpx; | ||
| 963 | + height:1rpx; | ||
| 964 | + border-bottom:#ababab 1rpx solid; | ||
| 965 | +} | ||
| 966 | +.tuwen_title .center_s{ | ||
| 967 | + width: 124rpx; position: absolute; height: 34rpx; background-color:#eeeeee; font-size: 32rpx; display: flex; | ||
| 968 | + overflow: hidden; justify-content: center;align-items: center; | ||
| 969 | +} | ||
| 970 | +.tuwen_title .center_s image{ width: 34rpx; height: 26rpx; margin-right: 10rpx} | ||
| 971 | +.t_g_info{ margin: 0 34rpx;margin-bottom: 20rpx; display: flex; align-items: center } | ||
| 972 | +.red_shu{ width: 10rpx; height: 36rpx; background-color:#da0035; margin-right: 8rpx; } | ||
| 973 | + | ||
| 974 | +.tb-l{ line-height: 96rpx;} | ||
| 975 | +.table_s{ border:#e4e4e4 1rpx solid; width: 682rpx; margin: 0 34rpx;font-size: 30rpx;} | ||
| 976 | +.tb_item{display: flex; height: 96rpx; border-bottom: 1rpx solid #e4e4e4 } | ||
| 977 | +.item_left{width: 214rpx; height: 100%; background: #f9f9f9 ;border-right:1rpx solid #e4e4e4} .item_left text{ margin-left: 44rpx;} | ||
| 978 | +.item_right{width: 468rpx; height: 100%; overflow : hidden;white-space:nowrap; | ||
| 979 | + text-overflow: ellipsis;} | ||
| 980 | +.item_right text{ margin-left: 66rpx;} | ||
| 981 | + | ||
| 982 | +.bzfu_img{ width: 164rpx; height:34rpx; margin-right: 18rpx; margin-left: 12rpx } | ||
| 983 | + .bz_view{ height:100rpx; padding: 0 34rpx 0 13rpx; color: #333; font-size: 28rpx; | ||
| 984 | + /* border-bottom: 3rpx solid #eee; */ | ||
| 985 | + /* border-top: 3rpx solid #eee; */} | ||
| 986 | + .bz_view view{ width: 460rpx; max-height: 70rpx; overflow: hidden;} | ||
| 987 | + | ||
| 988 | +.bb_view{ display: flex;align-items: center;justify-content: space-between; padding: 0 34rpx; color: #333; | ||
| 989 | + font-size: 30rpx; height: 104rpx; line-height: 104rpx; overflow: hidden; padding-right:26rpx } | ||
| 990 | +.red_bb{ color: #d70026; min-width:158rpx;width: auto;} | ||
| 991 | +.bg_jj{ width: 18rpx; height:18rpx; | ||
| 992 | + border-top: 2rpx solid #d70026; | ||
| 993 | + border-right: 2rpx solid #d70026; | ||
| 994 | + transform: rotate(45deg);display:inline-block; | ||
| 995 | + margin-bottom:3rpx; | ||
| 996 | +} | ||
| 997 | +.bg_jj.down1{transform: rotate(135deg);} | ||
| 998 | + | ||
| 999 | +.bz-content { | ||
| 1000 | + flex-grow: 1; | ||
| 1001 | + text-align: justify; | ||
| 1002 | +} | ||
| 1003 | + | ||
| 1004 | +/* 顶部边框 */ | ||
| 1005 | +.topframe{ | ||
| 1006 | + width: 100%; | ||
| 1007 | + height: 172rpx; | ||
| 1008 | + flex-direction: row; | ||
| 1009 | + justify-content: space-between; | ||
| 1010 | + border-bottom: 6rpx solid #eeeeee; | ||
| 1011 | + overflow: hidden; | ||
| 1012 | +} | ||
| 1013 | +/* 评价人边框*/ | ||
| 1014 | +.topframe .topframe-top{ | ||
| 1015 | + display: flex; | ||
| 1016 | + margin-top: 40rpx; | ||
| 1017 | + margin-bottom: 36rpx; | ||
| 1018 | + color: #7d7d7d; | ||
| 1019 | + padding-left: 20rpx; | ||
| 1020 | + font-size: 32rpx; | ||
| 1021 | +} | ||
| 1022 | +/*评价人数量*/ | ||
| 1023 | +.topframe .topframe-top .topframe-top-val{ | ||
| 1024 | + margin-left: 15rpx; | ||
| 1025 | + | ||
| 1026 | +} | ||
| 1027 | +.topframe-top-content{ | ||
| 1028 | + display: flex; | ||
| 1029 | + width: 36%; | ||
| 1030 | +} | ||
| 1031 | +/* 好评 */ | ||
| 1032 | +.topframe-praise{ | ||
| 1033 | + width: 61%; | ||
| 1034 | + text-align: right; | ||
| 1035 | + color: #dc4355; | ||
| 1036 | + font-size: 28rpx; | ||
| 1037 | +} | ||
| 1038 | +/* 按钮列表 */ | ||
| 1039 | +.buttem-list{ | ||
| 1040 | + width: 100%; | ||
| 1041 | + display: flex; | ||
| 1042 | + font-size: 20rpx; | ||
| 1043 | + overflow: hidden; | ||
| 1044 | +} | ||
| 1045 | + | ||
| 1046 | +.buttem-list .item{ | ||
| 1047 | + min-width: 17%; | ||
| 1048 | + font-size: 24rpx; | ||
| 1049 | + border-radius: 20rpx; | ||
| 1050 | + background:#ffe3e2; | ||
| 1051 | + height:38rpx; | ||
| 1052 | + text-align: center; | ||
| 1053 | + line-height: 38rpx; | ||
| 1054 | + margin-left: 20rpx; | ||
| 1055 | +} | ||
| 1056 | + | ||
| 1057 | +.buttem-list .item.red{ | ||
| 1058 | + color: #fff; | ||
| 1059 | + background: #d60022; | ||
| 1060 | +} | ||
| 1061 | + | ||
| 1062 | +/* 用户评价 */ | ||
| 1063 | +.middle{ | ||
| 1064 | + width: 95%; | ||
| 1065 | + margin:0 auto; | ||
| 1066 | +} | ||
| 1067 | +.middle-img-frame{ | ||
| 1068 | + height:65rpx; | ||
| 1069 | + display: flex; | ||
| 1070 | + margin-top: 32rpx; | ||
| 1071 | + | ||
| 1072 | +} | ||
| 1073 | +/* 评价的用户图片 */ | ||
| 1074 | +.middle-img{ | ||
| 1075 | + width:60rpx; | ||
| 1076 | + height:60rpx; | ||
| 1077 | + border-radius: 50%; | ||
| 1078 | + -moz-border-radius: 50%; | ||
| 1079 | + -webkit-border-radius: 50%; | ||
| 1080 | + margin-right: 15rpx; | ||
| 1081 | +} | ||
| 1082 | +/* 评价的用户边框 */ | ||
| 1083 | +.middle-user-frame{ | ||
| 1084 | + height: 65rpx; | ||
| 1085 | + overflow: hidden; | ||
| 1086 | +} | ||
| 1087 | +.middle-user{ | ||
| 1088 | + height: 25; | ||
| 1089 | + font-size: 28rpx; | ||
| 1090 | +} | ||
| 1091 | +/* 评价图片 */ | ||
| 1092 | +.middle-img-two{ | ||
| 1093 | + width: 115rpx; | ||
| 1094 | + height: 25rpx; | ||
| 1095 | + text-align: center; | ||
| 1096 | + margin-bottom:20rpx; | ||
| 1097 | + margin-left:5rpx; | ||
| 1098 | +} | ||
| 1099 | +.xc-pirces{ | ||
| 1100 | + margin-top: 14rpx; | ||
| 1101 | +} | ||
| 1102 | +/* 评价文字 */ | ||
| 1103 | +.middle-font{ | ||
| 1104 | + font-size: 30rpx; | ||
| 1105 | + | ||
| 1106 | +} | ||
| 1107 | +.iddle-goods-img{ | ||
| 1108 | + width: 100%; | ||
| 1109 | + display: flex; | ||
| 1110 | + margin-top:22rpx; | ||
| 1111 | +} | ||
| 1112 | +/* 商品图片 */ | ||
| 1113 | +.goods-img{ | ||
| 1114 | + width: 156rpx; | ||
| 1115 | + height: 156rpx; | ||
| 1116 | + margin-left: 22rpx; | ||
| 1117 | + height: 100%; | ||
| 1118 | +} | ||
| 1119 | +.parameter-frame{ | ||
| 1120 | + margin-top:14rxp; | ||
| 1121 | + margin-bottom: 14rpx; | ||
| 1122 | + width:50%; | ||
| 1123 | + height: 30rpx; | ||
| 1124 | +} | ||
| 1125 | +.z_parameter{ | ||
| 1126 | + width:98%; | ||
| 1127 | + height: 45rpx; | ||
| 1128 | + display:flex; | ||
| 1129 | + line-height: 45rpx; | ||
| 1130 | + margin-top: 20rpx; | ||
| 1131 | + margin-bottom: 14rpx; | ||
| 1132 | + justify-content : space-between; | ||
| 1133 | +} | ||
| 1134 | +.parameter-font{ | ||
| 1135 | + font-size: 26rpx; | ||
| 1136 | + | ||
| 1137 | +} | ||
| 1138 | +/* 规格 */ | ||
| 1139 | +.parameter-state{ | ||
| 1140 | + width: 100rpx; | ||
| 1141 | + font-size: 24rpx; | ||
| 1142 | + color: #c4c4c4; | ||
| 1143 | +} | ||
| 1144 | +.parameter-dian{ | ||
| 1145 | + display: flex; | ||
| 1146 | + width: 94rpx; | ||
| 1147 | + height: 33rpx; | ||
| 1148 | + font-size: 20rpx; | ||
| 1149 | + border-radius: 20rpx; | ||
| 1150 | + line-height:33rpx; | ||
| 1151 | + padding-left: 25rpx; | ||
| 1152 | + border:4rpx solid #eeeeee; | ||
| 1153 | + | ||
| 1154 | +} | ||
| 1155 | +/* 点赞图片 */ | ||
| 1156 | +.parameter-img{ | ||
| 1157 | + width: 27rpx; | ||
| 1158 | + height: 27rpx; | ||
| 1159 | + margin-top: 3rpx; | ||
| 1160 | +} | ||
| 1161 | +.parameter-val{ | ||
| 1162 | + margin-left:25rpx; | ||
| 1163 | + font-size: 26rpx; | ||
| 1164 | + color: #999; | ||
| 1165 | +} | ||
| 1166 | +/* 回复 */ | ||
| 1167 | +.reply{ | ||
| 1168 | + width: 95%; | ||
| 1169 | + height: 120rpx; | ||
| 1170 | + padding-top: 14rpx; | ||
| 1171 | + border-top:3rpx solid #eeeeee; | ||
| 1172 | + margin:0 auto; | ||
| 1173 | + | ||
| 1174 | +} | ||
| 1175 | +.shop-reply{ | ||
| 1176 | + height: 30rpx; | ||
| 1177 | + color:#d60022; | ||
| 1178 | + font-size:24rpx; | ||
| 1179 | + overflow: hidden; | ||
| 1180 | +} | ||
| 1181 | +.shop-font{ | ||
| 1182 | + width: 94%; | ||
| 1183 | + font-size: 24rpx; | ||
| 1184 | + padding-top: 10rpx; | ||
| 1185 | + | ||
| 1186 | +} | ||
| 1187 | +.line_bulge{ | ||
| 1188 | + width: 17rpx; | ||
| 1189 | + height: 17rpx; | ||
| 1190 | + border-top: 1rpx solid #eeeeee; | ||
| 1191 | + border-left: 1rpx solid #eeeeee; | ||
| 1192 | + transform:rotate(45deg); | ||
| 1193 | + position: absolute; | ||
| 1194 | + top: -12rpx; | ||
| 1195 | + left:50rpx; | ||
| 1196 | + background:#fff; | ||
| 1197 | +} | ||
| 1198 | + | ||
| 1199 | + | ||
| 1200 | +.xc_comment{ | ||
| 1201 | + display: flex; | ||
| 1202 | + width: 100%; | ||
| 1203 | + height: 42rpx; | ||
| 1204 | + padding-left: 34rpx; | ||
| 1205 | + color: #333; | ||
| 1206 | + | ||
| 1207 | +} | ||
| 1208 | +.xc_comment-have-pictures{ | ||
| 1209 | + width: 153rpx; | ||
| 1210 | + height: 42rpx; | ||
| 1211 | + line-height: 42rpx; | ||
| 1212 | + text-align: center; | ||
| 1213 | + background: #ffe3e2; | ||
| 1214 | + color: 28rpx; | ||
| 1215 | + border-radius:20rpx; | ||
| 1216 | + font-size: 24rpx; | ||
| 1217 | +} | ||
| 1218 | +.xc_comment-discuss{ | ||
| 1219 | + width: 152rpx; | ||
| 1220 | + height: 42rpx; | ||
| 1221 | + line-height: 42rpx; | ||
| 1222 | + text-align: center; | ||
| 1223 | + background: #ffe3e2; | ||
| 1224 | + color: 28rpx; | ||
| 1225 | + border-radius:20rpx; | ||
| 1226 | + font-size: 24rpx; | ||
| 1227 | + margin-left: 28rpx | ||
| 1228 | +} | ||
| 1229 | + | ||
| 1230 | +.xc_comment-detail{ | ||
| 1231 | + display: flex; | ||
| 1232 | + margin-top: 40rpx; | ||
| 1233 | + width: 524rpx; | ||
| 1234 | + margin-left: 34rpx; | ||
| 1235 | + border-radius: 25rpx; | ||
| 1236 | + border: 2rpx solid #d6d4d5; | ||
| 1237 | + overflow: hidden; | ||
| 1238 | +} | ||
| 1239 | + | ||
| 1240 | +.xc_user-img{ | ||
| 1241 | + border-radius:50%; | ||
| 1242 | +} | ||
| 1243 | + | ||
| 1244 | +.xc_comment-user{ | ||
| 1245 | + display: flex; | ||
| 1246 | + margin-top: 22rpx; | ||
| 1247 | + margin-left: 22rpx; | ||
| 1248 | +} | ||
| 1249 | +.xc_user{ | ||
| 1250 | + width: 170rpx; | ||
| 1251 | + height: 60rpx; | ||
| 1252 | + margin-left: 6rpx; | ||
| 1253 | + overflow: hidden; | ||
| 1254 | +} | ||
| 1255 | +.xc_user-name{ height: 25rpx;} | ||
| 1256 | +.xc_comment-img{ | ||
| 1257 | + width: 22rpx; | ||
| 1258 | + height: 22rpx; | ||
| 1259 | + margin-top: 14rpx; | ||
| 1260 | + margin-right: 5rpx | ||
| 1261 | +} | ||
| 1262 | +.xc_comment-font{ | ||
| 1263 | + height: 75rpx; | ||
| 1264 | + margin-left: 22rpx; | ||
| 1265 | + white-space:normal; | ||
| 1266 | + overflow: hidden; | ||
| 1267 | + margin-top: 8rpx; | ||
| 1268 | + line-height: 38rpx; | ||
| 1269 | + | ||
| 1270 | +} | ||
| 1271 | +.xc_comment-val{ | ||
| 1272 | + width: 88%; | ||
| 1273 | + height: 30rpx; | ||
| 1274 | + margin-left: 22rpx; | ||
| 1275 | + display: flex; | ||
| 1276 | + margin-top: 15rpx; | ||
| 1277 | + margin-bottom:15rpx; | ||
| 1278 | +} | ||
| 1279 | + | ||
| 1280 | +.xc_comment-time{ | ||
| 1281 | + height: 30rpx; | ||
| 1282 | + font-size: 24rpx; | ||
| 1283 | + color: #a5a5a5; | ||
| 1284 | + overflow: hidden; | ||
| 1285 | +} | ||
| 1286 | + | ||
| 1287 | +.xc_goods-img{ | ||
| 1288 | + width: 180rpx;height: 180rpx; | ||
| 1289 | +} | ||
| 1290 | +.xc_comment-left{ | ||
| 1291 | + display:inline-block; | ||
| 1292 | + width: 312rpx; | ||
| 1293 | +} | ||
| 1294 | +.xc_goods-img-frame{ | ||
| 1295 | + display:inline-block; | ||
| 1296 | + width: 40%; | ||
| 1297 | + height: 90%; | ||
| 1298 | + text-align: center; | ||
| 1299 | + padding-top: 30rpx; | ||
| 1300 | + vertical-align: top; | ||
| 1301 | +} | ||
| 1302 | +.xc_imgs{ | ||
| 1303 | + width: 50rpx; | ||
| 1304 | + height:50rpx; | ||
| 1305 | + border-radius:50%; | ||
| 1306 | + margin-right: 5rpx; | ||
| 1307 | +} | ||
| 1308 | + | ||
| 1309 | +.pj_word_size{ font-size: 28rpx} | ||
| 1310 | +.pj_scroll{ | ||
| 1311 | + white-space: nowrap; | ||
| 1312 | + /* height: 324rpx; */ | ||
| 1313 | + margin-bottom: 50rpx; | ||
| 1314 | + display: flex; | ||
| 1315 | + align-items: center; | ||
| 1316 | + /* box-shadow: 0 8px 12px #e7e9eb; */ | ||
| 1317 | +} | ||
| 1318 | + | ||
| 1319 | + | ||
| 1320 | +/*领券*/ | ||
| 1321 | +.three-level-word{ | ||
| 1322 | + font-size: 25rpx; | ||
| 1323 | +} | ||
| 1324 | +.four-level-word{ | ||
| 1325 | + font-size: 23rpx; | ||
| 1326 | +} | ||
| 1327 | +.cx-frame{ | ||
| 1328 | + /* border-top:3rpx solid #eee; */ | ||
| 1329 | + width:99%; | ||
| 1330 | + height: 95rpx; | ||
| 1331 | + line-height: 95rpx; | ||
| 1332 | + padding-left:24rpx; | ||
| 1333 | + | ||
| 1334 | + | ||
| 1335 | +} | ||
| 1336 | +.cx-frame .cx-sizs{ | ||
| 1337 | + width: 68rpx; | ||
| 1338 | + height: 100%; | ||
| 1339 | + line-height: 100rpx; | ||
| 1340 | + overflow: hidden; | ||
| 1341 | + margin-left: 10rpx; | ||
| 1342 | +} | ||
| 1343 | +.xc-coupon-fram{ | ||
| 1344 | + position: relative; | ||
| 1345 | + width:200rpx; | ||
| 1346 | + padding-top:30rpx; | ||
| 1347 | + | ||
| 1348 | +} | ||
| 1349 | +.xc-coupon-fram .xc-coupon{ | ||
| 1350 | + width:175rpx ; | ||
| 1351 | + height: 40rpx; | ||
| 1352 | + line-height: 40rpx; | ||
| 1353 | + background-color:#d60021 ; | ||
| 1354 | + margin:0 auto; | ||
| 1355 | + color:#fff; | ||
| 1356 | + | ||
| 1357 | + | ||
| 1358 | +} | ||
| 1359 | +.xc-coupon-fram .xc-circular{ | ||
| 1360 | + width: 22rpx; | ||
| 1361 | + height:22rpx; | ||
| 1362 | + background-color:#fff; | ||
| 1363 | + position:absolute; | ||
| 1364 | + top: 40rpx; | ||
| 1365 | +} | ||
| 1366 | +.xc-coupon-fram .xc-one{ | ||
| 1367 | + left:3rpx; | ||
| 1368 | +} | ||
| 1369 | +.xc-coupon-fram .xc-two{ | ||
| 1370 | + left: 178rpx; | ||
| 1371 | +} | ||
| 1372 | + | ||
| 1373 | +.cx-obtain-coupon{ | ||
| 1374 | + width: 65rpx; | ||
| 1375 | + height: 100%; | ||
| 1376 | + padding-left:15rpx; | ||
| 1377 | + color: #d70025; | ||
| 1378 | + position: absolute; | ||
| 1379 | + right: 5rpx; | ||
| 1380 | +} | ||
| 1381 | + | ||
| 1382 | +/* 自定义弹出窗口 */ | ||
| 1383 | +.cx-popup{ | ||
| 1384 | + width:100%; | ||
| 1385 | + background: #fff; | ||
| 1386 | + z-index: 35; | ||
| 1387 | + border-top-left-radius: 25rpx; | ||
| 1388 | + border-top-right-radius: 25rpx; | ||
| 1389 | + position:fixed; | ||
| 1390 | + bottom:0; | ||
| 1391 | +} | ||
| 1392 | + | ||
| 1393 | +.cx-popup .top{ | ||
| 1394 | + width: 90%; | ||
| 1395 | + height:85rpx; | ||
| 1396 | + border-bottom: 4rpx solid #d5d5d5; | ||
| 1397 | + padding-top: 50rpx; | ||
| 1398 | + font-weight:600; | ||
| 1399 | + | ||
| 1400 | +} | ||
| 1401 | +.cx-popup .top-frame{ | ||
| 1402 | + width: 100%; | ||
| 1403 | + display: flex; | ||
| 1404 | + justify-content: center; | ||
| 1405 | + overflow: hidden; | ||
| 1406 | +} | ||
| 1407 | +.xc-valid-coupon{ | ||
| 1408 | + width: 90%; | ||
| 1409 | + height:40rpx; | ||
| 1410 | + padding-top: 24rpx; | ||
| 1411 | + overflow: hidden; | ||
| 1412 | +} | ||
| 1413 | +.xc-frame{ | ||
| 1414 | + position: relative; | ||
| 1415 | +} | ||
| 1416 | +.xc-coupon-frame{ | ||
| 1417 | + width: 90%; | ||
| 1418 | + max-height: 560rpx; | ||
| 1419 | + overflow: auto; | ||
| 1420 | + | ||
| 1421 | +} | ||
| 1422 | +.xc-coupon-frame .coupon{ | ||
| 1423 | + width:99%; | ||
| 1424 | + height: 168rpx; | ||
| 1425 | + border-radius: 25rpx; | ||
| 1426 | + border:3rpx solid #ffdcdc; | ||
| 1427 | + overflow: hidden; | ||
| 1428 | + margin-top:16rpx; | ||
| 1429 | + | ||
| 1430 | +} | ||
| 1431 | +.xc-coupon-left{ | ||
| 1432 | + width: 216rpx; | ||
| 1433 | + height: 100%; | ||
| 1434 | + background-color: #ffeeef; | ||
| 1435 | + border-right: 4rpx dashed #ffdbd9; | ||
| 1436 | + overflow: hidden; | ||
| 1437 | + line-height: 100%; | ||
| 1438 | + | ||
| 1439 | +} | ||
| 1440 | +.xc-money{ | ||
| 1441 | + color: #f30026; | ||
| 1442 | + text-align:center; | ||
| 1443 | +} | ||
| 1444 | +.xc-rmb{ | ||
| 1445 | + width:44rpx; | ||
| 1446 | + padding-top:7rpx; | ||
| 1447 | +} | ||
| 1448 | +.xc-money-frame{ | ||
| 1449 | + margin-left:35rpx; | ||
| 1450 | + margin-top:48rpx; | ||
| 1451 | + | ||
| 1452 | +} | ||
| 1453 | +.xc-spacing{ | ||
| 1454 | + letter-spacing:4rpx; | ||
| 1455 | +} | ||
| 1456 | +.xc-circular-one{ | ||
| 1457 | + position: absolute; | ||
| 1458 | + top:-8rpx; | ||
| 1459 | + left:208rpx; | ||
| 1460 | + width: 27rpx; | ||
| 1461 | + height: 30rpx; | ||
| 1462 | + background: #fff; | ||
| 1463 | + overflow: hidden; | ||
| 1464 | +} | ||
| 1465 | +.xc-circular-two{ | ||
| 1466 | + position: absolute; | ||
| 1467 | + top:150rpx; | ||
| 1468 | + left:207rpx; | ||
| 1469 | + width: 27rpx; | ||
| 1470 | + height:30rpx; | ||
| 1471 | + background: #fff; | ||
| 1472 | +} | ||
| 1473 | +.xc-detail-coupon{ | ||
| 1474 | + margin-left: 22rpx; | ||
| 1475 | + overflow: hidden; | ||
| 1476 | + padding-top: 43rpx; | ||
| 1477 | + | ||
| 1478 | +} | ||
| 1479 | +.xc-coupon-right{ | ||
| 1480 | + width: 455rpx; | ||
| 1481 | + height: 100%; | ||
| 1482 | + background: #fffaf9; | ||
| 1483 | +} | ||
| 1484 | +.xc-below{ | ||
| 1485 | + margin-top:22rpx; | ||
| 1486 | + | ||
| 1487 | +} | ||
| 1488 | +.xc-get{ | ||
| 1489 | + | ||
| 1490 | + width: 132rpx; | ||
| 1491 | + height: 48rpx; | ||
| 1492 | + color: #fff; | ||
| 1493 | + text-align: center; | ||
| 1494 | + border-radius:20rpx; | ||
| 1495 | + line-height:48rpx; | ||
| 1496 | + margin-left:20rpx; | ||
| 1497 | +} | ||
| 1498 | + | ||
| 1499 | +.background{ | ||
| 1500 | + background:#f40028; | ||
| 1501 | +} | ||
| 1502 | +/*--不可使用--*/ | ||
| 1503 | +.background.nouse{ | ||
| 1504 | + background:gainsboro; | ||
| 1505 | +} | ||
| 1506 | + | ||
| 1507 | +.xc-background{ | ||
| 1508 | + background:#b9b9b9; | ||
| 1509 | +} | ||
| 1510 | + | ||
| 1511 | + | ||
| 1512 | +.cx-confirm{ | ||
| 1513 | + width: 100%; | ||
| 1514 | + height: 160rpx; | ||
| 1515 | + | ||
| 1516 | +} | ||
| 1517 | +.cx-confirm .confirm{ | ||
| 1518 | + width: 372rpx; | ||
| 1519 | + height: 60rpx; | ||
| 1520 | + background: #f40026; | ||
| 1521 | + color: #fff; | ||
| 1522 | + border-radius:20rpx; | ||
| 1523 | + line-height:60rpx; | ||
| 1524 | + | ||
| 1525 | +} | ||
| 1526 | + | ||
| 1527 | +.up{ animation: up .7s; } | ||
| 1528 | +.down{ animation: down 1s; } | ||
| 1529 | +@keyframes up { 0% { transform: translateY(550rpx); } 100% { transform: translateY(0); } } | ||
| 1530 | +@keyframes down { 0% { transform: translateY(0); } 100% { transform: translateY(550rpx); } } | ||
| 1531 | + | ||
| 1532 | + | ||
| 1533 | +/* 分享 */ | ||
| 1534 | +.xc-share-frame{ | ||
| 1535 | + width: 129rpx; | ||
| 1536 | + height: 48rpx; | ||
| 1537 | + border-top-left-radius: 18rpx; | ||
| 1538 | + border-bottom-left-radius: 18rpx; | ||
| 1539 | + background: #d60021; | ||
| 1540 | + position:absolute; | ||
| 1541 | + left:622rpx; | ||
| 1542 | + top:-37rpx; | ||
| 1543 | + line-height:50rpx; | ||
| 1544 | + margin-top:52rpx; | ||
| 1545 | +} | ||
| 1546 | +.xc-share-frame-jieti{ | ||
| 1547 | + width: 129rpx; | ||
| 1548 | + height: 48rpx; | ||
| 1549 | + border-top-left-radius: 18rpx; | ||
| 1550 | + border-bottom-left-radius: 18rpx; | ||
| 1551 | + background: #d60021; | ||
| 1552 | + line-height:50rpx; | ||
| 1553 | +} | ||
| 1554 | + | ||
| 1555 | +.xc-share-frame .share-font,.xc-share-frame-jieti .share-font{ | ||
| 1556 | + font-size: 32rpx; | ||
| 1557 | + color:#fff; | ||
| 1558 | + margin-left:10rpx; | ||
| 1559 | + | ||
| 1560 | +} | ||
| 1561 | + | ||
| 1562 | +.xc-share-frame .share-frame,.xc-share-frame-jieti .share-frame{ | ||
| 1563 | + width: 30rpx; | ||
| 1564 | + height: 30rpx; | ||
| 1565 | + margin-top:9rpx; | ||
| 1566 | + margin-left: 10rpx; | ||
| 1567 | + | ||
| 1568 | +} | ||
| 1569 | +.xc-share { | ||
| 1570 | + width:90%; | ||
| 1571 | + height:800rpx; | ||
| 1572 | + background:#fff; | ||
| 1573 | + z-index:35; | ||
| 1574 | +} | ||
| 1575 | +.img-frame{ | ||
| 1576 | + position: absolute; | ||
| 1577 | + top: 175rpx; | ||
| 1578 | + left:100rpx; | ||
| 1579 | + z-index: 55; | ||
| 1580 | + overflow:hidden; | ||
| 1581 | + | ||
| 1582 | +} | ||
| 1583 | +.img-frame .img{ | ||
| 1584 | + width: 100rpx; | ||
| 1585 | + height: 100rpx; | ||
| 1586 | + | ||
| 1587 | +} | ||
| 1588 | +.xc-share .top{ | ||
| 1589 | + height: 85rpx; | ||
| 1590 | + width: 100%; | ||
| 1591 | + border-bottom: 4rpx dashed #f5f5f5; | ||
| 1592 | + overflow:hidden; | ||
| 1593 | + | ||
| 1594 | +} | ||
| 1595 | +.xc-share .name{ | ||
| 1596 | + font-size: 25rpx; | ||
| 1597 | + margin-left:180rpx; | ||
| 1598 | + color:#000; | ||
| 1599 | + | ||
| 1600 | +} | ||
| 1601 | + | ||
| 1602 | +.xc-share .recommend{ | ||
| 1603 | + width: 110rpx; | ||
| 1604 | + height: 12rpx; | ||
| 1605 | + color: #fff; | ||
| 1606 | + background: #d60021; | ||
| 1607 | + font-size: 20rpx; | ||
| 1608 | + border-radius:25rpx; | ||
| 1609 | + margin-left:10rpx; | ||
| 1610 | + line-height:37rpx; | ||
| 1611 | +} | ||
| 1612 | +.xc-left-circle{ | ||
| 1613 | + width: 40rpx; | ||
| 1614 | + height: 25rpx; | ||
| 1615 | + position: absolute; | ||
| 1616 | + top:280rpx; | ||
| 1617 | + left:29rpx; | ||
| 1618 | + z-index: 55; | ||
| 1619 | + background:#727272; | ||
| 1620 | + border-radius:50rpx 50rpx 0 0; | ||
| 1621 | + transform:rotate(90deg); | ||
| 1622 | + | ||
| 1623 | +} | ||
| 1624 | +.xc-right-circle{ | ||
| 1625 | + width: 40rpx; | ||
| 1626 | + height: 25rpx; | ||
| 1627 | + position: absolute; | ||
| 1628 | + top: 280rpx; | ||
| 1629 | + left:683rpx; | ||
| 1630 | + z-index: 55; | ||
| 1631 | + background:#727272; | ||
| 1632 | + border-radius:50rpx 50rpx 0 0; | ||
| 1633 | + transform:rotate(270deg); | ||
| 1634 | + | ||
| 1635 | +} | ||
| 1636 | +.xc-circle-frame{ | ||
| 1637 | + width: 25rpx; | ||
| 1638 | + height: 40rpx; | ||
| 1639 | + overflow: hidden; | ||
| 1640 | +} | ||
| 1641 | +.xc-goods-name{ | ||
| 1642 | + width: 95%; | ||
| 1643 | + font-size: 35rpx; | ||
| 1644 | + padding-left: 75rpx; | ||
| 1645 | + height: 50rpx; | ||
| 1646 | + padding-top: 10rpx; | ||
| 1647 | + color:#000; | ||
| 1648 | + | ||
| 1649 | +} | ||
| 1650 | +.xc-good-img{ | ||
| 1651 | + width: 100%; | ||
| 1652 | + height: 381rpx; | ||
| 1653 | + margin-top:5rpx; | ||
| 1654 | + | ||
| 1655 | +} | ||
| 1656 | +.xc-good-img .img{ | ||
| 1657 | + width: 90%; | ||
| 1658 | + height: 381rpx; | ||
| 1659 | +} | ||
| 1660 | +.xc-ensure-frame{ | ||
| 1661 | + width: 90%; | ||
| 1662 | + height: 60rpx; | ||
| 1663 | + border-bottom: 2rpx solid #d8d6d7; | ||
| 1664 | +} | ||
| 1665 | +.xc-ensure{ | ||
| 1666 | + width: 30%; | ||
| 1667 | + height: 60rpx; | ||
| 1668 | + line-height: 60rpx; | ||
| 1669 | +} | ||
| 1670 | +xc-ensure-div{ | ||
| 1671 | + width: 100%; | ||
| 1672 | + height: 60rpx; | ||
| 1673 | +} | ||
| 1674 | +.xc-ensure .word{ | ||
| 1675 | + font-size: 25rpx; | ||
| 1676 | + color: #d30025; | ||
| 1677 | + margin-left:9rpx; | ||
| 1678 | + | ||
| 1679 | +} | ||
| 1680 | +.xc-ensure .img{ | ||
| 1681 | + width: 25rpx; | ||
| 1682 | + height: 25rpx; | ||
| 1683 | + margin-top:18rpx; | ||
| 1684 | + | ||
| 1685 | +} | ||
| 1686 | + | ||
| 1687 | +.xc-bottmon{ | ||
| 1688 | + width: 100%; | ||
| 1689 | +} | ||
| 1690 | +.xc-bottmon .xc-left{ | ||
| 1691 | + width: 55%; | ||
| 1692 | + margin-top:30rpx; | ||
| 1693 | + padding-left:20rpx; | ||
| 1694 | + | ||
| 1695 | +} | ||
| 1696 | +.xc-left .xc-top{ | ||
| 1697 | + font-size: 25rpx; | ||
| 1698 | + height:40rpx; | ||
| 1699 | + line-height:40rpx; | ||
| 1700 | + color:#000; | ||
| 1701 | +} | ||
| 1702 | +.xc-left .xc-middle{ | ||
| 1703 | + font-size: 25rpx; | ||
| 1704 | + color: #b2b2b2; | ||
| 1705 | + height:30rpx; | ||
| 1706 | + line-height:30rpx; | ||
| 1707 | +} | ||
| 1708 | +.xc-left .xc-buttem{ | ||
| 1709 | + font-size: 25rpx; | ||
| 1710 | + height:100rpx; | ||
| 1711 | + line-height:100rpx; | ||
| 1712 | + color:#000; | ||
| 1713 | +} | ||
| 1714 | +.xc-ensure-right{ | ||
| 1715 | + width: 30%; | ||
| 1716 | +} | ||
| 1717 | +.xc-qrcode{ | ||
| 1718 | + width:120rpx; | ||
| 1719 | + height: 120rpx; | ||
| 1720 | + margin-top:43rpx; | ||
| 1721 | + margin-left:80rpx; | ||
| 1722 | + | ||
| 1723 | +} | ||
| 1724 | +.xc-close{ | ||
| 1725 | + width:50rpx; | ||
| 1726 | + height:50rpx; | ||
| 1727 | + border-radius:50%; | ||
| 1728 | + border:3rpx solid #fff; | ||
| 1729 | + text-align:center; | ||
| 1730 | + line-height: 41rpx; | ||
| 1731 | + font-size:50rpx; | ||
| 1732 | + color:#fff; | ||
| 1733 | + font-weight: lighter; | ||
| 1734 | + font-family:MingLiU; | ||
| 1735 | + transform:rotate(270deg); | ||
| 1736 | + overflow:auto; | ||
| 1737 | + margin-top:6rpx; | ||
| 1738 | + margin-bottom:1rpx; | ||
| 1739 | + | ||
| 1740 | +} | ||
| 1741 | +.xc-close-frame{ | ||
| 1742 | + position:absolute; | ||
| 1743 | + margin-top:30rpx; | ||
| 1744 | + width:90%; | ||
| 1745 | + display:flex; | ||
| 1746 | + justify-content:center; | ||
| 1747 | + overflow: auto; | ||
| 1748 | + | ||
| 1749 | +} | ||
| 1750 | +.xc-guanbi{ | ||
| 1751 | + width: 100%; | ||
| 1752 | + height: 80rpx; | ||
| 1753 | + overflow: hidden; | ||
| 1754 | +} | ||
| 1755 | + | ||
| 1756 | + | ||
| 1757 | +/* 自定义弹出窗口 */ | ||
| 1758 | +.cx-popup{ | ||
| 1759 | + width:100%; | ||
| 1760 | + background: #fff; | ||
| 1761 | + z-index: 35; | ||
| 1762 | + border-top-left-radius: 10rpx; | ||
| 1763 | + border-top-right-radius: 10rpx; | ||
| 1764 | + position:fixed; | ||
| 1765 | + bottom:0; | ||
| 1766 | +} | ||
| 1767 | + | ||
| 1768 | +.xc-top-content{ | ||
| 1769 | + width: 88%; | ||
| 1770 | + height:85rpx; | ||
| 1771 | + padding-top: 50rpx; | ||
| 1772 | + font-size: 36rpx; | ||
| 1773 | +} | ||
| 1774 | + | ||
| 1775 | + | ||
| 1776 | +.xc-valid-coupon{ | ||
| 1777 | + width: 90%; | ||
| 1778 | + height:40rpx; | ||
| 1779 | + padding-top: 24rpx; | ||
| 1780 | + overflow: hidden; | ||
| 1781 | +} | ||
| 1782 | +.xc-frame{ | ||
| 1783 | + width: 100%; | ||
| 1784 | + margin-top:20rpx; | ||
| 1785 | + | ||
| 1786 | +} | ||
| 1787 | + | ||
| 1788 | +.xc-frame .list-frame{ | ||
| 1789 | + width: 90%; | ||
| 1790 | + height: 100%; | ||
| 1791 | + overflow-y:scroll; | ||
| 1792 | + | ||
| 1793 | + margin-top:20rpx; | ||
| 1794 | + | ||
| 1795 | +} | ||
| 1796 | +.xc-close-frame{ | ||
| 1797 | + margin-top:30rpx; | ||
| 1798 | + width:15%; | ||
| 1799 | + display:flex; | ||
| 1800 | +} | ||
| 1801 | + | ||
| 1802 | +.xc-close{ | ||
| 1803 | + width:70rpx; | ||
| 1804 | + height:70rpx; | ||
| 1805 | + border-radius:50%; | ||
| 1806 | + border:5rpx solid #a5a5a7; | ||
| 1807 | + text-align:center; | ||
| 1808 | + line-height: 55rpx; | ||
| 1809 | + font-size:80rpx; | ||
| 1810 | + color:#a5a5a7; | ||
| 1811 | + font-family:"微软正黑体"; | ||
| 1812 | + margin-top:8rpx; | ||
| 1813 | + | ||
| 1814 | +} | ||
| 1815 | +.xc-money{ | ||
| 1816 | + color: #ff0013; | ||
| 1817 | +} | ||
| 1818 | + | ||
| 1819 | +.xc-money-frame{ | ||
| 1820 | + margin-left:35rpx; | ||
| 1821 | + | ||
| 1822 | +} | ||
| 1823 | +.xc-coupon-effect{ | ||
| 1824 | + width: 99%; | ||
| 1825 | + height: 128rpx; | ||
| 1826 | + border-bottom:3rpx solid #ddd; | ||
| 1827 | + | ||
| 1828 | + | ||
| 1829 | +} | ||
| 1830 | +.xc-goods-coupon{ | ||
| 1831 | + width: 80%; | ||
| 1832 | + height:100%; | ||
| 1833 | + | ||
| 1834 | +} | ||
| 1835 | +.xc-title{ | ||
| 1836 | + width:50%; | ||
| 1837 | + margin-left:222rpx; | ||
| 1838 | + | ||
| 1839 | +} | ||
| 1840 | +.xc-coupon-money{ | ||
| 1841 | + color: #c91e31; | ||
| 1842 | + font-size: 35rpx; | ||
| 1843 | + margin-top:20rpx; | ||
| 1844 | + | ||
| 1845 | +} | ||
| 1846 | +.xc-coupon-time{ | ||
| 1847 | + height: 50rpx; | ||
| 1848 | + font-size: 27rpx; | ||
| 1849 | + color: #a4a4a4; | ||
| 1850 | +} | ||
| 1851 | +.xc-coupon-time .time{ | ||
| 1852 | + margin-left: 15rpx; | ||
| 1853 | + font-size: 27rpx; | ||
| 1854 | +} | ||
| 1855 | +.xc-coupon-selection{ | ||
| 1856 | + width:99%; | ||
| 1857 | + height:100%; | ||
| 1858 | + | ||
| 1859 | + | ||
| 1860 | +} | ||
| 1861 | +.xc-confirm { | ||
| 1862 | + width: 90%; | ||
| 1863 | + height: 75rpx; | ||
| 1864 | + margin:0 auto; | ||
| 1865 | + background:#c41830; | ||
| 1866 | + color:#fff; | ||
| 1867 | + border-radius:10rpx; | ||
| 1868 | + font-size:30rpx; | ||
| 1869 | + margin-top: 50rpx; | ||
| 1870 | +} | ||
| 1871 | +.xc-not-Selection{ | ||
| 1872 | + width: 60rpx; | ||
| 1873 | + height: 60rpx; | ||
| 1874 | + background: #eeeeee; | ||
| 1875 | +} | ||
| 1876 | + | ||
| 1877 | +/*---------------视频图片---------------*/ | ||
| 1878 | +.xc-imageCount { | ||
| 1879 | + width:95rpx; | ||
| 1880 | + height:50rpx; | ||
| 1881 | + background-color: rgba(0, 0, 0, 0.3); | ||
| 1882 | + border-radius:40rpx; | ||
| 1883 | + line-height:50rpx; | ||
| 1884 | + color:#fff; | ||
| 1885 | + text-align:center; | ||
| 1886 | + font-size:26rpx; | ||
| 1887 | + position:absolute; | ||
| 1888 | + | ||
| 1889 | + right:23rpx; | ||
| 1890 | + bottom:21rpx; | ||
| 1891 | +} | ||
| 1892 | + | ||
| 1893 | + | ||
| 1894 | +/* 视频图片的边框 */ | ||
| 1895 | +.xc-videos-picture{ | ||
| 1896 | + width: 100%; | ||
| 1897 | + height: 750rpx; | ||
| 1898 | +} | ||
| 1899 | +/* 视频 */ | ||
| 1900 | +.xc-videos{ | ||
| 1901 | + width: 100%; | ||
| 1902 | + height:544rpx; | ||
| 1903 | + | ||
| 1904 | + | ||
| 1905 | +} | ||
| 1906 | +/* 点击视频或图片 */ | ||
| 1907 | +.xc-video-picture{ | ||
| 1908 | + | ||
| 1909 | + bottom: 20rpx; | ||
| 1910 | + left: 0rpx; | ||
| 1911 | + display: flex; | ||
| 1912 | + align-items: center; | ||
| 1913 | + justify-content:center; | ||
| 1914 | + width: 45%; | ||
| 1915 | + height: 60rpx; | ||
| 1916 | + margin-left: 215rpx; | ||
| 1917 | + | ||
| 1918 | +} | ||
| 1919 | +.xc-video-button:before{ | ||
| 1920 | + content: ""; | ||
| 1921 | + position: absolute; | ||
| 1922 | + left: 48%; | ||
| 1923 | + top: 40%; | ||
| 1924 | + width: 0; | ||
| 1925 | + height: 0; | ||
| 1926 | + margin-left: -36rpx; | ||
| 1927 | + margin-top: -10rpx; | ||
| 1928 | + border-width:13rpx; | ||
| 1929 | + border-style: dashed; | ||
| 1930 | + border-color: transparent transparent transparent #fff; | ||
| 1931 | + font-size: 0; | ||
| 1932 | + line-height: 0; | ||
| 1933 | + z-index: 2; | ||
| 1934 | + -webkit-backface-visibility: hidden; | ||
| 1935 | +} | ||
| 1936 | +.xc-video-buttons:before{ | ||
| 1937 | + content: ""; | ||
| 1938 | + position: absolute; | ||
| 1939 | + left: 50%; | ||
| 1940 | + top:41%; | ||
| 1941 | + width: 0; | ||
| 1942 | + height: 0; | ||
| 1943 | + margin-left: -36rpx; | ||
| 1944 | + margin-top: -10rpx; | ||
| 1945 | + border-width:13rpx; | ||
| 1946 | + border-style: dashed; | ||
| 1947 | + border-color: transparent transparent transparent #000; | ||
| 1948 | + font-size: 0; | ||
| 1949 | + line-height: 0; | ||
| 1950 | + z-index: 2; | ||
| 1951 | + -webkit-backface-visibility: hidden; | ||
| 1952 | +} | ||
| 1953 | + | ||
| 1954 | +.xc-video{ | ||
| 1955 | + width:100rpx; | ||
| 1956 | + height: 50rpx; | ||
| 1957 | + line-height: 50rpx; | ||
| 1958 | + text-align: center; | ||
| 1959 | + margin-left:-30rpx; | ||
| 1960 | + | ||
| 1961 | + | ||
| 1962 | +} | ||
| 1963 | +/* 图片 */ | ||
| 1964 | +.xc-picture{ | ||
| 1965 | + color: #000; | ||
| 1966 | + background: #dcdcdc; | ||
| 1967 | + width: 94rpx; | ||
| 1968 | + height: 45rpx; | ||
| 1969 | + font-size: 25rpx; | ||
| 1970 | + border-radius: 25rpx; | ||
| 1971 | + font-family: 'SimHei',Arial; | ||
| 1972 | + text-align: center; | ||
| 1973 | + line-height: 45rpx; | ||
| 1974 | + margin-left:53rpx | ||
| 1975 | + | ||
| 1976 | +} | ||
| 1977 | +/* 点击视频 */ | ||
| 1978 | +.xc-video-button{ | ||
| 1979 | + position: relative; | ||
| 1980 | + color: #000; | ||
| 1981 | + background: #dcdcdc; | ||
| 1982 | + width: 85rpx; | ||
| 1983 | + height: 45rpx; | ||
| 1984 | + line-height: 45rpx; | ||
| 1985 | + font-size: 30rpx; | ||
| 1986 | + border-radius: 25rpx; | ||
| 1987 | + font-family: 'SimHei',Arial; | ||
| 1988 | + padding-left: 11rpx; | ||
| 1989 | +} | ||
| 1990 | + | ||
| 1991 | + | ||
| 1992 | +.xc-sn{ | ||
| 1993 | + color: #fff; | ||
| 1994 | + background: #c7161e; | ||
| 1995 | + border-color: transparent transparent transparent #fff; | ||
| 1996 | +} | ||
| 1997 | +/* 图片 */ | ||
| 1998 | +.xc-pictures{ | ||
| 1999 | + width: 100%; | ||
| 2000 | + height:529rpx; | ||
| 2001 | + | ||
| 2002 | +} | ||
| 2003 | +/*视频封面的图片 */ | ||
| 2004 | +.xc-picturess{ | ||
| 2005 | + position: relative; | ||
| 2006 | + width: 100%; | ||
| 2007 | + height:529rpx; | ||
| 2008 | +} | ||
| 2009 | +/* 播放 */ | ||
| 2010 | +.xc-play{ | ||
| 2011 | + width: 130rpx; | ||
| 2012 | + height: 130rpx; | ||
| 2013 | + position: absolute; | ||
| 2014 | + top:207rpx; | ||
| 2015 | + left:309rpx; | ||
| 2016 | +} | ||
| 2017 | + | ||
| 2018 | +.xc-video-buttons{ | ||
| 2019 | + position: relative; | ||
| 2020 | + color: #000; | ||
| 2021 | + background: #dcdcdc; | ||
| 2022 | + width: 85rpx; | ||
| 2023 | + height: 45rpx; | ||
| 2024 | + line-height: 45rpx; | ||
| 2025 | + font-size: 30rpx; | ||
| 2026 | + border-radius: 25rpx; | ||
| 2027 | + font-family: 'SimHei',Arial; | ||
| 2028 | + padding-left: 11rpx; | ||
| 2029 | +} | ||
| 2030 | + | ||
| 2031 | + | ||
| 2032 | +.wsize{font-size: 32rpx} | ||
| 2033 | +.five-level-word{font-size: 28rpx;} | ||
| 2034 | + | ||
| 2035 | + | ||
| 2036 | +/*-- 推荐商品 --*/ | ||
| 2037 | +.xc-goods{ | ||
| 2038 | + height: auto; | ||
| 2039 | + background: #f2f2f2; | ||
| 2040 | + padding: 0 20rpx; | ||
| 2041 | + margin-top: -25rpx; | ||
| 2042 | + padding-bottom: 20rpx | ||
| 2043 | +} | ||
| 2044 | + | ||
| 2045 | +.xc-goods-recommend { | ||
| 2046 | + border-radius: 20rpx; | ||
| 2047 | + width:345rpx; | ||
| 2048 | + height: 450rpx; | ||
| 2049 | + margin-top: 25rpx; | ||
| 2050 | + display: inline-block; | ||
| 2051 | + | ||
| 2052 | +} | ||
| 2053 | + | ||
| 2054 | +.xc-goods-recommend.ml{ margin-left: 22rpx} | ||
| 2055 | + | ||
| 2056 | +.xc-goods-recommend .xc-goods-imgs{ | ||
| 2057 | + width: 100%; | ||
| 2058 | + height: 325rpx; | ||
| 2059 | + border-radius:20rpx 20rpx 0 0; | ||
| 2060 | +} | ||
| 2061 | + | ||
| 2062 | +.xc-goods-bottom{ | ||
| 2063 | + width: 345rpx; | ||
| 2064 | + height: 134rpx; | ||
| 2065 | + background: #fff; | ||
| 2066 | + border-radius:0 0 20rpx 20rpx; | ||
| 2067 | + bottom:-8rpx; | ||
| 2068 | + left:0rpx; | ||
| 2069 | +} | ||
| 2070 | +.xc-goods-bottom .monry-frame{ | ||
| 2071 | + width:283rpx; | ||
| 2072 | +height:52rpx; | ||
| 2073 | +padding-left:24rpx; | ||
| 2074 | + | ||
| 2075 | +} | ||
| 2076 | +.xc-good-explain{ | ||
| 2077 | + width: 283rpx; | ||
| 2078 | + height:60rpx; | ||
| 2079 | + word-break: normal; | ||
| 2080 | + margin-left:30rpx; | ||
| 2081 | + font-size: 26rpx; | ||
| 2082 | + line-height: 30rpx; | ||
| 2083 | + margin-top: 5rpx; | ||
| 2084 | +} | ||
| 2085 | +.money-color-val{ | ||
| 2086 | + color: #c6172f; | ||
| 2087 | +} | ||
| 2088 | +.rmb-symbol{ | ||
| 2089 | + line-height:81rpx; | ||
| 2090 | + height:53rpx; | ||
| 2091 | + font-size: 28rpx; | ||
| 2092 | +} | ||
| 2093 | +.xc-original-price{ | ||
| 2094 | + color: #c0c0c0; | ||
| 2095 | +} | ||
| 2096 | +/* 文字中间加线条 */ | ||
| 2097 | +.word-lines{ | ||
| 2098 | + text-decoration:line-through; | ||
| 2099 | + line-height:90rpx; | ||
| 2100 | + margin-left:10rpx; | ||
| 2101 | + font-size: 20rpx; | ||
| 2102 | +} | ||
| 2103 | + | ||
| 2104 | + .xc-linellae-frame{ | ||
| 2105 | + width: 100%; | ||
| 2106 | + height: 60rpx; | ||
| 2107 | + background: #f2f2f2; | ||
| 2108 | +} | ||
| 2109 | +.xc-linellae-frame .xc-linellae{ | ||
| 2110 | + width: 386rpx; | ||
| 2111 | + height: 1rpx; | ||
| 2112 | + border-bottom: 1rpx solid #a5a5a5; | ||
| 2113 | +} | ||
| 2114 | +.xc-recommend-frame{ | ||
| 2115 | +background:#f2f2f2; | ||
| 2116 | +width:97rpx; | ||
| 2117 | +height:100%; | ||
| 2118 | +padding-left: 10rpx; | ||
| 2119 | +} | ||
| 2120 | +.xc-recommend-frame .xc-recommend{ | ||
| 2121 | + width: 35rpx; | ||
| 2122 | + height: 27rpx; | ||
| 2123 | +} | ||
| 2124 | +.xc-recommend-frame .xc-recommend-word{ | ||
| 2125 | + width:58rpx; | ||
| 2126 | +font-size:24rpx; | ||
| 2127 | +color: #a9a9a9; | ||
| 2128 | +margin-left: 5rpx; | ||
| 2129 | +margin-bottom: 5rpx; | ||
| 2130 | +margin-top: 1rpx; | ||
| 2131 | + | ||
| 2132 | +} | ||
| 2133 | +.xc-price-frame{ | ||
| 2134 | + color: #ec0022; | ||
| 2135 | +height:44rpx; | ||
| 2136 | +} | ||
| 2137 | +.xc-price-frame .sign{ | ||
| 2138 | +margin-top:19rpx; | ||
| 2139 | +margin-left:-4px; | ||
| 2140 | +} | ||
| 2141 | +.xc-val-price{ | ||
| 2142 | +margin-left:24rpx; | ||
| 2143 | +color: #ec0022; | ||
| 2144 | +padding-top:13rpx; | ||
| 2145 | +} | ||
| 2146 | +.xc-val-price .save{ | ||
| 2147 | + border-radius:10rpx; | ||
| 2148 | + margin-top:5rpx; | ||
| 2149 | + background:#fed2d9; | ||
| 2150 | + min-width:230rpx; | ||
| 2151 | + height:40rpx; | ||
| 2152 | + line-height:40rpx; | ||
| 2153 | + width: auto; | ||
| 2154 | + padding-left:12rpx; | ||
| 2155 | + padding-right:12rpx; | ||
| 2156 | + | ||
| 2157 | +} | ||
| 2158 | +.xc-unit-price{ | ||
| 2159 | + margin-top:25rpx; | ||
| 2160 | +padding-left:-4rpx; | ||
| 2161 | + | ||
| 2162 | +} | ||
| 2163 | +.xc-explain{ | ||
| 2164 | + color:#292929; | ||
| 2165 | + width:542rpx; | ||
| 2166 | +} | ||
| 2167 | +.xc-item{width: 16%; font-size: 26rpx; color: #666;margin-right:5rpx;} | ||
| 2168 | +.xc-item .yuan{ | ||
| 2169 | + width: 38rpx; | ||
| 2170 | + height: 38rpx; | ||
| 2171 | + line-height: 38rpx; | ||
| 2172 | + border:1rpx solid #f3f1f2; | ||
| 2173 | +margin-left:33rpx; | ||
| 2174 | + | ||
| 2175 | +} | ||
| 2176 | +.xc-item .word{ | ||
| 2177 | + width:104rpx; | ||
| 2178 | + margin-top:16rpx; | ||
| 2179 | + color:#363636; | ||
| 2180 | + font-weight:600; | ||
| 2181 | + | ||
| 2182 | +} | ||
| 2183 | +.xc-item .circle-color{ | ||
| 2184 | + background: #d60024; | ||
| 2185 | + color: #fff; | ||
| 2186 | +} | ||
| 2187 | +.xc-item .circle-color1{ | ||
| 2188 | + background: #fefefe; | ||
| 2189 | + color: #666666; | ||
| 2190 | +} | ||
| 2191 | +.link{ | ||
| 2192 | +height:6rpx; | ||
| 2193 | +width:180rpx; | ||
| 2194 | +top:54rpx; | ||
| 2195 | +left:32px; | ||
| 2196 | +} | ||
| 2197 | +.link1{ | ||
| 2198 | +height:6rpx; | ||
| 2199 | +width:166rpx; | ||
| 2200 | +top:54rpx; | ||
| 2201 | +left:264rpx; | ||
| 2202 | +} | ||
| 2203 | +.link2{ | ||
| 2204 | + height:6rpx; | ||
| 2205 | +width:157rpx; | ||
| 2206 | +top:54rpx; | ||
| 2207 | +right:87rpx; | ||
| 2208 | +} | ||
| 2209 | +.link-color-red{ | ||
| 2210 | + background: #d60024;} | ||
| 2211 | +.link-color{ | ||
| 2212 | + background: #e5e5e5; | ||
| 2213 | +} | ||
| 2214 | +.xc-qt-price{ | ||
| 2215 | + top:-15rpx; | ||
| 2216 | +left:25rpx; | ||
| 2217 | + color: #fff; | ||
| 2218 | +} | ||
| 2219 | +.xc-qt-price .xc-qtunit-price{ | ||
| 2220 | + margin-left:6rpx; | ||
| 2221 | +margin-top:-4rpx; | ||
| 2222 | +} | ||
| 2223 | +.xc-nanber{ | ||
| 2224 | + top:-25rpx; | ||
| 2225 | +left:289rpx; | ||
| 2226 | + | ||
| 2227 | +} | ||
| 2228 | +.xc-qtsign{ | ||
| 2229 | +margin-top:5rpx; | ||
| 2230 | + | ||
| 2231 | +} | ||
| 2232 | +.xc-people-img{ | ||
| 2233 | + height: 36rpx; | ||
| 2234 | + width: 36rpx; | ||
| 2235 | + background: #fff; | ||
| 2236 | + border-radius: 7rpx; | ||
| 2237 | + | ||
| 2238 | +} | ||
| 2239 | +.xc-people-img .imgs{ | ||
| 2240 | + width: 28rpx; | ||
| 2241 | + height: 28rpx; | ||
| 2242 | + margin-top:4rpx; | ||
| 2243 | + | ||
| 2244 | +} | ||
| 2245 | +.xc-people-val{ | ||
| 2246 | + | ||
| 2247 | + height: 32rpx; | ||
| 2248 | + border-top: 1rpx solid #fff; | ||
| 2249 | + border-bottom: 1rpx solid #fff; | ||
| 2250 | + border-right: 1rpx solid #fff; | ||
| 2251 | + border-radius:0 7rpx 7rpx 0; | ||
| 2252 | + line-height:32rpx; | ||
| 2253 | + margin-left:-6rpx; | ||
| 2254 | + padding: 0 12rpx; | ||
| 2255 | +} | ||
| 2256 | +.word-color{ | ||
| 2257 | + color:#d70024; | ||
| 2258 | +} | ||
| 2259 | +.word-color-lan{ | ||
| 2260 | + color:#0393e1; | ||
| 2261 | +} | ||
| 2262 | +.pt_view .hy-stop{ | ||
| 2263 | + top: -23rpx; | ||
| 2264 | + right: 56rpx; | ||
| 2265 | +} | ||
| 2266 | +.xc-time-val{width:36rpx;height:36rpx;border-radius:7rpx; line-height: 36rpx;} | ||
| 2267 | +.xc-time{margin-right:10rpx; margin-left:10rpx; margin-top:-32rpx; | ||
| 2268 | +} | ||
| 2269 | +.xc-goods-explain{ | ||
| 2270 | + width:100%; | ||
| 2271 | + padding-left:30rpx; | ||
| 2272 | + margin-left:-9rpx; | ||
| 2273 | + height: 150rpx | ||
| 2274 | +} | ||
| 2275 | +.xc-partner-frame{ | ||
| 2276 | +border-bottom:2rpx solid #eee; | ||
| 2277 | +width:100%; | ||
| 2278 | +padding:0 20rpx; | ||
| 2279 | +height:56rpx; | ||
| 2280 | +} | ||
| 2281 | +.xc-person-number{ | ||
| 2282 | + width:120rpx; | ||
| 2283 | + color: #999999; | ||
| 2284 | + padding-left:8rpx; | ||
| 2285 | + text-align: left | ||
| 2286 | +} | ||
| 2287 | + | ||
| 2288 | +.xc-miaosha-time{ | ||
| 2289 | +right:17rpx; top:55rpx; | ||
| 2290 | +} | ||
| 2291 | +.pd_top1{padding-top: 10rpx} | ||
| 2292 | +.s_ms_bth{margin-top: 85rpx} | ||
| 2293 | + | ||
| 2294 | + | ||
| 2295 | +.no_pj_list{text-align: center; width: 100%; color: #999; margin: 30rpx 0; display: inline-block; font-size: 28rpx} | ||
| 2296 | +/* 门店地址 */ | ||
| 2297 | +.xc-address_frame{ | ||
| 2298 | + /* border-top:1rpx solid #eee; */ | ||
| 2299 | + width: 100%; | ||
| 2300 | + height: auto; | ||
| 2301 | +} | ||
| 2302 | +.on_height{ | ||
| 2303 | +height: 90rpx; | ||
| 2304 | +} | ||
| 2305 | +.sn_height{ | ||
| 2306 | + min-height: 170rpx; height: auto;padding: 10rpx 0; | ||
| 2307 | +} | ||
| 2308 | +.xc-address_frame .address_frame{ | ||
| 2309 | + width: 92%; | ||
| 2310 | +padding-left: 10rpx; | ||
| 2311 | +margin: auto; | ||
| 2312 | + | ||
| 2313 | +} | ||
| 2314 | +.shop_name{ | ||
| 2315 | + | ||
| 2316 | +} | ||
| 2317 | +.stores-img{ | ||
| 2318 | +width: 40rpx; | ||
| 2319 | + height: 35rpx; | ||
| 2320 | + margin-right: 10rpx; | ||
| 2321 | +} | ||
| 2322 | +.shop_name{ | ||
| 2323 | + margin-right: 10rpx; | ||
| 2324 | +} | ||
| 2325 | +.address{ | ||
| 2326 | + width: 87%; | ||
| 2327 | + margin-top: 5rpx; | ||
| 2328 | + margin-bottom: 5rpx; | ||
| 2329 | +} | ||
| 2330 | +.distance{ | ||
| 2331 | + padding-left: 15rpx; | ||
| 2332 | + padding-right: 15rpx; | ||
| 2333 | + background: #eee; | ||
| 2334 | + border-radius: 20rpx; | ||
| 2335 | + margin-right: 5rpx; | ||
| 2336 | + color: #999; | ||
| 2337 | + height: 38rpx; | ||
| 2338 | +line-height: 38rpx; | ||
| 2339 | + | ||
| 2340 | +} | ||
| 2341 | +/* 选择门店的弹窗 */ | ||
| 2342 | +.mongolia-layer{ | ||
| 2343 | + position: fixed; | ||
| 2344 | +left: 0; | ||
| 2345 | +top: 0; | ||
| 2346 | +right: 0; | ||
| 2347 | +bottom: 0; | ||
| 2348 | +z-index: 11; | ||
| 2349 | +background: rgba(0,0,0,0.4); | ||
| 2350 | +width: 100%; | ||
| 2351 | +height: 91.9%; | ||
| 2352 | + | ||
| 2353 | +} | ||
| 2354 | + | ||
| 2355 | +.popup-frame{ | ||
| 2356 | + position: fixed; | ||
| 2357 | +bottom:99rpx; | ||
| 2358 | +z-index: 20; | ||
| 2359 | +background: white; | ||
| 2360 | +width: 100%; | ||
| 2361 | +border-radius: 20rpx 20rpx 0 0; | ||
| 2362 | +height: 72%; | ||
| 2363 | +bottom: 0; | ||
| 2364 | +} | ||
| 2365 | +.popup-top{ | ||
| 2366 | + border-bottom: 1rpx solid #eee; | ||
| 2367 | + height: 155rpx; | ||
| 2368 | + width: 95%; | ||
| 2369 | + margin: auto; | ||
| 2370 | + line-height: 155rpx; | ||
| 2371 | + | ||
| 2372 | +} | ||
| 2373 | +.bg_rights{ | ||
| 2374 | + border-top: 2rpx solid ; | ||
| 2375 | + border-right: 2rpx solid ; | ||
| 2376 | + transform: rotate(45deg); | ||
| 2377 | + display:inline-block; | ||
| 2378 | + width:15rpx;height:15rpx; | ||
| 2379 | + border-color:#da0b31; | ||
| 2380 | +} | ||
| 2381 | +.modal-closes { | ||
| 2382 | + position: absolute; | ||
| 2383 | + right: 30rpx; | ||
| 2384 | + top: -15rpx; | ||
| 2385 | + height: 25rpx; | ||
| 2386 | + | ||
| 2387 | +} | ||
| 2388 | +.choose_more{ | ||
| 2389 | + margin-top: 40rpx; | ||
| 2390 | + margin-right: 20rpx; | ||
| 2391 | + | ||
| 2392 | +} | ||
| 2393 | +.choose_mores{ | ||
| 2394 | + margin-top: 30rpx; | ||
| 2395 | + margin-right: 15rpx; | ||
| 2396 | + | ||
| 2397 | +} | ||
| 2398 | +.store-list{ | ||
| 2399 | + width: 95%; | ||
| 2400 | + height: 72%; | ||
| 2401 | + overflow-y: scroll; | ||
| 2402 | + margin: auto; | ||
| 2403 | +} | ||
| 2404 | +.store-list .store_choose{ | ||
| 2405 | + width: 100%; | ||
| 2406 | + height: 120rpx; | ||
| 2407 | + line-height: 125rpx; | ||
| 2408 | + border-bottom: 1rpx solid #eee; | ||
| 2409 | + | ||
| 2410 | +} | ||
| 2411 | +.store-list .store_choose .store{ | ||
| 2412 | +width: 100%; | ||
| 2413 | +margin: auto; | ||
| 2414 | +line-height: 37rpx; | ||
| 2415 | +padding-left: 20rpx; | ||
| 2416 | + | ||
| 2417 | +} | ||
| 2418 | +.xc-hook{ | ||
| 2419 | + width: 35rpx; | ||
| 2420 | + height: 35rpx; | ||
| 2421 | + transform: rotate(-145deg); | ||
| 2422 | +line-height: 37rpx; | ||
| 2423 | +text-align: center; | ||
| 2424 | +} | ||
| 2425 | + .xc-hooks{ | ||
| 2426 | + width: 30rpx; | ||
| 2427 | + height: 30rpx; | ||
| 2428 | + border: 1rpx solid #999; | ||
| 2429 | + } | ||
| 2430 | + .address-frame{ | ||
| 2431 | + width: 93%; | ||
| 2432 | +margin-left: 7rpx; | ||
| 2433 | + | ||
| 2434 | + } | ||
| 2435 | + .nearby_store{ | ||
| 2436 | +margin-left: 17rpx; | ||
| 2437 | + } | ||
| 2438 | + .address_name{ | ||
| 2439 | + margin-right: 10rpx; | ||
| 2440 | + | ||
| 2441 | + } | ||
| 2442 | + .address-val{ | ||
| 2443 | + height: 38rpx; | ||
| 2444 | +line-height: 38rpx; | ||
| 2445 | + | ||
| 2446 | + } | ||
| 2447 | + .store-bottom{ | ||
| 2448 | + width: 85%; | ||
| 2449 | + margin: auto; | ||
| 2450 | + height: 70rpx; | ||
| 2451 | + } | ||
| 2452 | + .determine{ | ||
| 2453 | + width: 260rpx; | ||
| 2454 | + height: 55rpx; | ||
| 2455 | + border-radius: 50rpx; | ||
| 2456 | + line-height: 55rpx; | ||
| 2457 | + } | ||
| 2458 | + .default{ | ||
| 2459 | + width: 260rpx; | ||
| 2460 | + height: 55rpx; | ||
| 2461 | + border:3rpx solid #c8c8c8; | ||
| 2462 | + border-radius: 50rpx; | ||
| 2463 | + line-height: 55rpx; | ||
| 2464 | + } | ||
| 2465 | + .store-bottom-frame{ | ||
| 2466 | + width: 95%; | ||
| 2467 | + margin: auto; | ||
| 2468 | + | ||
| 2469 | + } | ||
| 2470 | + /* 门店分类列表 */ | ||
| 2471 | +.sort_store_list{ | ||
| 2472 | + height: 82%; | ||
| 2473 | + overflow: hidden; | ||
| 2474 | + overflow-y: scroll; | ||
| 2475 | + width: 95%; | ||
| 2476 | + margin: auto; | ||
| 2477 | +} | ||
| 2478 | +.sort_store_list .sort-store-frame{ | ||
| 2479 | + width: 100%; | ||
| 2480 | +height: 100rpx; | ||
| 2481 | +line-height:100rpx; | ||
| 2482 | +border-bottom: 1rpx solid #eee; | ||
| 2483 | + | ||
| 2484 | +} | ||
| 2485 | +.sort_store_list .sort-store-frame .sort-store{ | ||
| 2486 | + width: 94.5%; | ||
| 2487 | + margin: auto; | ||
| 2488 | +} | ||
| 2489 | +.black_rights-frame{ | ||
| 2490 | +width: 50%; | ||
| 2491 | +} | ||
| 2492 | +.black_rights-frame .black_rights{ | ||
| 2493 | + border-top: 3rpx solid; | ||
| 2494 | +border-right: 3rpx solid; | ||
| 2495 | +transform: rotate(45deg); | ||
| 2496 | +display: inline-block; | ||
| 2497 | +width: 20rpx; | ||
| 2498 | +height: 20rpx; | ||
| 2499 | +} | ||
| 2500 | +.xc-val-money{ | ||
| 2501 | + height:55rpx; | ||
| 2502 | +} | ||
| 2503 | + | ||
| 2504 | +.xc-distance-bottom{ | ||
| 2505 | + margin-bottom: 40rpx; | ||
| 2506 | +} | ||
| 2507 | +.xc-distance-top{ | ||
| 2508 | +margin-top: 10rpx; | ||
| 2509 | +} | ||
| 2510 | +.xc-width{ | ||
| 2511 | + width: 100%; | ||
| 2512 | +} | ||
| 2513 | +.right-arrow{ width: 15rpx; height:15rpx; | ||
| 2514 | + border-top: 2rpx solid #d70026; | ||
| 2515 | + border-right: 2rpx solid #d70026; | ||
| 2516 | + transform: rotate(45deg);display:inline-block; | ||
| 2517 | + margin-bottom:3rpx; | ||
| 2518 | +} | ||
| 2519 | +.xc-goods-attribute{ | ||
| 2520 | + border-bottom: 1px solid #eee; | ||
| 2521 | +padding-bottom: 15px; | ||
| 2522 | +margin-bottom:40rpx; | ||
| 2523 | +} | ||
| 2524 | +.xc-val-fream{ | ||
| 2525 | + width: 105rpx; | ||
| 2526 | +} | ||
| 2527 | +.is_stock{ | ||
| 2528 | +width: 58%; | ||
| 2529 | +height: 70rpx; | ||
| 2530 | +border-radius: 55rpx; | ||
| 2531 | +} | ||
| 2532 | +.select_store_height{ | ||
| 2533 | + height: 50rpx; | ||
| 2534 | +} | ||
| 2535 | +.butttem5{ | ||
| 2536 | + margin-bottom: 5rpx; | ||
| 2537 | +} | ||
| 2538 | + | ||
| 2539 | +.no_pj_list{text-align: center; width: 100%; color: #999; margin-top: 30rpx; display: inline-block; font-size: 28rpx} | ||
| 2540 | + | ||
| 2541 | + | ||
| 2542 | +.join-cart>view.no_store { | ||
| 2543 | + width: 58%; background-color: #adadad; | ||
| 2544 | +} | ||
| 2545 | + | ||
| 2546 | +.s_btn{ margin-top: 25rpx; } | ||
| 2547 | +/* 美妆价的样式 */ | ||
| 2548 | +.beauty-makeup-frame{ | ||
| 2549 | + width: 101.5%; | ||
| 2550 | + margin: auto; | ||
| 2551 | + height: 120rpx; | ||
| 2552 | + border-radius: 15rpx; | ||
| 2553 | + margin-top: 18px; | ||
| 2554 | + | ||
| 2555 | +} | ||
| 2556 | +.beauty-makeup-frame .left{ | ||
| 2557 | + width: 80%; | ||
| 2558 | + height: 100%; | ||
| 2559 | + background:#f7f7f7; | ||
| 2560 | + border-radius: 20rpx 0rpx 0rpx 20rpx; | ||
| 2561 | + padding-left: 20rpx; | ||
| 2562 | +} | ||
| 2563 | + .card-frame{ | ||
| 2564 | + margin-top: 0rpx; padding-right: 23rpx; | ||
| 2565 | + margin-right: 15rpx; | ||
| 2566 | +} | ||
| 2567 | +.advert-card{ | ||
| 2568 | + margin-top: 0rpx!important; | ||
| 2569 | + | ||
| 2570 | +} | ||
| 2571 | +.beauty-makeup-frame .right{ | ||
| 2572 | + width: 20%; | ||
| 2573 | + height: 100%; | ||
| 2574 | + background:#f3efe3; | ||
| 2575 | + border-radius: 0rpx 20rpx 20rpx 0rpx; | ||
| 2576 | + } | ||
| 2577 | +.grade-card-frame{ | ||
| 2578 | + | ||
| 2579 | + height:45rpx ; | ||
| 2580 | + background: #3c300a; | ||
| 2581 | + border-radius: 20rpx; | ||
| 2582 | + margin-top: 10px; | ||
| 2583 | + margin-left: 7rpx; | ||
| 2584 | + justify-content: center; | ||
| 2585 | + padding: 0 15rpx; | ||
| 2586 | +} | ||
| 2587 | +.grade-card-frame .img{ | ||
| 2588 | + width: 24rpx; | ||
| 2589 | + height: 24rpx; | ||
| 2590 | + margin-top: 2px; | ||
| 2591 | + | ||
| 2592 | +} | ||
| 2593 | +.grade-card-frame .card-name{ | ||
| 2594 | + margin-left: 8rpx; | ||
| 2595 | + /* max-width: 120rpx; */ | ||
| 2596 | + max-width: 165rpx; | ||
| 2597 | +} | ||
| 2598 | +.card-effect{ | ||
| 2599 | + margin-left: 15rpx; | ||
| 2600 | +} | ||
| 2601 | +.at_once_carde{ | ||
| 2602 | + width:65rpx; | ||
| 2603 | + height: 75rpx; | ||
| 2604 | + line-height:38rpx; | ||
| 2605 | +} | ||
| 2606 | +.bg_right{ width: 18rpx; height:18rpx; | ||
| 2607 | + border-top: 2rpx solid #333; | ||
| 2608 | + border-right: 2rpx solid #333; | ||
| 2609 | + transform: rotate(45deg);display:inline-block; | ||
| 2610 | + margin-bottom:3rpx; | ||
| 2611 | + | ||
| 2612 | +} | ||
| 2613 | +.carde_frame{ | ||
| 2614 | + height: 50rpx; | ||
| 2615 | + line-height: 18rpx | ||
| 2616 | +} | ||
| 2617 | + | ||
| 2618 | +button.custom-service { line-height: normal; border: 0;} | ||
| 2619 | +button.custom-service::after{ | ||
| 2620 | + border: 0; | ||
| 2621 | +} | ||
| 2622 | +.no_store{color:#d60021; font-size: 26rpx;} | ||
| 2623 | +.cx_show_view{ width: 580rpx; line-height: 30rpx; margin-bottom: 6rpx; } | ||
| 2624 | +.cx_show_view .word{ width: 400rpx} | ||
| 2625 | +.prom_condition { | ||
| 2626 | + color: #d60021; | ||
| 2627 | + width: 180rpx; | ||
| 2628 | + height: 30rpx; | ||
| 2629 | + font-size: 20rpx; | ||
| 2630 | + padding-top: 0.01rpx; | ||
| 2631 | + display: flex; | ||
| 2632 | + justify-content: center; | ||
| 2633 | + align-items: center; | ||
| 2634 | + border: #d60021 solid 1rpx; | ||
| 2635 | + border-radius: 10rpx; | ||
| 2636 | + margin-right:10rpx ; | ||
| 2637 | + margin-left: 10rpx; | ||
| 2638 | + | ||
| 2639 | +} | ||
| 2640 | +.hui_img{ width: 44rpx; height: 44rpx; margin-right: 8rpx} | ||
| 2641 | +.order_hui{color: #444; width: 420rpx} | ||
| 2642 | +.order_hui view{ height: 34rpx; line-height: 34rpx;} | ||
| 2643 | +.dp_img{width: 240rpx; height: 240rpx; margin: 0 40rpx} | ||
| 2644 | +.dp_cx_view{border-bottom: 0.02rpx solid #eee; padding-bottom: 40rpx} | ||
| 2645 | +.act_content{ margin-top: 40rpx} | ||
| 2646 | +.act_content view{ margin-bottom: 12rpx} | ||
| 2647 | +.color_b{color: #ff9c00} | ||
| 2648 | + | ||
| 2649 | +.poster-container { | ||
| 2650 | + box-sizing: border-box; | ||
| 2651 | + position: fixed; | ||
| 2652 | + top: 50%; | ||
| 2653 | + left: 50%; | ||
| 2654 | + transform: translate(-50%, -50%); | ||
| 2655 | + width: calc(100% - 120rpx); | ||
| 2656 | + z-index: 1000; | ||
| 2657 | +} | ||
| 2658 | +.mask { | ||
| 2659 | + position: fixed; | ||
| 2660 | + top: 0; | ||
| 2661 | + left: 0; | ||
| 2662 | + width: 100%; | ||
| 2663 | + height: 100%; | ||
| 2664 | + z-index: 999; | ||
| 2665 | + background-color: rgba(0,0,0,.4); | ||
| 2666 | +} | ||
| 2667 | +.poster-wrapper { | ||
| 2668 | + width: 100%; | ||
| 2669 | +} | ||
| 2670 | + | ||
| 2671 | +.poster { | ||
| 2672 | + box-sizing: border-box; | ||
| 2673 | + width: 100%; | ||
| 2674 | + height: 1055rpx; | ||
| 2675 | + border-radius: 20rpx; | ||
| 2676 | + /* box-shadow: 0 8px 12px #666; */ | ||
| 2677 | + position: relative; | ||
| 2678 | + z-index: 999; | ||
| 2679 | + overflow: hidden; | ||
| 2680 | +} | ||
| 2681 | +.poster-img { | ||
| 2682 | + display: block; | ||
| 2683 | + width: 100%; | ||
| 2684 | + height: 100%; | ||
| 2685 | +} | ||
| 2686 | +.btn-container { | ||
| 2687 | + display: flex; | ||
| 2688 | + justify-content: space-around; | ||
| 2689 | +} | ||
| 2690 | +.btn-share { | ||
| 2691 | + display: block; | ||
| 2692 | + background-color: #FE6867; | ||
| 2693 | + color: white; | ||
| 2694 | + border-radius: 8rpx; | ||
| 2695 | + line-height: 80rpx; | ||
| 2696 | + margin-top: 28rpx; | ||
| 2697 | + padding: 0 60rpx; | ||
| 2698 | +} | ||
| 2699 | +/* .btn-close { | ||
| 2700 | + background-color: rgba(0,0,0,.5); | ||
| 2701 | + color: white; | ||
| 2702 | + width: 40rpx; | ||
| 2703 | + height: 40rpx; | ||
| 2704 | + line-height: 40rpx; | ||
| 2705 | + text-align: center; | ||
| 2706 | + border-radius: 50%; | ||
| 2707 | + position: absolute; | ||
| 2708 | + right: 20rpx; | ||
| 2709 | + top: 10rpx; | ||
| 2710 | +} */ | ||
| 2711 | + | ||
| 2712 | +.goods-price .rel_txt{ | ||
| 2713 | + position: relative; top: 32rpx; font-size: 30rpx; | ||
| 2714 | +} | ||
| 2715 | +.goods-price .rel_img{width: 62rpx; height: 62rpx;position: relative; top: 12rpx;} | ||
| 2716 | + | ||
| 2717 | +.btn-close { | ||
| 2718 | + /* background-color: rgba(0,0,0,.5); */ | ||
| 2719 | + color: #ccc; | ||
| 2720 | + width: 50rpx; | ||
| 2721 | + height: 50rpx; | ||
| 2722 | + line-height: 50rpx; | ||
| 2723 | + text-align: center; | ||
| 2724 | + border-radius: 50%; | ||
| 2725 | + position: absolute; | ||
| 2726 | + right: 20rpx; | ||
| 2727 | + top: 20rpx; | ||
| 2728 | +} | ||
| 2729 | + | ||
| 2730 | +.icon-close { | ||
| 2731 | + font-size: 48rpx; | ||
| 2732 | +} | ||
| 2733 | +.quan_price{ | ||
| 2734 | + background-color: #ff4700; color: #fff; padding: 10rpx 25rpx; margin-left: 10rpx; border-radius: 30rpx; | ||
| 2735 | +} | ||
| 0 | \ No newline at end of file | 2736 | \ No newline at end of file |