Commit e3c9b84b04b67ababf5f69dacd0cb2aca174c7d4

Authored by yvan.ni
1 parent 94ff61d7

再来一单的bug

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