Commit e3c9b84b04b67ababf5f69dacd0cb2aca174c7d4
1 parent
94ff61d7
再来一单的bug
Showing
2 changed files
with
27 additions
and
7 deletions
pages/user/order_detail/order_detail.js
@@ -467,7 +467,7 @@ Page({ | @@ -467,7 +467,7 @@ Page({ | ||
467 | if(res.data.code==0 && res.data.data && res.data.data.length){ | 467 | if(res.data.code==0 && res.data.data && res.data.data.length){ |
468 | for(let i in res.data.data){ | 468 | for(let i in res.data.data){ |
469 | let item=res.data.data[i]; | 469 | let item=res.data.data[i]; |
470 | - if(item.prom_type==3) { | 470 | + if(item.prom_type==3 || item.prom_type==5) { |
471 | is_g_prom=1; break; | 471 | is_g_prom=1; break; |
472 | } | 472 | } |
473 | } | 473 | } |
@@ -527,7 +527,8 @@ Page({ | @@ -527,7 +527,8 @@ Page({ | ||
527 | th.setData({paying:0});return false; | 527 | th.setData({paying:0});return false; |
528 | } | 528 | } |
529 | } | 529 | } |
530 | - | 530 | + |
531 | + | ||
531 | //商品的普通购买 ,不要进行判断 | 532 | //商品的普通购买 ,不要进行判断 |
532 | if((good.prom_type==1 || good.prom_type==2 || good.prom_type==6 || good.prom_type==4) && !good.is_gift && !good.is_collocation && !good.is_integral_normal && !good.is_pd_normal){ | 533 | if((good.prom_type==1 || good.prom_type==2 || good.prom_type==6 || good.prom_type==4) && !good.is_gift && !good.is_collocation && !good.is_integral_normal && !good.is_pd_normal){ |
533 | if(gg.prom_type!=good.prom_type && gg.prom_type>0) { | 534 | if(gg.prom_type!=good.prom_type && gg.prom_type>0) { |
@@ -593,7 +594,7 @@ Page({ | @@ -593,7 +594,7 @@ Page({ | ||
593 | } | 594 | } |
594 | }else{ | 595 | }else{ |
595 | //不是赠品的时候 | 596 | //不是赠品的时候 |
596 | - if(!good.is_gift && good.prom_type!=3){ | 597 | + if(!good.is_gift && good.prom_type!=3 && !good.is_collocation ){ |
597 | var t_ok=1; | 598 | var t_ok=1; |
598 | await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid+"/"+good.goods_id+"/0"+"/"+getApp().globalData.user_id, {}).then(res => { | 599 | await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid+"/"+good.goods_id+"/0"+"/"+getApp().globalData.user_id, {}).then(res => { |
599 | if(res.data.code==0){ | 600 | if(res.data.code==0){ |
pages/user/order_list/order_list.js
@@ -703,6 +703,8 @@ Page({ | @@ -703,6 +703,8 @@ Page({ | ||
703 | th.setData({paying:0}); | 703 | th.setData({paying:0}); |
704 | return false; | 704 | return false; |
705 | } | 705 | } |
706 | + | ||
707 | + | ||
706 | //当是组合优惠的时候 | 708 | //当是组合优惠的时候 |
707 | if (good.prom_type == 7) { | 709 | if (good.prom_type == 7) { |
708 | //如果有组合购 | 710 | //如果有组合购 |
@@ -768,6 +770,7 @@ Page({ | @@ -768,6 +770,7 @@ Page({ | ||
768 | } | 770 | } |
769 | } | 771 | } |
770 | 772 | ||
773 | + | ||
771 | //如果是预售的时候, | 774 | //如果是预售的时候, |
772 | if(good.prom_type==8) { | 775 | if(good.prom_type==8) { |
773 | await getApp().request.promiseGet("/api/weshop/order/orderPresell/countBuyGoodsSum",{ | 776 | await getApp().request.promiseGet("/api/weshop/order/orderPresell/countBuyGoodsSum",{ |
@@ -814,6 +817,7 @@ Page({ | @@ -814,6 +817,7 @@ Page({ | ||
814 | } | 817 | } |
815 | } | 818 | } |
816 | 819 | ||
820 | + | ||
817 | //如果优惠促销和搭配购的时候 | 821 | //如果优惠促销和搭配购的时候 |
818 | if ((good.prom_type == 3 || good.prom_type == 5) && good.is_gift != 1 && good.is_collocation != 1) { | 822 | if ((good.prom_type == 3 || good.prom_type == 5) && good.is_gift != 1 && good.is_collocation != 1) { |
819 | var p_ok = 1,is_g_prom=0; | 823 | var p_ok = 1,is_g_prom=0; |
@@ -823,15 +827,18 @@ Page({ | @@ -823,15 +827,18 @@ Page({ | ||
823 | store_id:os.stoid,goodsidlist:good.goods_id,is_detail:1,user_id:user_id | 827 | store_id:os.stoid,goodsidlist:good.goods_id,is_detail:1,user_id:user_id |
824 | }; | 828 | }; |
825 | await getApp().request.promiseGet(url, {data:req_data}).then(async function (res) { | 829 | await getApp().request.promiseGet(url, {data:req_data}).then(async function (res) { |
830 | + debugger | ||
826 | if(res.data.code==0 && res.data.data && res.data.data.length){ | 831 | if(res.data.code==0 && res.data.data && res.data.data.length){ |
827 | for(let i in res.data.data){ | 832 | for(let i in res.data.data){ |
828 | let item=res.data.data[i]; | 833 | let item=res.data.data[i]; |
829 | - if(item.prom_type==3) { | 834 | + if(item.prom_type==3 || item.prom_type==5){ |
830 | is_g_prom=1; break; | 835 | is_g_prom=1; break; |
831 | } | 836 | } |
832 | } | 837 | } |
833 | } | 838 | } |
834 | }) | 839 | }) |
840 | + | ||
841 | + | ||
835 | if(is_g_prom){ | 842 | if(is_g_prom){ |
836 | await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid + "/" + good.goods_id + "/0"+"/"+getApp().globalData.user_id, {}).then(res => { | 843 | await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid + "/" + good.goods_id + "/0"+"/"+getApp().globalData.user_id, {}).then(res => { |
837 | if (res.data.code == 0) { | 844 | if (res.data.code == 0) { |
@@ -881,12 +888,17 @@ Page({ | @@ -881,12 +888,17 @@ Page({ | ||
881 | }) | 888 | }) |
882 | 889 | ||
883 | } | 890 | } |
891 | + | ||
892 | + | ||
893 | + | ||
884 | if (!p_ok){ | 894 | if (!p_ok){ |
885 | th.setData({paying:0}); | 895 | th.setData({paying:0}); |
886 | return false; | 896 | return false; |
887 | } | 897 | } |
888 | } | 898 | } |
889 | 899 | ||
900 | + | ||
901 | + | ||
890 | //商品的普通购买 ,不要进行判断 | 902 | //商品的普通购买 ,不要进行判断 |
891 | if ((good.prom_type == 1 || good.prom_type == 2 || good.prom_type == 6 || good.prom_type == 4 || good.prom_type == 8) | 903 | if ((good.prom_type == 1 || good.prom_type == 2 || good.prom_type == 6 || good.prom_type == 4 || good.prom_type == 8) |
892 | && !good.is_gift && !good.is_collocation && !good.is_integral_normal && !good.is_pd_normal) { | 904 | && !good.is_gift && !good.is_collocation && !good.is_integral_normal && !good.is_pd_normal) { |
@@ -898,6 +910,8 @@ Page({ | @@ -898,6 +910,8 @@ Page({ | ||
898 | } | 910 | } |
899 | 911 | ||
900 | } else { | 912 | } else { |
913 | + | ||
914 | + | ||
901 | if ((gg.prom_type == 1 || good.prom_type == 2 || gg.prom_type == 3 || gg.prom_type == 5 || gg.prom_type == 6 || gg.prom_type == 4) | 915 | if ((gg.prom_type == 1 || good.prom_type == 2 || gg.prom_type == 3 || gg.prom_type == 5 || gg.prom_type == 6 || gg.prom_type == 4) |
902 | && !good.is_collocation && !good.is_gift && !good.is_integral_normal && !good.is_pd_normal) { | 916 | && !good.is_collocation && !good.is_gift && !good.is_integral_normal && !good.is_pd_normal) { |
903 | var prom = null; | 917 | var prom = null; |
@@ -911,7 +925,9 @@ Page({ | @@ -911,7 +925,9 @@ Page({ | ||
911 | } | 925 | } |
912 | }) | 926 | }) |
913 | } | 927 | } |
914 | - | 928 | + |
929 | + | ||
930 | + | ||
915 | if (gg.prom_type == 2) { | 931 | if (gg.prom_type == 2) { |
916 | await getApp().request.promiseGet("/api/weshop/goods/groupBuy/getActInfo/" + os.stoid + "/"+ gg.goods_id + "/" + gg.prom_id, {}).then(res => { | 932 | await getApp().request.promiseGet("/api/weshop/goods/groupBuy/getActInfo/" + os.stoid + "/"+ gg.goods_id + "/" + gg.prom_id, {}).then(res => { |
917 | if (res.data.code == 0) { | 933 | if (res.data.code == 0) { |
@@ -920,7 +936,8 @@ Page({ | @@ -920,7 +936,8 @@ Page({ | ||
920 | } | 936 | } |
921 | }) | 937 | }) |
922 | } | 938 | } |
923 | - | 939 | + |
940 | + | ||
924 | 941 | ||
925 | if (gg.prom_type == 6) { | 942 | if (gg.prom_type == 6) { |
926 | await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + gg.prom_id, {}).then(res => { | 943 | await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + gg.prom_id, {}).then(res => { |
@@ -952,7 +969,7 @@ Page({ | @@ -952,7 +969,7 @@ Page({ | ||
952 | } | 969 | } |
953 | } | 970 | } |
954 | else { | 971 | else { |
955 | - if (!good.is_gift && good.prom_type != 3) { | 972 | + if (!good.is_gift && good.prom_type != 3 && !good.is_collocation) { |
956 | var t_ok = 1; | 973 | var t_ok = 1; |
957 | await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid + "/" + good.goods_id + "/0"+"/"+getApp().globalData.user_id, {}).then(res => { | 974 | await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid + "/" + good.goods_id + "/0"+"/"+getApp().globalData.user_id, {}).then(res => { |
958 | if (res.data.code == 0) { | 975 | if (res.data.code == 0) { |
@@ -972,6 +989,8 @@ Page({ | @@ -972,6 +989,8 @@ Page({ | ||
972 | //-- 如果有参加线下取价 -- | 989 | //-- 如果有参加线下取价 -- |
973 | if (good.offline_cut > 0) wlist += encodeURIComponent(gg.erpwareid) + ","; | 990 | if (good.offline_cut > 0) wlist += encodeURIComponent(gg.erpwareid) + ","; |
974 | } | 991 | } |
992 | + | ||
993 | + | ||
975 | //赠品和搭配购不判断商品金额 | 994 | //赠品和搭配购不判断商品金额 |
976 | var isok = 1; | 995 | var isok = 1; |
977 | var card_field = th.data.card_field; | 996 | var card_field = th.data.card_field; |