Commit 15daee3addb350c55493e61e610deed8e4594a06
1 parent
00c38f4a
Revert "1. 商品再加入购物车要判断是不是积分购。要is_integral_normal=1"
This reverts commit 00c38f4a37a7f7447f38b02afd597d997f16a7c4.
Showing
4 changed files
with
43 additions
and
99 deletions
pages/goods/goodsInfo/goodsInfo.js
| ... | ... | @@ -929,11 +929,6 @@ 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 | - | |
| 937 | 932 | //-----如果是秒杀,团购,积分购,拼团----- |
| 938 | 933 | if (th.data.prom_type == 1) { |
| 939 | 934 | 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==4){ | |
| 292 | + if(good.prom_type==2 || good.prom_type==3 || good.prom_type==4 || good.prom_type==5){ | |
| 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 || good.prom_type==5 ) && !good.is_gift && !good.is_collocation){ | |
| 333 | + | |
| 334 | + if(good.prom_type==1 || good.prom_type==6){ | |
| 335 | 335 | if(gg.prom_type!=good.prom_type) { |
| 336 | 336 | wx.showModal({ |
| 337 | 337 | title: '提示', |
| ... | ... | @@ -339,32 +339,6 @@ 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 | - } | |
| 368 | 342 | |
| 369 | 343 | }else{ |
| 370 | 344 | |
| ... | ... | @@ -400,25 +374,24 @@ Page({ |
| 400 | 374 | } |
| 401 | 375 | } |
| 402 | 376 | } |
| 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 | - } | |
| 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 | + } | |
| 422 | 395 | |
| 423 | 396 | //--如果是线下库存的时候-- |
| 424 | 397 | 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==4 ){ | |
| 383 | + if(good.prom_type==2 || good.prom_type==3 || good.prom_type==4 || good.prom_type==5){ | |
| 384 | 384 | wx.showModal({ |
| 385 | 385 | title: '提示', |
| 386 | 386 | content: '小程序还未有该活动,请到3.0公众号支付' |
| ... | ... | @@ -422,7 +422,10 @@ Page({ |
| 422 | 422 | return false; |
| 423 | 423 | } |
| 424 | 424 | |
| 425 | - if((good.prom_type==1 || good.prom_type==6 || good.prom_type==5 ) && !good.is_gift && !good.is_collocation){ | |
| 425 | + | |
| 426 | + console.log("-----------------111-------------------"); | |
| 427 | + | |
| 428 | + if(good.prom_type==1 || good.prom_type==6){ | |
| 426 | 429 | if(gg.prom_type!=good.prom_type) { |
| 427 | 430 | wx.showModal({ |
| 428 | 431 | title: '提示', |
| ... | ... | @@ -430,34 +433,9 @@ Page({ |
| 430 | 433 | }); |
| 431 | 434 | return false; |
| 432 | 435 | } |
| 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 | - | |
| 436 | + | |
| 460 | 437 | }else{ |
| 438 | + | |
| 461 | 439 | if(gg.prom_type==1 || gg.prom_type==6){ |
| 462 | 440 | var prom=null; |
| 463 | 441 | //---如果是活动的时候--- |
| ... | ... | @@ -490,25 +468,24 @@ Page({ |
| 490 | 468 | } |
| 491 | 469 | } |
| 492 | 470 | } |
| 493 | - //赠品和搭配购不判断商品金额 | |
| 471 | + | |
| 472 | + | |
| 494 | 473 | var isok=1; |
| 495 | 474 | var card_field=th.data.card_field; |
| 496 | 475 | //如果会员是等级会员,商品有等级价,且不是活动商品 |
| 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 | - } | |
| 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 | + } | |
| 512 | 489 | |
| 513 | 490 | //--如果是线下库存的时候-- |
| 514 | 491 | if(th.data.conf.sales_rules==2){ | ... | ... |
-
mentioned in commit 0027ba62f789be4b286a969e27d2572eeacef859