Commit 618ce410d104d2d6b0f869d2ad6bfd442c3650bb
1 parent
25c68bf8
商品的购物车的同城配送的优化
Showing
1 changed file
with
11 additions
and
9 deletions
packageE/pages/cart/cart2/cart2.js
@@ -1149,15 +1149,17 @@ Page({ | @@ -1149,15 +1149,17 @@ Page({ | ||
1149 | } | 1149 | } |
1150 | 1150 | ||
1151 | 1151 | ||
1152 | - | ||
1153 | - //----- 判断每一个商品的配送方式,和门店的配送方式 ------- | ||
1154 | - for (var ik = 0; ik < arr.length; ik++) { | ||
1155 | - if (!arr[ik].sto.is_same_city) continue; | ||
1156 | - var fd = arr[ik].goods.filter(function (e) { | ||
1157 | - return e.is_same_city != 1 || e.whsle_id > 0 | ||
1158 | - }) | ||
1159 | - if (!fd || fd.length == 0) { | ||
1160 | - arr[ik].show_same_city = 1; | 1152 | + //-- 要判断总开关有没有同城配送 -- |
1153 | + if(th.data.is_same_city) { | ||
1154 | + //----- 判断每一个商品的配送方式,和门店的配送方式 ------- | ||
1155 | + for (var ik = 0; ik < arr.length; ik++) { | ||
1156 | + if (!arr[ik].sto.is_same_city) continue; | ||
1157 | + var fd = arr[ik].goods.filter(function (e) { | ||
1158 | + return e.is_same_city != 1 || e.whsle_id > 0 | ||
1159 | + }) | ||
1160 | + if (!fd || fd.length == 0) { | ||
1161 | + arr[ik].show_same_city = 1; | ||
1162 | + } | ||
1161 | } | 1163 | } |
1162 | } | 1164 | } |
1163 | 1165 |