Commit d662d782691b6d78ea198c110fd8bbe619484da0
1 parent
e15932db
门地址
Showing
2 changed files
with
38 additions
and
29 deletions
pages/goods/goodsInfo/goodsInfo.js
@@ -257,28 +257,7 @@ Page({ | @@ -257,28 +257,7 @@ Page({ | ||
257 | supportPageScroll: !0 | 257 | supportPageScroll: !0 |
258 | }); | 258 | }); |
259 | 259 | ||
260 | - if(e.is_sort_storage){ | ||
261 | - wx.getLocation({ | ||
262 | - type: 'wgs84', | ||
263 | - success: function (res) { | ||
264 | - th.data.lat=res.latitude; | ||
265 | - th.data.lon=res.longitude; | ||
266 | - th.data.is_get_local_ok=1; | ||
267 | - }, | ||
268 | - fail: function (res) { | ||
269 | - | ||
270 | - if (res.errCode == 2) { | ||
271 | - th.setData({ is_gps: 0 }); | ||
272 | - } else { | ||
273 | - th.setData({ is_gps: "3" }); | ||
274 | - } | ||
275 | - | ||
276 | - th.data.is_get_local_ok=1; | ||
277 | - } | ||
278 | - }) | ||
279 | - }else{ | ||
280 | - th.data.is_get_local_ok=1; | ||
281 | - } | 260 | + |
282 | 261 | ||
283 | }) | 262 | }) |
284 | 263 | ||
@@ -303,6 +282,32 @@ Page({ | @@ -303,6 +282,32 @@ Page({ | ||
303 | },500) | 282 | },500) |
304 | 283 | ||
305 | }) | 284 | }) |
285 | + | ||
286 | + if (e.is_sort_storage) { | ||
287 | + wx.getLocation({ | ||
288 | + type: 'wgs84', | ||
289 | + success: function (res) { | ||
290 | + th.data.lat = res.latitude; | ||
291 | + th.data.lon = res.longitude; | ||
292 | + th.data.is_get_local_ok = 1; | ||
293 | + }, | ||
294 | + fail: function (res) { | ||
295 | + if (res.errCode == 2) { | ||
296 | + th.setData({ is_gps: 0 }); | ||
297 | + if (th.data.is_gps == 0) { | ||
298 | + s.showWarning("请开启GPS定位", null, 3800000, !1); | ||
299 | + } | ||
300 | + | ||
301 | + } else { | ||
302 | + th.setData({ is_gps: "3" }); | ||
303 | + } | ||
304 | + | ||
305 | + th.data.is_get_local_ok = 1; | ||
306 | + } | ||
307 | + }) | ||
308 | + } else { | ||
309 | + th.data.is_get_local_ok = 1; | ||
310 | + } | ||
306 | 311 | ||
307 | }, | 312 | }, |
308 | 313 | ||
@@ -2687,6 +2692,7 @@ Page({ | @@ -2687,6 +2692,7 @@ Page({ | ||
2687 | tt(); | 2692 | tt(); |
2688 | }, | 2693 | }, |
2689 | fail: function (res) { | 2694 | fail: function (res) { |
2695 | + | ||
2690 | ee.data.share_goods_img= "../../../images/share/default_g_img.gif"; //分享的图片不能用网络的 | 2696 | ee.data.share_goods_img= "../../../images/share/default_g_img.gif"; //分享的图片不能用网络的 |
2691 | tt(); | 2697 | tt(); |
2692 | } | 2698 | } |
@@ -2745,6 +2751,9 @@ Page({ | @@ -2745,6 +2751,9 @@ Page({ | ||
2745 | choice_store:function(ee){ | 2751 | choice_store:function(ee){ |
2746 | var th=this; | 2752 | var th=this; |
2747 | var ind=ee.currentTarget.dataset.ind; | 2753 | var ind=ee.currentTarget.dataset.ind; |
2754 | + var bconfig = th.data.bconfig; | ||
2755 | + console.log("男士水水水水水", bconfig); | ||
2756 | + if (bconfig.is_sort_storage){ | ||
2748 | wx.getLocation({ | 2757 | wx.getLocation({ |
2749 | type: 'wgs84', | 2758 | type: 'wgs84', |
2750 | success: function (res) { | 2759 | success: function (res) { |
@@ -2760,7 +2769,7 @@ Page({ | @@ -2760,7 +2769,7 @@ Page({ | ||
2760 | if (res.errCode == 2) { | 2769 | if (res.errCode == 2) { |
2761 | th.setData({ is_gps: 0 }); | 2770 | th.setData({ is_gps: 0 }); |
2762 | if (th.data.is_gps == 0) { | 2771 | if (th.data.is_gps == 0) { |
2763 | - s.showWarning("请开启GPS定位", null, 1000, !1); | 2772 | + s.showWarning("请开启GPS定位", null, 25000, !1); |
2764 | } | 2773 | } |
2765 | } else { | 2774 | } else { |
2766 | th.setData({ is_gps: "3" }); | 2775 | th.setData({ is_gps: "3" }); |
@@ -2769,7 +2778,7 @@ Page({ | @@ -2769,7 +2778,7 @@ Page({ | ||
2769 | th.data.is_get_local_ok = 1; | 2778 | th.data.is_get_local_ok = 1; |
2770 | } | 2779 | } |
2771 | }) | 2780 | }) |
2772 | - | 2781 | + } |
2773 | this.setData({ | 2782 | this.setData({ |
2774 | open_ind_store: ind, | 2783 | open_ind_store: ind, |
2775 | store:1, | 2784 | store:1, |
pages/goods/goodsInfo/goodsInfo.wxml
@@ -320,7 +320,7 @@ | @@ -320,7 +320,7 @@ | ||
320 | <text class="fs32 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | 320 | <text class="fs32 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> |
321 | 321 | ||
322 | </view> | 322 | </view> |
323 | - <view class="distance fs20"> | 323 | + <view class="distance fs20"wx:if="{{def_pick_store.distance!=null}}"> |
324 | 距离:{{filters.toFix(def_pick_store.distance,0)}}m | 324 | 距离:{{filters.toFix(def_pick_store.distance,0)}}m |
325 | </view> | 325 | </view> |
326 | </view> | 326 | </view> |
@@ -782,7 +782,7 @@ | @@ -782,7 +782,7 @@ | ||
782 | 782 | ||
783 | <view class="flex ai_end" wx:if="{{def_pick_store}}"> | 783 | <view class="flex ai_end" wx:if="{{def_pick_store}}"> |
784 | <text class="fs28 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | 784 | <text class="fs28 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> |
785 | - <view class="distance fs20 xc-ash"> | 785 | + <view class="distance fs20 xc-ash"wx:if="{{def_pick_store.distance!=null}}"> |
786 | 距离:{{filters.toFix(def_pick_store.distance,0)}}m | 786 | 距离:{{filters.toFix(def_pick_store.distance,0)}}m |
787 | </view> | 787 | </view> |
788 | </view> | 788 | </view> |
@@ -1087,7 +1087,7 @@ | @@ -1087,7 +1087,7 @@ | ||
1087 | <view class="fs28 xc-black3 address_name">{{item.pickup_name}}</view> | 1087 | <view class="fs28 xc-black3 address_name">{{item.pickup_name}}</view> |
1088 | </view> | 1088 | </view> |
1089 | <view> | 1089 | <view> |
1090 | - <view class="distance fs20 address-val">距离:{{filters.toFix(item.distance,0)}}m</view> | 1090 | + <view class="distance fs20 address-val"wx:if="{{item.distance!=null}}">距离:{{filters.toFix(item.distance,0)}}m</view> |
1091 | </view> | 1091 | </view> |
1092 | </view> | 1092 | </view> |
1093 | <view class="fs20">地址:{{item.fulladdress}}</view> | 1093 | <view class="fs20">地址:{{item.fulladdress}}</view> |
@@ -1112,7 +1112,7 @@ | @@ -1112,7 +1112,7 @@ | ||
1112 | <view class="fs28 xc-black3 address_name">{{item.pickup_name}}</view> | 1112 | <view class="fs28 xc-black3 address_name">{{item.pickup_name}}</view> |
1113 | </view> | 1113 | </view> |
1114 | <view> | 1114 | <view> |
1115 | - <view class="distance fs20 address-val">距离:{{filters.toFix(item.distance,0)}}m</view> | 1115 | + <view class="distance fs20 address-val"wx:if="{{item.distance!=null}}">距离:{{filters.toFix(item.distance,0)}}m</view> |
1116 | </view> | 1116 | </view> |
1117 | </view> | 1117 | </view> |
1118 | <view class="fs20">地址:{{item.fulladdress}}</view> | 1118 | <view class="fs20">地址:{{item.fulladdress}}</view> |
@@ -1138,7 +1138,7 @@ | @@ -1138,7 +1138,7 @@ | ||
1138 | <view class="fs28 xc-black3 address_name">{{item.pickup_name}}</view> | 1138 | <view class="fs28 xc-black3 address_name">{{item.pickup_name}}</view> |
1139 | </view> | 1139 | </view> |
1140 | <view> | 1140 | <view> |
1141 | - <view class="distance fs20 address-val">距离:{{filters.toFix(item.distance,0)}}m</view> | 1141 | + <view class="distance fs20 address-val"wx:if="{{item.distance!=null}}">距离:{{filters.toFix(item.distance,0)}}m</view> |
1142 | </view> | 1142 | </view> |
1143 | </view> | 1143 | </view> |
1144 | <view class="fs20">地址:{{item.fulladdress}}</view> | 1144 | <view class="fs20">地址:{{item.fulladdress}}</view> |