Commit 39715d290c2a5ad1c641a530e63f46a59e2a4d8c
Merge branch 'dev' into 'test'
Dev See merge request !419
Showing
26 changed files
with
122 additions
and
71 deletions
app.json
... | ... | @@ -83,8 +83,7 @@ |
83 | 83 | "pages/user/assistance/assistance_success", |
84 | 84 | "pages/user/assistance/assistance", |
85 | 85 | "pages/video/index", |
86 | - "pages/template/index", | |
87 | - "pages/store/index" | |
86 | + "pages/template/index" | |
88 | 87 | |
89 | 88 | ], |
90 | 89 | |
... | ... | @@ -92,6 +91,7 @@ |
92 | 91 | "root": "packageA/", |
93 | 92 | "name":"pack1", |
94 | 93 | "pages": [ |
94 | + "pages/store/index", | |
95 | 95 | "pages/prom_list/prom_list", |
96 | 96 | "pages/quan_list/quan_list", |
97 | 97 | "pages/quan_pro/quan_pro" |
... | ... | @@ -120,26 +120,26 @@ |
120 | 120 | { |
121 | 121 | "pagePath": "pages/index/index/index", |
122 | 122 | "text": "首页", |
123 | - "iconPath": "images/bar/index.png", | |
124 | - "selectedIconPath": "images/bar/index_on.png" | |
123 | + "iconPath": "packageA/images/bar/index.png", | |
124 | + "selectedIconPath": "packageA/images/bar/index_on.png" | |
125 | 125 | }, |
126 | 126 | { |
127 | 127 | "pagePath": "pages/goods/categoryList/categoryList", |
128 | 128 | "text": "分类", |
129 | - "iconPath": "images/bar/fl.png", | |
130 | - "selectedIconPath": "images/bar/fl_on.png" | |
129 | + "iconPath": "packageA/images/bar/fl.png", | |
130 | + "selectedIconPath": "packageA/images/bar/fl_on.png" | |
131 | 131 | }, |
132 | 132 | { |
133 | 133 | "pagePath": "pages/cart/cart/cart", |
134 | 134 | "text": "购物车", |
135 | - "iconPath": "images/bar/car.png", | |
136 | - "selectedIconPath": "images/bar/car_on.png" | |
135 | + "iconPath": "packageA/images/bar/car.png", | |
136 | + "selectedIconPath": "packageA/images/bar/car_on.png" | |
137 | 137 | }, |
138 | 138 | { |
139 | 139 | "pagePath": "pages/user/index/index", |
140 | 140 | "text": "我的", |
141 | - "iconPath": "images/bar/user.png", | |
142 | - "selectedIconPath": "images/bar/user_on.png" | |
141 | + "iconPath": "packageA/images/bar/user.png", | |
142 | + "selectedIconPath": "packageA/images/bar/user_on.png" | |
143 | 143 | } |
144 | 144 | ] |
145 | 145 | }, | ... | ... |
images/bar/car.png renamed to packageA/images/bar/car.png
3.43 KB
images/bar/car_on.png renamed to packageA/images/bar/car_on.png
17.7 KB
images/bar/fl.png renamed to packageA/images/bar/fl.png
3.86 KB
images/bar/fl_on.png renamed to packageA/images/bar/fl_on.png
18 KB
images/bar/fx.png renamed to packageA/images/bar/fx.png
3.88 KB
images/bar/fx_on.png renamed to packageA/images/bar/fx_on.png
17.8 KB
images/bar/index.png renamed to packageA/images/bar/index.png
3.79 KB
images/bar/index_on.png renamed to packageA/images/bar/index_on.png
17.8 KB
images/bar/user.png renamed to packageA/images/bar/user.png
4.08 KB
images/bar/user_on.png renamed to packageA/images/bar/user_on.png
17.9 KB
images/share/ct_num.png renamed to packageA/images/share/ct_num.png
3.63 KB
images/share/default_g_img.gif renamed to packageA/images/share/default_g_img.gif
7.54 KB
images/share/hui_hear_pic.png renamed to packageA/images/share/hui_hear_pic.png
27.6 KB
images/share/mackground.png renamed to packageA/images/share/mackground.png
10.4 KB
images/share/miao_share.png renamed to packageA/images/share/miao_share.png
14 KB
images/share/q_tj.png renamed to packageA/images/share/q_tj.png
1.81 KB
images/share/s_gou.png renamed to packageA/images/share/s_gou.png
23.8 KB
images/share/share_bg.png renamed to packageA/images/share/share_bg.png
7.03 KB
pages/cart/cart/cart.js
... | ... | @@ -1129,7 +1129,14 @@ Page({ |
1129 | 1129 | map.set(item.prom_id+"",ob); |
1130 | 1130 | } |
1131 | 1131 | } |
1132 | + | |
1133 | + if(item.is_gift==1){ | |
1134 | + var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id; | |
1135 | + getApp().request.delete(url, {}); | |
1136 | + list.goods.splice(i,1); | |
1137 | + } | |
1132 | 1138 | } |
1139 | + | |
1133 | 1140 | var map2=new Map(); |
1134 | 1141 | //请那些是赠品,但是优惠活动并没有被选中的商品要删除,同时满足条件的要放到map2, |
1135 | 1142 | for(var i in list.goods){ |
... | ... | @@ -1229,17 +1236,9 @@ Page({ |
1229 | 1236 | } |
1230 | 1237 | } |
1231 | 1238 | } |
1232 | - else{ | |
1233 | - //---条件不到,删除相应的赠品--- | |
1234 | - for(var gi in list.goods){ | |
1235 | - var item=list.goods[gi]; | |
1236 | - if(item.is_gift==1 && item.prom_id==discount.prom_id){ | |
1237 | - var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id; | |
1238 | - getApp().request.delete(url, {}); | |
1239 | - list.goods.splice(gi,1); | |
1240 | - } | |
1241 | - } | |
1242 | - } | |
1239 | + | |
1240 | + | |
1241 | + | |
1243 | 1242 | //-- 获取 -- |
1244 | 1243 | await getApp().request.promiseGet("/api/weshop/promgoodslist/list",{ |
1245 | 1244 | data:{prom_id:prom.id} | ... | ... |
pages/cart/cart2/cart2.wxml
... | ... | @@ -311,12 +311,12 @@ |
311 | 311 | <!-- 优惠活动优惠金额 --> |
312 | 312 | <view class="item" wx:if="{{formData.cut_price>0}}"> |
313 | 313 | <view>优惠活动</view> |
314 | - <view class="co-red">- ¥ {{formData.cut_price}}元</view> | |
314 | + <view class="co-red">- ¥ {{filters.toFix(formData.cut_price,2)}}元</view> | |
315 | 315 | </view> |
316 | 316 | <!-- 订单优惠优惠金额 --> |
317 | 317 | <view class="item" wx:if="{{formData.order_prom_amount>0}}"> |
318 | 318 | <view>订单优惠</view> |
319 | - <view class="co-red">- ¥ {{formData.order_prom_amount}}元</view> | |
319 | + <view class="co-red">- ¥ {{filters.toFix(formData.order_prom_amount,2)}}元</view> | |
320 | 320 | </view> |
321 | 321 | <view class="item" wx:if="{{formData.user_money>0}}"> |
322 | 322 | <view>使用余额</view> | ... | ... |
pages/cart/cart2/cart2.wxss
... | ... | @@ -346,7 +346,7 @@ margin:auto; |
346 | 346 | } |
347 | 347 | .xc-frame{ |
348 | 348 | width: 100%; |
349 | - height:68.9%; | |
349 | + height:60%; | |
350 | 350 | } |
351 | 351 | |
352 | 352 | .xc-frame .list-frame{ |
... | ... | @@ -480,11 +480,7 @@ padding-left: 40rpx; |
480 | 480 | margin-top: 30rpx; |
481 | 481 | |
482 | 482 | } |
483 | -.cx-popup.radius{ | |
484 | - | |
485 | -height: 650rpx; | |
486 | 483 | |
487 | -} | |
488 | 484 | .xc-hook { |
489 | 485 | width: 33rpx; |
490 | 486 | height: 33rpx; | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
... | ... | @@ -929,6 +929,11 @@ Page({ |
929 | 929 | sku: o.sku, |
930 | 930 | }; |
931 | 931 | |
932 | + //如果是积分够,is_integral_normal就要有积分购普通购买字段 | |
933 | + if(o.prom_type==4){ | |
934 | + newd.is_integral_normal=1; | |
935 | + } | |
936 | + | |
932 | 937 | //-----如果是秒杀,团购,积分购,拼团----- |
933 | 938 | if (th.data.prom_type == 1) { |
934 | 939 | newd.goods_price = th.data.prom_price; | ... | ... |
pages/user/order_detail/order_detail.js
... | ... | @@ -289,7 +289,7 @@ Page({ |
289 | 289 | for(var i in order_goods){ |
290 | 290 | var good=order_goods[i]; |
291 | 291 | //如果不是小程序有的功能,直接提示要去3.0处理 |
292 | - if(good.prom_type==2 || good.prom_type==3 || good.prom_type==4 || good.prom_type==5){ | |
292 | + if(good.prom_type==2 || good.prom_type==4){ | |
293 | 293 | wx.showModal({ |
294 | 294 | title: '提示', |
295 | 295 | content: '小程序还未有该活动,请到3.0公众号支付' |
... | ... | @@ -330,8 +330,8 @@ Page({ |
330 | 330 | }); |
331 | 331 | return false; |
332 | 332 | } |
333 | - | |
334 | - if(good.prom_type==1 || good.prom_type==6){ | |
333 | + | |
334 | + if((good.prom_type==1 || good.prom_type==6 || good.prom_type==5 ) && !good.is_gift && !good.is_collocation){ | |
335 | 335 | if(gg.prom_type!=good.prom_type) { |
336 | 336 | wx.showModal({ |
337 | 337 | title: '提示', |
... | ... | @@ -339,6 +339,32 @@ Page({ |
339 | 339 | }); |
340 | 340 | return false; |
341 | 341 | } |
342 | + if(good.prom_type==3 || good.prom_type==5){ | |
343 | + await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid+"/"+good.goods_id+"/0", {}).then(res => { | |
344 | + }).then(res=>{ | |
345 | + if(res.data.code==0){ | |
346 | + var r_data=res.data.data; | |
347 | + if(!r_data.collocationPromList && good.prom_type==5){ | |
348 | + wx.showModal({ | |
349 | + title: '提示', | |
350 | + content: good.goods_name+'未找到活动' | |
351 | + }); | |
352 | + } | |
353 | + if(!r_data.promGoodsLists && good.prom_type==3){ | |
354 | + wx.showModal({ | |
355 | + title: '提示', | |
356 | + content: good.goods_name+'未找到活动' | |
357 | + }); | |
358 | + } | |
359 | + }else{ | |
360 | + wx.showModal({ | |
361 | + title: '提示', | |
362 | + content: good.goods_name+'未找到活动' | |
363 | + }); | |
364 | + return false; | |
365 | + } | |
366 | + }) | |
367 | + } | |
342 | 368 | |
343 | 369 | }else{ |
344 | 370 | |
... | ... | @@ -374,24 +400,25 @@ Page({ |
374 | 400 | } |
375 | 401 | } |
376 | 402 | } |
377 | - | |
378 | - | |
379 | - var isok=1; | |
380 | - var card_field=th.data.card_field; | |
381 | - //如果会员是等级会员,商品有等级价,且不是活动商品 | |
382 | - if(card_field && gg[card_field]>0){ | |
383 | - if (good.goods_price != gg[card_field]) isok = 0; | |
384 | - }else{ | |
385 | - if (good.goods_price != gg.shop_price) isok = 0; | |
386 | - | |
387 | - } | |
388 | - if(!isok){ | |
389 | - wx.showModal({ | |
390 | - title: '提示', | |
391 | - content: gg.goods_name+'商品的价格发生了变化' | |
392 | - }); | |
393 | - return false; | |
394 | - } | |
403 | + | |
404 | + if(!good.is_gift && !good.is_collocation) { | |
405 | + var isok = 1; | |
406 | + var card_field = th.data.card_field; | |
407 | + //如果会员是等级会员,商品有等级价,且不是活动商品 | |
408 | + if (card_field && gg[card_field] > 0) { | |
409 | + if (good.goods_price != gg[card_field]) isok = 0; | |
410 | + } else { | |
411 | + if (good.goods_price != gg.shop_price) isok = 0; | |
412 | + | |
413 | + } | |
414 | + if (!isok) { | |
415 | + wx.showModal({ | |
416 | + title: '提示', | |
417 | + content: gg.goods_name + '商品的价格发生了变化' | |
418 | + }); | |
419 | + return false; | |
420 | + } | |
421 | + } | |
395 | 422 | |
396 | 423 | //--如果是线下库存的时候-- |
397 | 424 | if(th.data.conf.sales_rules==2){ | ... | ... |
pages/user/order_list/order_list.js
... | ... | @@ -380,7 +380,7 @@ Page({ |
380 | 380 | for(var i in order_goods){ |
381 | 381 | var good=order_goods[i]; |
382 | 382 | //如果不是小程序有的功能,直接提示要去3.0处理 |
383 | - if(good.prom_type==2 || good.prom_type==3 || good.prom_type==4 || good.prom_type==5){ | |
383 | + if(good.prom_type==2 || good.prom_type==4 ){ | |
384 | 384 | wx.showModal({ |
385 | 385 | title: '提示', |
386 | 386 | content: '小程序还未有该活动,请到3.0公众号支付' |
... | ... | @@ -422,10 +422,7 @@ Page({ |
422 | 422 | return false; |
423 | 423 | } |
424 | 424 | |
425 | - | |
426 | - console.log("-----------------111-------------------"); | |
427 | - | |
428 | - if(good.prom_type==1 || good.prom_type==6){ | |
425 | + if((good.prom_type==1 || good.prom_type==6 || good.prom_type==5 ) && !good.is_gift && !good.is_collocation){ | |
429 | 426 | if(gg.prom_type!=good.prom_type) { |
430 | 427 | wx.showModal({ |
431 | 428 | title: '提示', |
... | ... | @@ -433,9 +430,34 @@ Page({ |
433 | 430 | }); |
434 | 431 | return false; |
435 | 432 | } |
436 | - | |
433 | + if(good.prom_type==3 || good.prom_type==5){ | |
434 | + await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid+"/"+good.goods_id+"/0", {}).then(res => { | |
435 | + }).then(res=>{ | |
436 | + if(res.data.code==0){ | |
437 | + var r_data=res.data.data; | |
438 | + if(!r_data.collocationPromList && good.prom_type==5){ | |
439 | + wx.showModal({ | |
440 | + title: '提示', | |
441 | + content: good.goods_name+'未找到活动' | |
442 | + }); | |
443 | + } | |
444 | + if(!r_data.promGoodsLists && good.prom_type==3){ | |
445 | + wx.showModal({ | |
446 | + title: '提示', | |
447 | + content: good.goods_name+'未找到活动' | |
448 | + }); | |
449 | + } | |
450 | + }else{ | |
451 | + wx.showModal({ | |
452 | + title: '提示', | |
453 | + content: good.goods_name+'未找到活动' | |
454 | + }); | |
455 | + return false; | |
456 | + } | |
457 | + }) | |
458 | + } | |
459 | + | |
437 | 460 | }else{ |
438 | - | |
439 | 461 | if(gg.prom_type==1 || gg.prom_type==6){ |
440 | 462 | var prom=null; |
441 | 463 | //---如果是活动的时候--- |
... | ... | @@ -468,24 +490,25 @@ Page({ |
468 | 490 | } |
469 | 491 | } |
470 | 492 | } |
471 | - | |
472 | - | |
493 | + //赠品和搭配购不判断商品金额 | |
473 | 494 | var isok=1; |
474 | 495 | var card_field=th.data.card_field; |
475 | 496 | //如果会员是等级会员,商品有等级价,且不是活动商品 |
476 | - if(card_field && gg[card_field]>0){ | |
477 | - if (good.goods_price != gg[card_field]) isok = 0; | |
478 | - }else{ | |
479 | - if (good.goods_price != gg.shop_price) isok = 0; | |
480 | - | |
481 | - } | |
482 | - if(!isok){ | |
483 | - wx.showModal({ | |
484 | - title: '提示', | |
485 | - content: gg.goods_name+'商品的价格发生了变化' | |
486 | - }); | |
487 | - return false; | |
488 | - } | |
497 | + if(!good.is_gift && !good.is_collocation) { | |
498 | + if (card_field && gg[card_field] > 0) { | |
499 | + if (good.goods_price != gg[card_field]) isok = 0; | |
500 | + } else { | |
501 | + if (good.goods_price != gg.shop_price) isok = 0; | |
502 | + | |
503 | + } | |
504 | + if (!isok) { | |
505 | + wx.showModal({ | |
506 | + title: '提示', | |
507 | + content: gg.goods_name + '商品的价格发生了变化' | |
508 | + }); | |
509 | + return false; | |
510 | + } | |
511 | + } | |
489 | 512 | |
490 | 513 | //--如果是线下库存的时候-- |
491 | 514 | if(th.data.conf.sales_rules==2){ | ... | ... |