Commit 13ed7a41129babcc6849947eb25ba88531ce388e
Merge branch 'qa' of http://git.vipzhuang.cn/wxd/MShopWeApp
Showing
13 changed files
with
94 additions
and
20 deletions
packageA/pages/distribution/shop/shop.js
... | ... | @@ -39,6 +39,10 @@ Page({ |
39 | 39 | * 生命周期函数--监听页面加载 |
40 | 40 | */ |
41 | 41 | onLoad: function (options) { |
42 | + | |
43 | + console.log("-- shop:load --"); | |
44 | + console.log(options); | |
45 | + | |
42 | 46 | wx.setNavigationBarTitle({ |
43 | 47 | title: "我的小店", |
44 | 48 | }); |
... | ... | @@ -50,8 +54,12 @@ Page({ |
50 | 54 | }); |
51 | 55 | }); |
52 | 56 | //从别人的分享的跳转过来 |
53 | - var first_leader = decodeURIComponent(options.scene); | |
57 | + var first_leader = decodeURIComponent(options.first_leader); | |
54 | 58 | if (first_leader && first_leader != 'undefined') { |
59 | + | |
60 | + console.log("-- shop:load2 --"); | |
61 | + console.log("-- shop:load3 --"+first_leader); | |
62 | + | |
55 | 63 | getApp().globalData.first_leader = first_leader; |
56 | 64 | this.data.first_leader = first_leader; |
57 | 65 | |
... | ... | @@ -357,8 +365,7 @@ Page({ |
357 | 365 | } |
358 | 366 | |
359 | 367 | var ob = { |
360 | - title: title, | |
361 | - path: url, | |
368 | + title: title,path: url, | |
362 | 369 | }; |
363 | 370 | return ob; |
364 | 371 | ... | ... |
packageA/pages/goodsInfo/goodsInfo.js
packageB/pages/zuhegou/index/index.wxml
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | </view> |
17 | 17 | |
18 | 18 | |
19 | - <view class="c_w mt20 fs28">门店: | |
19 | + <view class="c_w mt20 fs28">选择门店: | |
20 | 20 | <block wx:if="{{def_pick_store}}"> |
21 | 21 | <text wx:if="{{all_price>0}}">{{def_pick_store.pickup_name}}</text> |
22 | 22 | <text wx:else bindtap="choose_store">{{def_pick_store.pickup_name}}</text> | ... | ... |
packageC/pages/luckyGo/luckyGo_order/luckyGo_order.wxml
... | ... | @@ -205,7 +205,7 @@ |
205 | 205 | <navigator wx:if="{{order.order_goods.length>1}}" class="tips-btn" |
206 | 206 | url="/packageB/pages/user/comment/comment?status=0&order_id={{order.order_id}}">评价</navigator> |
207 | 207 | <navigator wx:else class="tips-btn" |
208 | - url="/packageB/pages/user/add_comment/add_comment?goods_id={{order.order_goods[0].goods_id}}&order_id={{order.order_id}}}">去评价</navigator> | |
208 | + url="/packageB/pages/user/add_comment/add_comment?goods_id={{order.order_goods[0].goods_id}}&order_id={{order.order_id}}">去评价</navigator> | |
209 | 209 | </block> |
210 | 210 | |
211 | 211 | </view> | ... | ... |
packageC/pages/presell/cart/cart.js
... | ... | @@ -2097,7 +2097,7 @@ Page({ |
2097 | 2097 | if(!ord_prom && !is_get){ |
2098 | 2098 | if(o_condition > 0 && this.data.pre_arr.is_useorderyh){ |
2099 | 2099 | await getApp().request.promiseGet("/api/weshop/promorder/getOrderPromotion", { |
2100 | - data: { store_id: os.stoid, orderAmount: condition } | |
2100 | + data: { store_id: os.stoid, orderAmount: o_condition } | |
2101 | 2101 | }).then(res => { |
2102 | 2102 | if (res.data.code == 0) { |
2103 | 2103 | ord_prom = res.data.data; |
... | ... | @@ -2107,11 +2107,12 @@ Page({ |
2107 | 2107 | } |
2108 | 2108 | |
2109 | 2109 | |
2110 | + var bn_pick = th.data.pickup.pickup_id | |
2110 | 2111 | //如果同意参与订单优惠 |
2111 | 2112 | if (ord_prom) { |
2112 | 2113 | //th.check_is_order_prom(o_condition,async function (ord_price) { |
2113 | 2114 | var ord_price=o_condition; |
2114 | - var bn_pick = th.data.pickup.pickup_id | |
2115 | + | |
2115 | 2116 | var order_prom_amount = 0; |
2116 | 2117 | var order_prom_id = 0; |
2117 | 2118 | var order_m = 0; |
... | ... | @@ -2227,6 +2228,57 @@ Page({ |
2227 | 2228 | var o_condition1 = parseFloat(o_condition) - parseFloat(th.data.presell.presell_deposit); |
2228 | 2229 | if (o_condition1 < 0) o_condition1 = 0; |
2229 | 2230 | |
2231 | + if(th.data.exp_type == 2) { | |
2232 | + var good = th.data.goods; | |
2233 | + //--------------开始计算物流------------------ | |
2234 | + var shipping_price = 0; | |
2235 | + var lon = 0; | |
2236 | + var lat = 0; | |
2237 | + //-- 获取距离 -- | |
2238 | + await getApp().request.promisePost("/api/weshop/order/sameCityExp/getGeocoder", { | |
2239 | + is_json: 1, data: {address: th.data.user_addr.more_address + th.data.user_addr.address} | |
2240 | + }).then(res => { | |
2241 | + if (res.data.code == 0) { | |
2242 | + var data = JSON.parse(res.data.data); | |
2243 | + if (data.status == 0) { | |
2244 | + lon = data.result.location.lng; | |
2245 | + lat = data.result.location.lat; | |
2246 | + } | |
2247 | + } | |
2248 | + }) | |
2249 | + var gd_w = good['weight'] * good['buynum']; | |
2250 | + //-- 获取距离 -- | |
2251 | + var req_data = { | |
2252 | + store_id: os.stoid, | |
2253 | + order_amount: parseFloat(o_condition1), | |
2254 | + lon: lon, lat: lat, | |
2255 | + pickup_id: bn_pick, | |
2256 | + goods_weight: gd_w, | |
2257 | + } | |
2258 | + | |
2259 | + var is_next = 1; | |
2260 | + //获取同城配送参数 | |
2261 | + await getApp().request.promisePost("/api/weshop/order/sameCityExp/getMoney", { | |
2262 | + is_json: 1, | |
2263 | + data: req_data | |
2264 | + }).then(res => { | |
2265 | + if (res.data.code == 0) { | |
2266 | + shipping_price = res.data.data; | |
2267 | + } else { | |
2268 | + is_next = 0; | |
2269 | + wx.showToast({ | |
2270 | + title: res.data.msg, icon: 'none', duration: 2000 | |
2271 | + }) | |
2272 | + } | |
2273 | + }) | |
2274 | + if (!is_next) { | |
2275 | + th.setData({show_submit: 1, disabled_btn: 1}) | |
2276 | + return false | |
2277 | + } | |
2278 | + exp_price = parseFloat(shipping_price).toFixed(2); | |
2279 | + } | |
2280 | + | |
2281 | + | |
2230 | 2282 | var the_price=parseFloat(o_condition1) + parseFloat(exp_price); |
2231 | 2283 | |
2232 | 2284 | if(the_price<th.data.goods.use_commission){ |
... | ... | @@ -2352,7 +2404,7 @@ Page({ |
2352 | 2404 | tail_pay_type: ind,//0微信支付 1余额支付 |
2353 | 2405 | }; |
2354 | 2406 | |
2355 | - if (th.data.exp_type == 0) { | |
2407 | + if (th.data.exp_type == 0 || th.data.exp_type==2 ) { | |
2356 | 2408 | var index = th.data.index; |
2357 | 2409 | dd.shipping_code = th.data.wu_arr[index].code; |
2358 | 2410 | dd.shipping_name = th.data.wu_arr[index].name; | ... | ... |
packageC/pages/presell/cart/cart.wxml
... | ... | @@ -412,7 +412,7 @@ |
412 | 412 | |
413 | 413 | |
414 | 414 | <block wx:if="{{order.order_status==2 }}"> |
415 | - <navigator class="tips-btn2" url="/packageB/pages/user/add_comment/add_comment?goods_id={{order_goods.goods_id}}&order_id={{order.order_id}}}">去评价</navigator> | |
415 | + <navigator class="tips-btn2" url="/packageB/pages/user/add_comment/add_comment?goods_id={{order_goods.goods_id}}&order_id={{order.order_id}}">去评价</navigator> | |
416 | 416 | </block> |
417 | 417 | |
418 | 418 | </view> | ... | ... |
packageE/pages/cart/cart2/cart2.js
... | ... | @@ -1960,11 +1960,11 @@ Page({ |
1960 | 1960 | |
1961 | 1961 | //--------循环计算商品是不是包邮,是不是使用优惠券,此时循环是商品从表----------- |
1962 | 1962 | for (var j = 0; j < ord_goods.length; j++) { |
1963 | - if (ord_goods[j].is_gift) continue; | |
1964 | 1963 | if (ord_goods[j].whsle_id) continue; |
1965 | 1964 | if (ord_goods[j].prom_type == 3 && ord_goods[j].prom_id == item_map.prom_id) { |
1966 | 1965 | ord_goods[j].is_xz_yh = ord_goods[j].is_xz_yh ? ord_goods[j].is_xz_yh : item_map.is_xz_yh; |
1967 | 1966 | ord_goods[j].is_past = item_map.is_past; |
1967 | + if (ord_goods[j].is_gift) continue; //赠品不平摊 | |
1968 | 1968 | ord_goods[j].account_fir = th.item_map_get_goods(ord_goods[j].goods_id, item_map).account_fir; |
1969 | 1969 | ord_goods[j].account_yu_fir = th.item_map_get_goods(ord_goods[j].goods_id, item_map).account_yu_fir; |
1970 | 1970 | ord_goods[j].account = th.item_map_get_goods(ord_goods[j].goods_id, item_map).account; |
... | ... | @@ -6563,6 +6563,14 @@ Page({ |
6563 | 6563 | is_post_temp:1 //赠品暂时的是要包邮运算, 后面和主商品是不是包邮一样 |
6564 | 6564 | }; |
6565 | 6565 | |
6566 | + var prom_goods_map=th.data.prom_goods_map[gf_pickup_id]; | |
6567 | + var fd=prom_goods_map[th.data.gf_prom_id]; | |
6568 | + | |
6569 | + if(fd){ | |
6570 | + newd.is_past=fd.is_past; | |
6571 | + newd.is_xz_yh=fd.is_xz_yh; | |
6572 | + } | |
6573 | + | |
6566 | 6574 | //-- 如果是代发商品的时候 -- |
6567 | 6575 | if (gf_item.goodsinfo.whsle_id) { |
6568 | 6576 | newd.whsle_id = gf_item.goodsinfo.whsle_id; | ... | ... |
pages/giftpack/giftpacklist/giftpacklist.js
... | ... | @@ -179,7 +179,7 @@ Page({ |
179 | 179 | } |
180 | 180 | this.init(); |
181 | 181 | }) |
182 | - th.setData({ submit:0}) | |
182 | + this.setData({ submit:0}) | |
183 | 183 | }, |
184 | 184 | GetBuyPrice: function (e) { |
185 | 185 | var that = this.data; |
... | ... | @@ -190,9 +190,6 @@ Page({ |
190 | 190 | return false; |
191 | 191 | } |
192 | 192 | |
193 | - if(th.data.submit) return false; | |
194 | - th.setData({submit:1}) | |
195 | - | |
196 | 193 | |
197 | 194 | this.data.payMoney = th.data.sele_g.payMoney; |
198 | 195 | th.setData({buyType: 2}) |
... | ... | @@ -201,6 +198,7 @@ Page({ |
201 | 198 | openSpecModal: 1 |
202 | 199 | }) |
203 | 200 | } else { |
201 | + | |
204 | 202 | var my_confirm = th.selectComponent("#my_confirm"); //组件的id |
205 | 203 | my_confirm.open( |
206 | 204 | "是否确定购买该礼包", |
... | ... | @@ -210,6 +208,7 @@ Page({ |
210 | 208 | my_confirm.open_cancel(0); |
211 | 209 | }, |
212 | 210 | function () { |
211 | + | |
213 | 212 | my_confirm.open_cancel(0); |
214 | 213 | com.buy_libao(th) |
215 | 214 | } | ... | ... |
pages/giftpack/public/buy_com.js
pages/goods/categoryList/categoryList.wxml
... | ... | @@ -131,11 +131,11 @@ |
131 | 131 | <view class="search-img left"> |
132 | 132 | <image class="wh100" src="{{iurl}}/miniapp/images/search.png"></image> |
133 | 133 | </view> |
134 | - <input bindfocus="goseach" class="search-cont" placeholder="输入商品关键字" type="text"></input> | |
134 | + <input bindfocus="goseach" class="search-cont" placeholder="请输入商品关键字" type="text"></input> | |
135 | 135 | </view> --> |
136 | 136 | <!-- 搜索框 --> |
137 | 137 | <view class="search-container f1"> |
138 | - <view bindtap="goseach"><text class="iconfont icon-sousuo pdr10"></text>输入商品关键字</view> | |
138 | + <view bindtap="goseach"><text class="iconfont icon-sousuo pdr10"></text>请输入商品关键字</view> | |
139 | 139 | </view> |
140 | 140 | <view class="pdl30" bindtap="getScancode"> |
141 | 141 | <image class="scanning_black-img" src="{{iurl}}/miniapp/images/goodscategory/scanning_black.png"></image> | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
... | ... | @@ -284,7 +284,11 @@ Page({ |
284 | 284 | prom_id = t.prom_id || 0; //活动ID |
285 | 285 | |
286 | 286 | var share_openid = t.share_openid; |
287 | - //群id | |
287 | + | |
288 | + console.log("gd onload-- 3 --"); | |
289 | + console.log(t); | |
290 | + | |
291 | + //群id | |
288 | 292 | if(t && t.groupchat_id && !t.groupchat_id!='undefined' && !t.groupchat_id!='null'){ |
289 | 293 | getApp().globalData.groupchat_id=t.groupchat_id |
290 | 294 | } |
... | ... | @@ -378,7 +382,7 @@ Page({ |
378 | 382 | gid: gid |
379 | 383 | }); |
380 | 384 | |
381 | - console.log("gd onload--2"); | |
385 | + console.log("gd onload-- 2 --"); | |
382 | 386 | console.log(first_leader); |
383 | 387 | |
384 | 388 | if (first_leader) { | ... | ... |
pages/user/order_detail/order_detail.wxml
... | ... | @@ -194,7 +194,7 @@ |
194 | 194 | <navigator wx:if="{{order.order_goods.length>1}}" class="tips-btn" |
195 | 195 | url="/packageB/pages/user/comment/comment?status=0&order_id={{order.order_id}}">评价</navigator> |
196 | 196 | <navigator wx:else class="tips-btn" |
197 | - url="/packageB/pages/user/add_comment/add_comment?goods_id={{order.order_goods[0].goods_id}}&order_id={{order.order_id}}}">去评价</navigator> | |
197 | + url="/packageB/pages/user/add_comment/add_comment?goods_id={{order.order_goods[0].goods_id}}&order_id={{order.order_id}}">去评价</navigator> | |
198 | 198 | </block> |
199 | 199 | <!-- 积分购 拼团 搭配购没有有再来一单 --> |
200 | 200 | <block wx:if="{{ (order.pay_status==1 || order.order_status==3) && order.pt_prom_id<=0 && order.integral<=0 && order.order_goods[0].prom_type!=5}}"> | ... | ... |