Commit ed22eb7feb6cf30f3e7bbbccdafc4b0a60335f93
Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev
Showing
11 changed files
with
173 additions
and
513 deletions
components/diy_store_select/diy_store_select.js
| ... | ... | @@ -218,10 +218,18 @@ Component({ |
| 218 | 218 | } |
| 219 | 219 | e.splice(0, 0, th.data.top_store); //添加 |
| 220 | 220 | } |
| 221 | - | |
| 222 | - | |
| 221 | + | |
| 222 | + var ishas_cate=0; | |
| 223 | + for(let i in e){ | |
| 224 | + let item=e[i]; | |
| 225 | + if(item.category_id>0) { | |
| 226 | + ishas_cate=1;break; | |
| 227 | + } | |
| 228 | + } | |
| 229 | + | |
| 230 | + | |
| 223 | 231 | //单总量超出5个的时候 |
| 224 | - if (e.length > 5) { | |
| 232 | + if (e.length > 10 && ishas_cate) { | |
| 225 | 233 | getApp().request.get("/api/weshop/storagecategory/page", { |
| 226 | 234 | data: { |
| 227 | 235 | store_id: o.stoid, | ... | ... |
packageA/pages/goodsInfo/goodsInfo.js
| ... | ... | @@ -893,6 +893,16 @@ Page({ |
| 893 | 893 | }).then(res => { |
| 894 | 894 | var e = res; |
| 895 | 895 | if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length>0) { |
| 896 | + | |
| 897 | + var his_cate_num=0; | |
| 898 | + for(let i in e.data.data.pageData){ | |
| 899 | + let item=e.data.data.pageData[i]; | |
| 900 | + if(item.category_id>0){ | |
| 901 | + his_cate_num=1;break; | |
| 902 | + } | |
| 903 | + } | |
| 904 | + e.his_cate_num=his_cate_num; | |
| 905 | + | |
| 896 | 906 | //--普通门店排版-- |
| 897 | 907 | setTimeout(function(){ |
| 898 | 908 | var sto_list=th.data.data.storageId; |
| ... | ... | @@ -944,7 +954,7 @@ Page({ |
| 944 | 954 | if(!th.data.data) return false |
| 945 | 955 | wx.hideLoading(); |
| 946 | 956 | //单总量超出5个的时候 |
| 947 | - if (e.data.data.total > 5) { | |
| 957 | + if (e.data.data.total > 10 && e.his_cate_num) { | |
| 948 | 958 | getApp().request.get("/api/weshop/storagecategory/page", { |
| 949 | 959 | data: { |
| 950 | 960 | store_id: o.stoid, | ... | ... |
packageA/pages/profile/profile.js
| ... | ... | @@ -70,7 +70,9 @@ Page({ |
| 70 | 70 | is_lable_set: "", //是否启用我的兴趣标签 |
| 71 | 71 | check_label: [], //我选择的兴趣标签 |
| 72 | 72 | fir_guide_id:null, //存储会员详情接口出来的美导ID |
| 73 | - isLunar: 0, | |
| 73 | + isLunar: 0, | |
| 74 | + lat: null, //维度 | |
| 75 | + lon: null, //经度 | |
| 74 | 76 | |
| 75 | 77 | }, |
| 76 | 78 | //通过路径跳转到其他页面 |
| ... | ... | @@ -258,6 +260,15 @@ Page({ |
| 258 | 260 | success:function(res){ |
| 259 | 261 | var e = res; |
| 260 | 262 | if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length>0) { |
| 263 | + | |
| 264 | + var ishas_cate=0; | |
| 265 | + for(let i in e){ | |
| 266 | + let item=e[i]; | |
| 267 | + if(item.category_id>0) { | |
| 268 | + ishas_cate=1;break; | |
| 269 | + } | |
| 270 | + } | |
| 271 | + | |
| 261 | 272 | //-- 如果有默认选择门店的时候,要把默认门店放在第一位 -- |
| 262 | 273 | if (th.data.def_pick_store) { |
| 263 | 274 | for (var k = 0; k < e.data.data.pageData.length; k++) { |
| ... | ... | @@ -270,7 +281,7 @@ Page({ |
| 270 | 281 | } |
| 271 | 282 | |
| 272 | 283 | //单总量超出5个的时候 |
| 273 | - if (e.data.data.total > 5) { | |
| 284 | + if (e.data.data.total > 10 && ishas_cate) { | |
| 274 | 285 | i.get("/api/weshop/storagecategory/page", { |
| 275 | 286 | data: { |
| 276 | 287 | store_id: r.stoid, |
| ... | ... | @@ -613,6 +624,9 @@ Page({ |
| 613 | 624 | sto_sele_id: data.pickup_id, |
| 614 | 625 | }); |
| 615 | 626 | } |
| 627 | + if(!self.data.sto_sele_id){ | |
| 628 | + self.get_store_set(); | |
| 629 | + } | |
| 616 | 630 | }) |
| 617 | 631 | }else{ |
| 618 | 632 | self.setData({ |
| ... | ... | @@ -622,7 +636,11 @@ Page({ |
| 622 | 636 | stoname: data.pickup_name, |
| 623 | 637 | sto_sele_id: data.pickup_id, |
| 624 | 638 | }); |
| 625 | - } | |
| 639 | + } | |
| 640 | + | |
| 641 | + if(!self.data.sto_sele_id){ | |
| 642 | + self.get_store_set(); | |
| 643 | + } | |
| 626 | 644 | }; |
| 627 | 645 | } |
| 628 | 646 | }); |
| ... | ... | @@ -1174,6 +1192,83 @@ Page({ |
| 1174 | 1192 | // } |
| 1175 | 1193 | // }) |
| 1176 | 1194 | }, |
| 1195 | + | |
| 1196 | + | |
| 1197 | + get_store_set:function () { | |
| 1198 | + var th=this; | |
| 1199 | + //如果是扫码进来的 | |
| 1200 | + if(getApp().globalData.store_number){ | |
| 1201 | + var dd = { | |
| 1202 | + store_id: r.stoid, | |
| 1203 | + isstop: 0, | |
| 1204 | + pageSize: 1, | |
| 1205 | + page:1, | |
| 1206 | + pickup_no:getApp().globalData.store_number | |
| 1207 | + }; | |
| 1208 | + | |
| 1209 | + //获取扫码的门店 | |
| 1210 | + getApp().request.promiseGet("/api/weshop/pickup/list", { | |
| 1211 | + data: dd, | |
| 1212 | + }).then(res => { | |
| 1213 | + var top_store=res.data.data.pageData[0]; | |
| 1214 | + th.setData({ | |
| 1215 | + stoname: top_store.pickup_name, | |
| 1216 | + sto_sele_name: top_store.pickup_name, | |
| 1217 | + sto_sele_id: top_store.pickup_id, | |
| 1218 | + sto_sele_distr: top_store.distr_type, | |
| 1219 | + }) | |
| 1220 | + }) | |
| 1221 | + | |
| 1222 | + }else{ | |
| 1223 | + wx.getLocation({ | |
| 1224 | + type: 'gcj02', | |
| 1225 | + success: function(res) { | |
| 1226 | + th.data.lat = res.latitude; | |
| 1227 | + th.data.lon = res.longitude; | |
| 1228 | + th.set_fir_store_to_def(); | |
| 1229 | + }, | |
| 1230 | + fail: function(res) { | |
| 1231 | + if(res.errCode == 2) { | |
| 1232 | + getApp().confirmBox("请开启GPS定位", null, 25000, !1); | |
| 1233 | + } | |
| 1234 | + } | |
| 1235 | + }) | |
| 1236 | + } | |
| 1237 | + }, | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + //-- 设置最近的店为默认的店,一开始加载的时候 -- | |
| 1241 | + set_fir_store_to_def(){ | |
| 1242 | + var th=this; | |
| 1243 | + var dd = { | |
| 1244 | + store_id: r.stoid, | |
| 1245 | + isstop: 0, | |
| 1246 | + pageSize: 1, | |
| 1247 | + page:1, | |
| 1248 | + }; | |
| 1249 | + dd.lat = th.data.lat; | |
| 1250 | + dd.lon = th.data.lon; | |
| 1251 | + | |
| 1252 | + var top_store=getApp().globalData.pk_store; | |
| 1253 | + if(top_store){ | |
| 1254 | + dd.pickup_id=top_store.pickup_id; | |
| 1255 | + } | |
| 1256 | + | |
| 1257 | + //----------获取门店,最近的门店---------------- | |
| 1258 | + getApp().request.promiseGet("/api/weshop/pickup/list", { | |
| 1259 | + data: dd, | |
| 1260 | + }).then(res => { | |
| 1261 | + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ | |
| 1262 | + var top_store=res.data.data.pageData[0]; | |
| 1263 | + th.setData({ | |
| 1264 | + stoname: top_store.pickup_name, | |
| 1265 | + sto_sele_name: top_store.pickup_name, | |
| 1266 | + sto_sele_id: top_store.pickup_id, | |
| 1267 | + sto_sele_distr: top_store.distr_type, | |
| 1268 | + }) | |
| 1269 | + } | |
| 1270 | + }) | |
| 1271 | + }, | |
| 1177 | 1272 | |
| 1178 | 1273 | |
| 1179 | 1274 | ... | ... |
packageA/pages/prom_list/prom_list.js
| ... | ... | @@ -765,7 +765,15 @@ Page({ |
| 765 | 765 | data: dd, |
| 766 | 766 | }).then(res => { |
| 767 | 767 | var e = res; |
| 768 | - if (e.data.code == 0) { | |
| 768 | + if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length>0) { | |
| 769 | + var his_cate_num=0; | |
| 770 | + for(let i in e.data.data.pageData){ | |
| 771 | + let item=e.data.data.pageData[i]; | |
| 772 | + if(item.category_id>0){ | |
| 773 | + his_cate_num=1;break; | |
| 774 | + } | |
| 775 | + } | |
| 776 | + e.his_cate_num=his_cate_num; | |
| 769 | 777 | |
| 770 | 778 | //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店 |
| 771 | 779 | if(dd.lat && !th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage){ |
| ... | ... | @@ -811,7 +819,7 @@ Page({ |
| 811 | 819 | deal_pickup(e){ |
| 812 | 820 | var th=this; |
| 813 | 821 | //单总量超出5个的时候 |
| 814 | - if (e.data.data.total > 5) { | |
| 822 | + if (e.data.data.total > 10 && e.his_cate_num ){ | |
| 815 | 823 | getApp().request.get("/api/weshop/storagecategory/page", { |
| 816 | 824 | data: { |
| 817 | 825 | store_id: o.stoid, |
| ... | ... | @@ -1024,8 +1032,9 @@ Page({ |
| 1024 | 1032 | //数据组装下 |
| 1025 | 1033 | var em={};em.data={};em.data.data={}; |
| 1026 | 1034 | em.data.data.total=new_list.length; |
| 1027 | - em.data.data.pageData=new_list; | |
| 1028 | - | |
| 1035 | + em.data.data.pageData=new_list; | |
| 1036 | + em.data.his_cate_num=e.his_cate_num; | |
| 1037 | + | |
| 1029 | 1038 | if(th.data.fir_def_store && !is_find_def_store && th.data.fir_def_store.pickup_id){ |
| 1030 | 1039 | th.data.fir_def_store.CanOutQty=0; |
| 1031 | 1040 | //--当选择的门店是客户默认的门店的时候-- | ... | ... |
packageC/pages/presell/goodsInfo/buy_integral.wxml deleted
| 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="{{goodsInputNum <= 1 ? '':'subCartNum_inte'}}" class="sub {{goodsInputNum <= 1 ? 'active':''}}">-</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> | |
| 126 | 0 | \ No newline at end of file |
packageC/pages/presell/goodsInfo/buy_integral_normal.wxml deleted
| 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-nor="1" data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" 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="{{goodsInputNum <= 1 ? '':'subCartNum'}}" class="sub {{goodsInputNum <= 1 ? 'active':''}}">-</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 | - <!-- 提示再买多少优惠 --> | |
| 83 | - <view style="margin-top: 35rpx;color:#333;font-size:28rpx;" wx:if="{{hui_condition}}"> | |
| 84 | - 再买{{hui_condition.need}} | |
| 85 | - <text wx:if="{{hui_condition.money}}">,免{{hui_condition.money}}元</text> | |
| 86 | - <text wx:if="{{hui_condition.sale}}">,打{{hui_condition.sale}}折</text> | |
| 87 | - <text wx:if="{{hui_condition.past==1}}">,包邮</text> | |
| 88 | - <text wx:if="{{hui_condition.intValue>0}}">,送{{hui_condition.intValue}}积分</text> | |
| 89 | - <text wx:if="{{hui_condition.couponId>0}}">,送优惠券</text> | |
| 90 | - <text wx:if="{{hui_condition.gift_id>0}}">,送赠品</text> | |
| 91 | - <text wx:if="{{hui_condition.lb_id>0}}">,送礼包</text> | |
| 92 | - </view> | |
| 93 | - | |
| 94 | - | |
| 95 | - <!-- 按钮部分 --> | |
| 96 | - <view class="spec-cart-btns"> | |
| 97 | - | |
| 98 | - | |
| 99 | - <!-- 根本就找不到门店 --> | |
| 100 | - <block wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> | |
| 101 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">配送不匹配</view> | |
| 102 | - </block> | |
| 103 | - <block wx:else> | |
| 104 | - <!-- 根本就找不到门店 --> | |
| 105 | - <block wx:if="{{!only_pk && !def_pickpu_list}}"> | |
| 106 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | |
| 107 | - </block> | |
| 108 | - <block wx:else> | |
| 109 | - | |
| 110 | - | |
| 111 | - <block wx:if="{{only_pk.length && !only_pk.length}}"> | |
| 112 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | |
| 113 | - </block> | |
| 114 | - <block wx:else> | |
| 115 | - <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | |
| 116 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | |
| 117 | - </block> | |
| 118 | - <block wx:else> | |
| 119 | - <block wx:if="{{!def_pick_store}}"> | |
| 120 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view> | |
| 121 | - </block> | |
| 122 | - <block wx:else> | |
| 123 | - <block wx:if="{{data.store_count<=0}}"> | |
| 124 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | |
| 125 | - </block> | |
| 126 | - <block wx:else> | |
| 127 | - <view class="flex jc_sb"> | |
| 128 | - <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | |
| 129 | - data-action="add" style="background-color: #ffb03f;">加入购物车</view> | |
| 130 | - <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | |
| 131 | - data-action="buy">立即购买</view> | |
| 132 | - </view> | |
| 133 | - </block> | |
| 134 | - | |
| 135 | - </block> | |
| 136 | - </block> | |
| 137 | - </block> | |
| 138 | - </block> | |
| 139 | - </block> | |
| 140 | - </view> | |
| 141 | - | |
| 142 | - | |
| 143 | - </view> | |
| 144 | - </view> | |
| 145 | - <view class="clear"></view> | |
| 146 | 0 | \ No newline at end of file |
packageC/pages/presell/goodsInfo/buy_pt.wxml deleted
| 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 {{sele_g.goods_id==item.goods_id?'act':''}}" | |
| 88 | - bindtap="sele_spec" data-nor="1" data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" wx:key="sku_g">{{item.gg}}</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="{{goodsInputNum <= 1 ? '':'subCartNum'}}" class="sub {{goodsInputNum <= 1 ? 'active':''}}">-</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 | - | |
| 117 | - <!-- 提示再买多少优惠 --> | |
| 118 | - <view style="margin-top: 35rpx;color:#333;font-size:28rpx;" wx:if="{{hui_condition && is_normal==1}}"> | |
| 119 | - 再买{{hui_condition.need}} | |
| 120 | - <text wx:if="{{hui_condition.money}}">,免{{hui_condition.money}}元</text> | |
| 121 | - <text wx:if="{{hui_condition.sale}}">,打{{hui_condition.sale}}折</text> | |
| 122 | - <text wx:if="{{hui_condition.past==1}}">,包邮</text> | |
| 123 | - <text wx:if="{{hui_condition.intValue>0}}">,送{{hui_condition.intValue}}积分</text> | |
| 124 | - <text wx:if="{{hui_condition.couponId>0}}">,送优惠券</text> | |
| 125 | - <text wx:if="{{hui_condition.gift_id>0}}">,送赠品</text> | |
| 126 | - <text wx:if="{{hui_condition.lb_id>0}}">,送礼包</text> | |
| 127 | - </view> | |
| 128 | - | |
| 129 | - | |
| 130 | - <view class="clear"></view> | |
| 131 | - <!---当选取门店的时候会显示门店的选项----> | |
| 132 | - <view hidden="{{ismend==0}}" class="sto_v"> | |
| 133 | - <view class="title" hidden="{{is_sec_mend==1}}" bindtap="hidemend"> | |
| 134 | - <image class="tubiao" src="{{iurl}}/miniapp/images/icon-left.png"></image>选择门店 | |
| 135 | - </view> | |
| 136 | - <!-----第一级显示------> | |
| 137 | - <view class="itemlists" hidden="{{is_sec_mend==1}}"> | |
| 138 | - <block wx:if="{{is_show_sto_cat>0}}"> | |
| 139 | - <view wx:for="{{all_sto}}" wx:key="all_sto" class="item" bindtap="show_sec" data-index="{{index}}">{{item.name}}</view> | |
| 140 | - </block> | |
| 141 | - <block wx:else> | |
| 142 | - <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}} | |
| 143 | - </view> | |
| 144 | - </block> | |
| 145 | - </view> | |
| 146 | - <!-----第二级显示------> | |
| 147 | - <view class="stitle" hidden="{{is_sec_mend==0}}" bindtap="hide_sec_mend"> | |
| 148 | - <image class="tubiao" src="{{iurl}}/miniapp/images/icon-left.png"></image>{{sec_sto.name}}</view> | |
| 149 | - <view class="itemlists" hidden="{{is_sec_mend==0}}"> | |
| 150 | - <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}} | |
| 151 | - </view> | |
| 152 | - </view> | |
| 153 | - </view> | |
| 154 | - </view> | |
| 155 | - </view> | |
| 156 | - <view class="pt_qd"> | |
| 157 | - <block wx:if="{{is_normal==1}}"> | |
| 158 | - <!-- 按钮部分 --> | |
| 159 | - <view class="spec-cart-btns"> | |
| 160 | - <!-- 根本就找不到门店 --> | |
| 161 | - <block wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> | |
| 162 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">配送不匹配</view> | |
| 163 | - </block> | |
| 164 | - <block wx:else> | |
| 165 | - | |
| 166 | - <!-- 根本就找不到门店 --> | |
| 167 | - <block wx:if="{{!only_pk && !def_pickpu_list}}"> | |
| 168 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | |
| 169 | - </block> | |
| 170 | - <block wx:else> | |
| 171 | - | |
| 172 | - | |
| 173 | - <block wx:if="{{only_pk.length && !only_pk.length}}"> | |
| 174 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | |
| 175 | - </block> | |
| 176 | - <block wx:else> | |
| 177 | - <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | |
| 178 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | |
| 179 | - </block> | |
| 180 | - <block wx:else> | |
| 181 | - <block wx:if="{{!def_pick_store}}"> | |
| 182 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view> | |
| 183 | - </block> | |
| 184 | - <block wx:else> | |
| 185 | - <block wx:if="{{data.store_count<=0}}"> | |
| 186 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | |
| 187 | - </block> | |
| 188 | - <block wx:else> | |
| 189 | - <view bindtap="addCart_pt" class="spec-cart-btn spec-buy" data-action="buy">立即购买</view> | |
| 190 | - </block> | |
| 191 | - | |
| 192 | - </block> | |
| 193 | - </block> | |
| 194 | - </block> | |
| 195 | - </block> | |
| 196 | - </block> | |
| 197 | - </view> | |
| 198 | - | |
| 199 | - </block> | |
| 200 | - <block wx:else> | |
| 201 | - <!-- 根本就找不到门店 --> | |
| 202 | - <block wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> | |
| 203 | - <view class="spec-cart-btn spec-buy w100" style="background-color: #dcdcdc;color: #999;">配送不匹配</view> | |
| 204 | - </block> | |
| 205 | - <block wx:else> | |
| 206 | - <view bindtap="addCart_pt" class="spec-cart-btn spec-buy w100" data-action="buy">确定</view> | |
| 207 | - </block> | |
| 208 | - </block> | |
| 209 | - | |
| 210 | - | |
| 211 | - </view> | |
| 212 | - </view> | |
| 213 | - | |
| 214 | 0 | \ No newline at end of file |
pages/goods/goodsInfo/goodsInfo.js
| ... | ... | @@ -309,6 +309,7 @@ Page({ |
| 309 | 309 | } |
| 310 | 310 | |
| 311 | 311 | } |
| 312 | + | |
| 312 | 313 | ee.setData({ gid: gid}); |
| 313 | 314 | if(first_leader){ |
| 314 | 315 | console.log("log---".first_leader); |
| ... | ... | @@ -2492,6 +2493,16 @@ Page({ |
| 2492 | 2493 | |
| 2493 | 2494 | if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length>0) { |
| 2494 | 2495 | |
| 2496 | + var his_cate_num=0; | |
| 2497 | + for(let i in e.data.data.pageData){ | |
| 2498 | + let item=e.data.data.pageData[i]; | |
| 2499 | + if(item.category_id>0){ | |
| 2500 | + his_cate_num=1;break; | |
| 2501 | + } | |
| 2502 | + } | |
| 2503 | + e.his_cate_num=his_cate_num; | |
| 2504 | + | |
| 2505 | + | |
| 2495 | 2506 | //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店 |
| 2496 | 2507 | if(dd.lat && (!th.data.def_pick_store || JSON.stringify(th.data.def_pick_store)=='{}') && th.data.bconfig && th.data.bconfig.is_sort_storage){ |
| 2497 | 2508 | th.setData({ |
| ... | ... | @@ -2542,8 +2553,8 @@ Page({ |
| 2542 | 2553 | var g_distr_type=th.data.sele_g.distr_type; |
| 2543 | 2554 | wx.hideLoading(); |
| 2544 | 2555 | |
| 2545 | - //单总量超出5个的时候 | |
| 2546 | - if (e.data.data.total > 5) { | |
| 2556 | + //单总量超出10个的时候,同时门店有分类 | |
| 2557 | + if (e.data.data.total > 10 && e.his_cate_num ) { | |
| 2547 | 2558 | getApp().request.get("/api/weshop/storagecategory/page", { |
| 2548 | 2559 | data: { |
| 2549 | 2560 | store_id: o.stoid, |
| ... | ... | @@ -2559,7 +2570,7 @@ Page({ |
| 2559 | 2570 | var def_arr = new Array(); |
| 2560 | 2571 | var ishas = 0; |
| 2561 | 2572 | //-- 开始就看5个门店 -- |
| 2562 | - for (var k = 0; k < 5; k++) { | |
| 2573 | + for (var k = 0; k < 10; k++) { | |
| 2563 | 2574 | if (k == e.data.data.pageData.length) break; |
| 2564 | 2575 | def_arr.push(e.data.data.pageData[k]); |
| 2565 | 2576 | } |
| ... | ... | @@ -2766,6 +2777,7 @@ Page({ |
| 2766 | 2777 | var em={};em.data={};em.data.data={}; |
| 2767 | 2778 | em.data.data.total=new_list.length; |
| 2768 | 2779 | em.data.data.pageData=new_list; |
| 2780 | + em.data.data.pageData=new_list; | |
| 2769 | 2781 | |
| 2770 | 2782 | //--如果找到默认门店,同时也应该判断配送方式对不对-- |
| 2771 | 2783 | 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 ) ){ |
| ... | ... | @@ -5580,7 +5592,11 @@ Page({ |
| 5580 | 5592 | item.act=res.data.data; |
| 5581 | 5593 | func(isok); |
| 5582 | 5594 | }) |
| 5583 | - } | |
| 5595 | + } | |
| 5596 | + | |
| 5597 | + | |
| 5598 | + | |
| 5599 | + | |
| 5584 | 5600 | |
| 5585 | 5601 | |
| 5586 | 5602 | ... | ... |
pages/goods/goodsInfo/goodsInfo.wxss
pages/index/index/index.wxml
| ... | ... | @@ -139,7 +139,7 @@ |
| 139 | 139 | |
| 140 | 140 | |
| 141 | 141 | <!--秒杀--> |
| 142 | - <view class="seckill" wx:if="{{saleGoods!=null && pindGoods.length!=0 }}"> | |
| 142 | + <view class="seckill" wx:if="{{saleGoods!=null && saleGoods.length!=0 }}"> | |
| 143 | 143 | <navigator url="/pages/activity/seckill_list/seckill_list" hover-class="none"> |
| 144 | 144 | <view class="seckill-time"> |
| 145 | 145 | <view class="classname flex ai_c"> |
| ... | ... | @@ -181,7 +181,8 @@ |
| 181 | 181 | |
| 182 | 182 | |
| 183 | 183 | <!--预售--> |
| 184 | - <view class="seckill" wx:if="{{saleGoods!=null && pindGoods.length!=0 }}"> | |
| 184 | + <!-- | |
| 185 | + <view class="seckill" wx:if="{{preGoods!=null && preGoods.length!=0 }}"> | |
| 185 | 186 | <navigator url="/packageC/pages/presell/list/list" hover-class="none"> |
| 186 | 187 | <view class="seckill-time"> |
| 187 | 188 | <view class="classname flex ai_c"> |
| ... | ... | @@ -196,30 +197,25 @@ |
| 196 | 197 | </navigator> |
| 197 | 198 | <view class="seckill-list"> |
| 198 | 199 | <swiper class="s_prom" indicator-dots="{{false}}" bindchange="flashSwiperChange" next-margin="25rpx"> |
| 199 | - <swiper-item wx:for="{{saleGoods}}" wx:key="{{index}}" class="p_swiper" wx:key="saleGoods"> | |
| 200 | + <swiper-item wx:for="{{preGoods}}" wx:key="*this" class="p_swiper" > | |
| 200 | 201 | <navigator class="nav" hover-class="none" url="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}&title={{aitem.goods_name}}" wx:for="{{item}}" wx:key="item" wx:for-item="aitem" wx:for-index="aind"> |
| 201 | 202 | <view class="imgview presell"> |
| 202 | - <image src="{{url+aitem.original_img}}" mode="aspectFill" lazy-load="true" data-errorimg="saleGoods[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3" data-img="{{aitem.original_img}}"></image> | |
| 203 | + <image src="{{url+aitem.original_img}}" mode="aspectFill" lazy-load="true" data-errorimg="preGoods[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3" data-img="{{aitem.original_img}}"></image> | |
| 203 | 204 | </view> |
| 204 | - <view class="ellipsis-2 mar-top10" style="height: 70rpx;">{{aitem.title}}</view> | |
| 205 | + <view class="ellipsis-2 mar-top10" style="height: 70rpx;">{{aitem.goods_name}}</view> | |
| 205 | 206 | <view class="co-red mar-top10 flex jc_sb ali-c"> |
| 206 | 207 | <view> |
| 207 | - <text><text class="fs20">¥</text>{{aitem.price}}</text> | |
| 208 | + <text><text class="fs20">¥</text>{{aitem.presell_price}}</text> | |
| 208 | 209 | <text class="un_line">¥{{aitem.market_price}}</text> |
| 209 | 210 | </view> |
| 210 | 211 | <view class="btn-buy">去抢购</view> |
| 211 | 212 | </view> |
| 212 | 213 | </navigator> |
| 213 | - | |
| 214 | 214 | </swiper-item> |
| 215 | - | |
| 216 | 215 | </swiper> |
| 217 | - <!-- <view class="flex-center-around translation"> | |
| 218 | - <view class="circle spot" wx:for="{{saleGoods}}" wx:key="{{index}}" style="background:{{index==flash_index?'#fff':'#999'}}"> | |
| 219 | - </view> | |
| 220 | - </view> --> | |
| 221 | 216 | </view> |
| 222 | - </view> | |
| 217 | + </view> | |
| 218 | + - --> | |
| 223 | 219 | |
| 224 | 220 | |
| 225 | 221 | <!----拼单----> | ... | ... |
pages/team/team_show/team_show.js
| ... | ... | @@ -1123,6 +1123,15 @@ Page({ |
| 1123 | 1123 | }).then(res => { |
| 1124 | 1124 | var e = res; |
| 1125 | 1125 | if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length>0) { |
| 1126 | + | |
| 1127 | + var his_cate_num=0; | |
| 1128 | + for(let i in e.data.data.pageData){ | |
| 1129 | + let item=e.data.data.pageData[i]; | |
| 1130 | + if(item.category_id>0){ | |
| 1131 | + his_cate_num=1;break; | |
| 1132 | + } | |
| 1133 | + } | |
| 1134 | + e.his_cate_num=his_cate_num; | |
| 1126 | 1135 | |
| 1127 | 1136 | //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店 |
| 1128 | 1137 | if(dd.lat && !th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage){ |
| ... | ... | @@ -1165,7 +1174,7 @@ Page({ |
| 1165 | 1174 | var th=this; |
| 1166 | 1175 | var g_distr_type=th.data.goods.distr_type; |
| 1167 | 1176 | //单总量超出5个的时候 |
| 1168 | - if (e.data.data.total > 5) { | |
| 1177 | + if (e.data.data.total > 10 && e.his_cate_num) { | |
| 1169 | 1178 | getApp().request.get("/api/weshop/storagecategory/page", { |
| 1170 | 1179 | data: { |
| 1171 | 1180 | store_id: o.stoid, | ... | ... |