diff --git a/app.json b/app.json index 190518b..34e5b0b 100644 --- a/app.json +++ b/app.json @@ -71,7 +71,12 @@ "pages/user/grow_value/grow_value" ], - "window": { + "permission": { + "scope.userLocation": { + "desc": "获取你的位置信息" + } + }, + "window": { "backgroundTextStyle": "light", "navigationBarTextStyle": "black", "navigationBarTitleText": "加载中...", @@ -84,6 +89,7 @@ "selectedColor": "#f23030", "borderStyle": "white", "backgroundColor": "#ffffff", + "list": [ { "pagePath": "pages/index/index/index", diff --git a/app.wxss b/app.wxss index 3b3b421..ed2d5c2 100644 --- a/app.wxss +++ b/app.wxss @@ -303,6 +303,17 @@ justify-content:space-around; .xc-ash{ color: #b9b9b9; } +.xc-ash-9f{ + color: #9fa1a0; + +} + +.xc-ash_c999{ +color: #999; +} +.xc-ash-b{ +background: #b9b9b9; +} .xc-black{ color: #000; } diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js index 6f50925..e9ebc73 100644 --- a/pages/goods/goodsInfo/goodsInfo.js +++ b/pages/goods/goodsInfo/goodsInfo.js @@ -415,7 +415,7 @@ Page({ mapurl_f_img=res1.data.data.video_img; } }) - + console.log(fir_com,"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); ee.setData({ gallery: gallery, is_collect: is_collect, @@ -916,7 +916,7 @@ Page({ }, openSpecModel: function(t) { var open_store = t.currentTarget.dataset.ind; - console.log(t,"加入购物车头",open_store); + this.setData({ store: 0, choice_sort_store: 0, sort_store: 0, open_ind_store: open_store, }) @@ -2744,10 +2744,12 @@ Page({ th.data.lon = res.longitude; th.data.is_get_local_ok = 1; th.setData({ is_gps: 1 }); - th.onShow(); + //th.onShow(); + th.get_sto(); }, fail: function (res) { - th.onShow(); + //th.onShow(); + th.get_sto(); if (res.errCode == 2) { th.setData({ is_gps: 0 }); if (th.data.is_gps == 0) { @@ -2791,17 +2793,14 @@ close_popup:function(e){ var index=e.currentTarget.dataset.index; var region_name = e.currentTarget.dataset.region; var item = this.data.all_sto[index]; - this.setData({ region_name: region_name, sort_store: 0, choice_sort_store:1, sec_sto: item,sec_pick_index:0 }); + this.setData({ region_name: region_name, sort_store: 0, choice_sort_store:1, sec_sto: item,sec_pick_index:0 }); }, - //---点击二级之后的选择--- - choose_for_store:function (e) { - var index_c=e.currentTarget.dataset.ind; - this.setData({sec_pick_index:index_c,fir_pick_index:0}) - }, + choose_for_store_fir:function (e) { var index_c=e.currentTarget.dataset.ind; + console.log("选择门店的id+",index_c); this.setData({fir_pick_index:index_c}) }, @@ -2836,45 +2835,37 @@ close_popup:function(e){ var index=th.data.sec_pick_index; item=th.data.sec_sto.s_arr[index]; } - console.log("王朝马汉吱吱吱吱666666666666", item); + th.setData({def_pick_store:item,sto_sele_name:item.pickup_name, sto_sele_id:item.pickup_id,sto_sele_distr:item.distr_type,store:0,choice_sort_store:0}); }, - + //---点击二级之后的选择--- + choose_for_store: function (e) { + var index_c = e.currentTarget.dataset.ind; + console.log("qqqqqqqqqqqqqqqqqqqqqqqqq", index_c), + this.setData({ sec_pick_index: index_c, fir_pick_index: index_c }) + }, //把选择的门店设置成默认的门店def_pick set_def_pick:function (e) { - var th = this; var item = null; - var openindstore = e.currentTarget.dataset.openindstore; - if (openindstore == 1) { - - th.setData({ - openSpecModal: !0, - openSpecModal_ind: openindstore, - store: 0, choice_sort_store: 0, sort_store: 0, - }); - } else if (openindstore == 2) { - - th.setData({ - openSpecModal: !0, - openSpecModal_ind: openindstore, - store: 0, choice_sort_store: 0, sort_store: 0, - }); - } else { - th.setData({ - store: 0, choice_sort_store: 0, sort_store: 0, - }) - } - + var th = this; var item = null; + if(th.data.choice_sort_store==0 ){ + var index=th.data.fir_pick_index; + console.log("分类的门店地址0",index); if(th.data.is_show_sto_cat==1){ + item=th.data.def_pickpu_list[index]; + console.log(item,"分类的门店地址1", index); }else{ + console.log("分类的门店地址22222", index); item=th.data.only_pk[index]; //当没有门店分类的时候 + console.log(item,"分类的门店地址22222", index); } }else{ var index=th.data.sec_pick_index; item=th.data.sec_sto.s_arr[index]; + console.log(item,"分类的门店地址333333333333", index); } var store_id=o.stoid; @@ -2885,8 +2876,8 @@ close_popup:function(e){ data: { user_id,def_pickup_id}, success:function(res){ console.log("是什么",res.data.code); - if (res.data.code!=-1){ - th.setData({fir_pick_index:0}); + if (res.data.code==0){ + if (th.data.choice_sort_store == 0) th.setData({fir_pick_index:0}); s.showWarning("设置门店地址成功", null, 500, !1); }else{ console.log("门店地址失败"); @@ -2900,6 +2891,26 @@ close_popup:function(e){ def_pick_store: item, sto_sele_name: item.pickup_name, sto_sele_id: item.pickup_id, sto_sele_distr: item.distr_type, store: 0, choice_sort_store: 0 }); + + + var openindstore = e.currentTarget.dataset.openindstore; + if (openindstore == 1) { + th.setData({ + openSpecModal: !0, + openSpecModal_ind: openindstore, + store: 0, choice_sort_store: 0, sort_store: 0, + }); + } else if (openindstore == 2) { + th.setData({ + openSpecModal: !0, + openSpecModal_ind: openindstore, + store: 0, choice_sort_store: 0, sort_store: 0, + }); + } else { + th.setData({ + store: 0, choice_sort_store: 0, sort_store: 0, + }) + } }, diff --git a/pages/goods/goodsInfo/goodsInfo.wxml b/pages/goods/goodsInfo/goodsInfo.wxml index 809519b..08e5eb4 100644 --- a/pages/goods/goodsInfo/goodsInfo.wxml +++ b/pages/goods/goodsInfo/goodsInfo.wxml @@ -302,13 +302,13 @@ - + - + - 选择门店 + 选择门店 - + 更多门店 @@ -317,14 +317,13 @@ - {{def_pick_store.pickup_name}} - + {{def_pick_store.pickup_name}} - - 距离:{{filters.toFix(def_pick_store.distance,0)}}m + + 距离:{{filters.toFix(def_pick_store.distance,0)}}m - 地址:{{def_pick_store.fulladdress}} + 地址:{{def_pick_store.fulladdress}} @@ -370,11 +369,11 @@ - + - {{item.username}} + {{item.is_anonymous!=1?item.username:'匿名'}} @@ -603,9 +602,9 @@ - + - {{item.username==''?'匿名用户':item.username}} + {{item.username==''||item.is_anonymous==1 ?'匿名用户':item.username}} @@ -673,11 +672,20 @@ 立即购买 + + 加入购物车 立即购买 + + + + 库存不足 + + + @@ -781,8 +789,8 @@ - {{def_pick_store.pickup_name}} - + {{def_pick_store.pickup_name}} + 距离:{{filters.toFix(def_pick_store.distance,0)}}m @@ -790,7 +798,7 @@ - 选择门店 + 选择门店 @@ -798,7 +806,7 @@ - 地址:{{def_pick_store.fulladdress}} + 地址:{{def_pick_store.fulladdress}} @@ -1055,7 +1063,7 @@ - {{choice_sort_store==0?'选择更多门店':'返回'}} + {{choice_sort_store==0?'更多门店':'返回'}} @@ -1078,13 +1086,14 @@ - {{item.pickup_name}} + {{item.pickup_name}} - 距离:{{filters.toFix(item.distance,0)}}m + + 距离:{{filters.toFix(item.distance/1000,2)}}km - 地址:{{item.fulladdress}} + 地址:{{item.fulladdress}} @@ -1103,13 +1112,13 @@ - {{item.pickup_name}} + {{item.pickup_name}} - 距离:{{filters.toFix(item.distance,0)}}m + 距离:{{filters.toFix(item.distance/1000,2)}}km - 地址:{{item.fulladdress}} + 地址:{{item.fulladdress}} @@ -1132,10 +1141,10 @@ {{item.pickup_name}} - 距离:{{filters.toFix(item.distance,0)}}m + 距离:{{filters.toFix(item.distance/1000,2)}}km - 地址:{{item.fulladdress}} + 地址:{{item.fulladdress}} @@ -1163,7 +1172,7 @@ - 返回 + 返回 @@ -1171,7 +1180,7 @@ - {{item.name}} + {{item.name}} diff --git a/pages/goods/goodsInfo/goodsInfo.wxss b/pages/goods/goodsInfo/goodsInfo.wxss index 9339aef..eae9bea 100644 --- a/pages/goods/goodsInfo/goodsInfo.wxss +++ b/pages/goods/goodsInfo/goodsInfo.wxss @@ -2281,6 +2281,7 @@ width: 40rpx; background: #eee; border-radius: 20rpx; margin-right: 5rpx; + color: #999; } /* 选择门店的弹窗 */ .mongolia-layer{ @@ -2306,10 +2307,10 @@ height: 70%; } .popup-top{ border-bottom: 1rpx solid #eee; - height: 140rpx; + height: 155rpx; width: 95%; margin: auto; - line-height: 140rpx; + line-height: 155rpx; } .bg_rights{ @@ -2323,12 +2324,12 @@ height: 70%; .modal-closes { position: absolute; right: 30rpx; - top: -10rpx; + top: -15rpx; height: 25rpx; } .choose_more{ - margin-top: 30rpx; + margin-top: 40rpx; margin-right: 20rpx; } @@ -2384,8 +2385,8 @@ margin-left: 17rpx; } .address-val{ - height: 30rpx; -line-height: 30rpx; + height: 38rpx; +line-height: 38rpx; } .store-bottom{ @@ -2397,16 +2398,16 @@ line-height: 30rpx; } .determine{ width: 260rpx; - height: 44rpx; + height: 55rpx; border-radius: 50rpx; - line-height: 44rpx; + line-height: 55rpx; } .default{ width: 260rpx; - height: 44rpx; + height: 55rpx; border:3rpx solid #c8c8c8; border-radius: 50rpx; - line-height: 44rpx; + line-height: 55rpx; } .store-bottom-frame{ width: 95%; @@ -2473,4 +2474,8 @@ margin-bottom:40rpx; .is_stock{ width: 58%; height: 70rpx; +border-radius: 55rpx; +} +.select_store_height{ + height: 50rpx; } \ No newline at end of file