Commit 0494e61382aa48aec5dd5b781a28d918657b83c6

Authored by yvan.ni
1 parent 819fb7ab

预售服务卡项的优化

packageA/pages/goodsInfo/goodsInfo.wxml
... ... @@ -34,7 +34,7 @@
34 34 </view>
35 35 </swiper-item>
36 36 <swiper-item wx:for="{{gallery}}" wx:key="gallery" class="sty">
37   - <view class="wh100 g_img_box" style="background-image:url({{data.image_url?data.image_url:'miniapp/images/default_g_img.gif'}});"></view>
  37 + <view class="wh100 g_img_box" style="background-image:url({{iurl +(data.image_url?data.image_url:'miniapp/images/default_g_img.gif')}});"></view>
38 38 </swiper-item>
39 39 </swiper>
40 40  
... ...
packageC/pages/presell/cardInfo/goodsInfo.js
... ... @@ -715,26 +715,30 @@ Page({
715 715 listServiceItem: t.data.data.listServiceItem,
716 716 });
717 717 };
  718 +
  719 + var data={
  720 + 'goods_name': t.data.data.serviceName,
  721 + 'shop_price': t.data.data.money,
  722 + 'show_price': t.data.data.show_price,
  723 + 'validDays': t.data.data.validDays,
  724 + 'serviceContent': t.data.data.serviceContent,
  725 + 'image_url': t.data.data.imgUrl,
  726 + 'goods_id': t.data.data.id,
  727 + 'id': t.data.data.id,
  728 + 'sales_sum': t.data.data.sales_sum,
  729 + 'storageId':t.data.data.storageId,
  730 + 'service_sn':t.data.data.serviceSn,
  731 + 'goods_sn':t.data.data.serviceSn,
  732 + 'listServiceVideos': t.data.data.listServiceVideos,
  733 + }
  734 +
718 735 that.setData({
719   - 'data.goods_name': t.data.data.serviceName,
720   - 'data.shop_price': t.data.data.money,
721   - 'data.show_price': t.data.data.show_price,
722   - 'data.validDays': t.data.data.validDays,
723   - 'data.serviceContent': t.data.data.serviceContent,
724   - 'data.image_url': t.data.data.imgUrl,
725   - 'data.goods_id': t.data.data.id,
726   - 'data.id': t.data.data.id,
727   - 'data.sales_sum': t.data.data.sales_sum,
728   - 'data.storageId':t.data.data.storageId,
729   - 'data.service_sn':t.data.data.serviceSn,
730   - 'data.listServiceVideos': t.data.data.listServiceVideos,
731   - // gallery: t.data.data.listServiceImages,
732   - // mapurl: t.data.data.listServiceVideos[0].video_url,
733   - // mapurl_f_img: t.data.data.listServiceVideos[0].video_img,
734   - //listServiceItem: t.data.data.listServiceItem,
  736 + data:data,
  737 + sele_g:data
735 738 });
736 739  
737 740 that.getTaohe();
  741 + that.get_sto();
738 742 // ----> 预售
739 743 let prom_type = th.data.options.prom_type;
740 744  
... ... @@ -840,360 +844,158 @@ Page({
840 844 activeCategoryId: 1
841 845 });
842 846 },
843   -
844 847  
845   -
846   - //------------加入购物车--------------
847   - addCart: async function(t) {
848   - var th = this;
849   - var ind = t.currentTarget.dataset.openSpecModal_ind;
850   - var action= t.currentTarget.dataset.action;
851 848  
852 849  
853 850  
854   - if(getApp().is_sp_hao() && action=='add'){
855   - wx.showToast({
856   - title: "视频号商品不允许加入购物车",
857   - icon: 'none',
858   - duration: 2000
859   - });
860   - return false;
861   - }
  851 + //------------加入购物车--------------
  852 + addCart: function (t) {
  853 + var th = this;
  854 + var ind = t.currentTarget.dataset.openSpecModal_ind;
  855 + if (!ind) ind = t.currentTarget.dataset.openspecmodal_ind;
  856 + th.setData({
  857 + open_ind_store: ind
  858 + });
862 859  
  860 + th.add_cart_func(t);
863 861  
864   - if(this.data.goodsInputNum==0){
865   - getApp().my_warnning('请输入购买数量', 1, th, 450);
866   - return false;
867   - }
  862 + },
868 863  
869 864  
  865 + //-- 加入购物的函数 --
  866 + add_cart_func: function (t) {
  867 + var i = getApp().request;
  868 + if (oo.user_id == null) {
  869 + return s.my_warnning("还未登录!", 0, this);
  870 + }
870 871  
871   - if(!ind) ind = t.currentTarget.dataset.openspecmodal_ind;
872   -
873   - th.setData({
874   - open_ind_store: ind
875   - });
  872 + if (!getApp().globalData.userInfo) {
  873 + return s.my_warnning("还未登录!", 0, this);
  874 + }
876 875  
877   - if(!th.data.sto_sele_name) {
878   - getApp().my_warnning('请选择门店', 1, th, 450);
879   - return false;
880   - };
881   -
882   - // 库存
883   - var redisNums = 0;
884   - // 限购数
885   - var limitNum = 0;
886   - // 已购买数量
887   - var boughtNum = 0;
888   -
889   - var is_ok=1;
890   -
891   - // 秒杀活动
892   - if(this.data.prom_type == 1) {
893   - // 如果是秒杀活动下的单独购买,is_normal为1
894   - if(this.data.openSpecModal_flash_normal) this.data.is_normal = 1;
895   -
896   - if(!this.data.is_normal) {// 秒杀购买
897   -
898   - // 获取redis当前可以购买的数量
899   - // 如果数量为0,设置和显示已抢光
900   - // 否则,进一步判断是否超出限购或超出库存
901   - await this.getactLen().then(async function(res) {
902   - redisNums = res;
903   - let curNum = th.data.goodsInputNum;
904   - // res: redis可购买数量
905   - console.log('当前可以购买的数量:', res);
906   - if(res <= 0) {
907   - // 可购买数量<=0, 设置和显示已抢光
908   - th.setData({
909   - prom_r_null: 1,
910   - });
911   - // wx.showModal({
912   - // title: '超出活动库存',
913   - // });
914   - getApp().my_warnning('超出活动库存', 0, self);
915   - is_ok=0;
916   - return false;
917   - } else {
918   - // 可购买数量>0
919   - // 计算自己还可以购买的数量
920   - // 自己还可购买的数量c = 每人活动限购数量a - 自己已经购买的数量b
921   - // 如果限购数量a>redis可购买数量d,当增加数量t>d, 提示超出库存
922   - // 如果限购数量a<=redis可购买数量d, 当增加数量t>a,提示超出限购
923   - let actInfo = th.data.sele_g;
924   - await th.get_buy_num2().then(function (data) {
925   - let limited = actInfo.buy_limit==0?100000:actInfo.buy_limit; // 限购数量a
926   - let promcardbuynum = data.data.data.promcardbuynum;
927   - let buyedNum = promcardbuynum; // 自己已经购买的数量b
928   - let canBuyNum = limited - buyedNum; // 自己还可购买的数量c
929   - limitNum = limited;
930   - boughtNum = buyedNum;
  876 + var e = this, th = e, o = this.data.sele_g, a = o.goods_id;
  877 + //----------添加到购物车时,要判断限购数量,--------
  878 + e.get_buy_num(o, function (ee) {
  879 + //---判断商品是否超出限购---
  880 + if (th.data.g_buy_num != null && th.data.sele_g.viplimited > 0) {
  881 + if (th.data.goodsInputNum + th.data.g_buy_num.get(th.data.sele_g.goods_id) > th.data.sele_g.viplimited) {
  882 + wx.showModal({
  883 + title: '提示',
  884 + content: '超出商品限购'
  885 + });
  886 + return false;
  887 + }
  888 + }
  889 + //---判断商品是否超出活动限购---
  890 + if (th.data.prom_buy_num != -1 && th.data.prom_buy_limit > 0) {
  891 + if (th.data.goodsInputNum + th.data.prom_buy_num > th.data.prom_buy_limit) {
  892 + wx.showModal({
  893 + title: '提示',
  894 + content: '超出商品活动限购'
  895 + });
  896 + return false;
  897 + }
  898 + }
931 899  
932   - if(canBuyNum <= 0) {
933   - canBuyNum = 0;
934   - };
935   -
936   - if(canBuyNum > res) {
937   - if(curNum > res) { // t当前增减的数量
938   - // wx.showModal({
939   - // title: '超出活动库存',
940   - // });
941   - getApp().my_warnning('超出活动库存', 0, self);
942   - th.setData({
943   - goodsInputNum: res || 1
944   - });
945   - is_ok=0;
946   - return false;
947   - };
948   - };
949   -
950   - if(canBuyNum <= res) {
951   - if(curNum > canBuyNum) {
952   - // wx.showModal({
953   - // title: '超出限购数量',
954   - // });
955   - getApp().my_warnning('超出限购数量', 0, self);
956   - th.setData({
957   - goodsInputNum: canBuyNum || 1,
958   - });
959   - is_ok=0;
960   - return false;
961   - }
962   - }
963   - })
  900 + if (th.data.goodsInputNum <= 0) return s.my_warnning("商品数量不能为0", 0, th);
  901 + if (th.data.sto_sele_name == null || th.data.sto_sele_name == undefined)
  902 + th.setData({
  903 + sto_sele_name: ""
  904 + });
  905 + if (th.data.sto_sele_name == "") return s.my_warnning("请选择门店", 0, th);
964 906  
965   - }
966   - })
967   -
968   - }
969   - }
970   -
  907 + //--------------此时操作的数据------------
  908 + var newd = {
  909 + goods_id: o.id,
  910 + goods_num: th.data.goodsInputNum,
  911 + pick_id: th.data.sto_sele_id,
  912 + user_id: oo.user_id,
  913 + store_id: th.data.stoid,
  914 + goods_price: o.shop_price,
  915 + member_goods_price: o.shop_price,
  916 + goods_name: o.goods_name,
  917 + goods_sn: o.goods_sn,
  918 + presell_list_id: th.data.presellList.id,
  919 + };
  920 +
  921 + //---是不是从收藏夹出来的---
  922 + if (th.data.c_guide_id) {
  923 + newd['guide_id'] = th.data.c_guide_id;
  924 + newd['guide_type'] = 2;
  925 + if ("add" == t.currentTarget.dataset.action) newd['guide_type'] = 3;
  926 + } else {
  927 + if (getApp().globalData.guide_id) {
  928 + newd['guide_id'] = getApp().globalData.guide_id;
  929 + newd['guide_type'] = 0;
  930 + if ("add" == t.currentTarget.dataset.action) newd['guide_type'] = 1;
  931 + }
  932 + }
971 933  
972   - if(!is_ok) return false;
  934 + if(getApp().globalData.groupchat_id){
  935 + newd['groupchat_id'] = getApp().globalData.groupchat_id;
  936 + }
973 937  
  938 + //让商品带上房间号
  939 + if (th.data.sys_switch.is_skuroom_id == 1) {
  940 + if (th.data.data.goods_id == getApp().globalData.room_goods_id) {
  941 + newd.room_id = getApp().globalData.room_id;
  942 + }
  943 + } else {
  944 + if (newd.goods_id == getApp().globalData.room_goods_id) newd.room_id = getApp().globalData.room_id;
  945 + }
974 946  
975 947  
976   - if(action=="buy"){
977   - //--------------此时操作的数据------------
978   - var newd = {
979   - id: th.data.data.id,
980   - goods_num: th.data.goodsInputNum,
981   - pick_id: th.data.sto_sele_id,
982   - keyid: th.data.sto_sele_keyid,
983   - };
984   - newd['pick_name'] = th.data.sto_sele_name;
985   - newd['guide_id'] = getApp().globalData.guide_id;
986   - newd['guide_type']=0;
987   -
988   - if(getApp().globalData.groupchat_id){
989   - newd['groupchat_id'] = getApp().globalData.groupchat_id;
990   - }
991   - if(this.data.prom_type && this.data.prom_type == 1) {
992   - newd['prom_type'] = this.data.prom_type;
993   - newd['prom_id'] = this.data.prom_id;
994   - newd['prom_price'] = this.data.prom_price;
995   - };
996   -
997   - if(this.data.prom_type == 1 && this.data.openSpecModal_flash_normal) {
998   - newd['prom_type'] = 0;
999   - newd['prom_price'] = this.data.data.shop_price;
1000   - };
1001   -
1002   - console.log('newd++++++++', newd);
1003   - th.buyNow(newd);
1004   - } else {
1005   -
1006   - var newd = {
1007   - service_id: th.data.data.id,
1008   - service_sn:th.data.data.service_sn,
1009   - service_name:th.data.data.goods_name,
1010   - goods_num: th.data.goodsInputNum,
1011   - pick_id: th.data.sto_sele_id,
1012   - user_id:oo.user_id,
1013   - store_id:os.stoid,
1014   - money:th.data.data.shop_price,
1015   - };
1016   - if(getApp().globalData.guide_id) {
1017   - newd['guide_id'] = getApp().globalData.guide_id;
1018   - newd['guide_type']=0;
1019   - };
1020   - if(getApp().globalData.groupchat_id){
1021   - newd['groupchat_id'] = getApp().globalData.groupchat_id;
  948 + //如果有线下取价
  949 + if (o.offline_price) {
  950 + newd.offline_price = o.offline_price;
  951 + newd.pricing_type = o.pricing_type;
  952 + }
  953 +
  954 + newd.goods_price = th.data.prom_price;
  955 + newd.member_goods_price = th.data.prom_price,
  956 + newd.prom_type = 8;
  957 + newd.prom_id = th.data.presell_id;
  958 +
  959 + if (o.store_count <= 0) return s.my_warnning("库存已为空!", 0, th);
  960 + if (o.store_count < e.data.goodsInputNum) return s.my_warnning("库存不足!", 0, th);
  961 + th.add_cart_next(e, t, a, o, newd); //加入购物车下一步
  962 +
  963 +
  964 + })
  965 + },
  966 +
  967 + //---加入购物车的最后一步---
  968 + add_cart_next(e, t, a, o, newd, CanOutQty) {
  969 + var th = this, i = getApp().request;
  970 + newd['pick_name'] = th.data.sto_sele_name;
  971 + newd['pick_dis'] = th.data.sto_sele_distr;
  972 + th.buyNow(newd);
  973 +
  974 + },
  975 +
  976 + //----------立即购买-----------
  977 + buyNow: function (e) {
  978 +
  979 + this.setData({
  980 + openSpecModal: 0,
  981 + openSpecModal_inte: 0,
  982 + openSpecModal_inte_normal: 0,
  983 + openSpecModal_pt: 0,
  984 + })
  985 +
  986 + getApp().set_b_now(e);
  987 +
  988 + //如果是全额付款的话
  989 + if (this.data.presellForm.presell_type == 1) {
  990 + getApp().goto("/packageC/pages/presell/cart/cart2")
  991 + } else {
  992 + getApp().goto("/packageC/pages/presell/cart/cart2_pre");
1022 993 }
1023   - // 秒杀:单独购买的情况下,加入购物车显示的是零售价,否则显示秒杀活动价
1024   - if(th.data.options.prom_type == 1) {
1025   - newd['prom_type'] = th.data.options.prom_type;
1026   - newd['prom_id'] = th.data.options.prom_id;
1027   - if(th.data.openSpecModal_flash_normal) {
1028   - newd['money'] = th.data.data.shop_price;
1029   - newd['is_pd_normal'] = 1;
1030   - } else {
1031   - newd['money'] = th.data.prom_price;
1032   - };
1033   - };
1034   -
  994 + },
  995 +
  996 +
1035 997  
1036   - //----先看会员在购物车中是否加入了该商品-----
1037   - getApp().request.get("/api/weshop/cartService/page", {
1038   - data: {
1039   - store_id: os.stoid,
1040   - user_id: oo.user_id,
1041   - service_id: th.data.data.id,
1042   - },
1043   - success: function(re) {
1044   - //-------如果购物车中有相关的数据---------
1045   - if (re.data.data.total > 0) {
1046   - var item = null;
1047   - // 多门店问题
1048   - var cartGoodsNum = 0;
1049   - const tmpObj = re.data.data.pageData;
1050   - for (let i = 0; i < tmpObj.length; i++) {
1051   - if (th.data.sto_sele_id != tmpObj[i].pick_id) {
1052   - cartGoodsNum += parseInt(tmpObj[i].goods_num);
1053   - } else {
1054   - item = tmpObj[i];
1055   - }
1056   - }
1057   - // 当前门店同类商品还没加入到购物车 但是有其他门店的同类商品
1058   - if (th.data.prom_type == 1 && !th.data.is_normal && !item) {
1059   -
1060   - // 秒杀购物车购买 修正数量
1061   - var snum = limitNum - boughtNum;
1062   - if (snum <= 0) {
1063   - // wx.showModal({
1064   - // title: '超出限购数量',
1065   - // });
1066   - getApp().my_warnning('超出限购数量', 0, self);
1067   - return false;
1068   - }
1069   -
1070   - var cSnum = snum- cartGoodsNum <= 0 ? 0 : snum- cartGoodsNum;
1071   - var cRedisNums = redisNums- cartGoodsNum <= 0 ? 0 : redisNums- cartGoodsNum;
1072   -
1073   - if (newd['goods_num'] >= redisNums){
1074   - if (redisNums > snum) {
1075   - newd['goods_num'] = cSnum;
1076   - } else {
1077   - newd['goods_num'] = cRedisNums;
1078   - }
1079   - } else {
1080   - if (newd['goods_num'] > snum) newd['goods_num'] = cSnum;
1081   - }
1082   -
1083   - if (newd['goods_num'] <= 0) {
1084   - getApp().my_warnning('加入购物车成功', 1, th, 450);
1085   - th.closeSpecModal();
1086   - return false;
1087   - }
1088   - getApp().request.post("/api/weshop/cartService/save", {
1089   - data: newd,
1090   - success: function(t) {
1091   - getApp().my_warnning('加入购物车成功', 1, th, 450);
1092   - var c_num = th.data.cartGoodsNum + th.data.goodsInputNum;
1093   - th.setData({
1094   - cartGoodsNum: c_num
1095   - });
1096   - th.closeSpecModal();
1097   - }
1098   - });
1099   - return false;
1100   - }
1101   -
1102   - // 以下为当前门店同类商品已经加入到购物车
1103   - var totalNum = th.data.goodsInputNum + item.goods_num;
1104   -
1105   - // 秒杀购物车购买 修正数量
1106   - if (th.data.prom_type == 1 && !th.data.is_normal) {
1107   - var snum = limitNum - boughtNum;
1108   - if (snum <= 0) {
1109   - // wx.showModal({
1110   - // title: '超出限购数量',
1111   - // });
1112   - getApp().my_warnning('超出限购数量', 0, self);
1113   - return false;
1114   - }
1115   - if (totalNum >= redisNums){
1116   - if (redisNums > snum) {
1117   - totalNum = snum- cartGoodsNum;
1118   - } else {
1119   - totalNum = redisNums- cartGoodsNum;
1120   - }
1121   - } else {
1122   - if (totalNum > snum)
1123   - totalNum = snum- cartGoodsNum;
1124   - }
1125   - }
1126   -
1127   - var updata = {
1128   - id: item.id,
1129   - goods_num: totalNum,
1130   - money: th.data.data.shop_price,
1131   - store_id: os.stoid,
1132   - };
1133   -
1134   - // 秒杀:单独购买的情况下,加入购物车显示的是零售价,否则显示秒杀活动价
1135   - if(th.data.options.prom_type == 1) {
1136   - // updata['prom_type'] = th.data.options.prom_type;
1137   - // updata['prom_id'] = th.data.options.prom_id;
1138   - if(th.data.openSpecModal_flash_normal) {
1139   - updata['money'] = th.data.data.shop_price;
1140   - updata['is_pd_normal'] = 1;
1141   - } else {
1142   - updata['money'] = th.data.prom_price;
1143   - };
1144   - };
1145   -
1146   - if (getApp().globalData.guide_id) {
1147   - updata['guide_id'] = getApp().globalData.guide_id;
1148   - updata['guide_type'] = 1;
1149   - }
1150   - if(getApp().globalData.groupchat_id){
1151   - updata['groupchat_id'] = getApp().globalData.groupchat_id;
1152   - }
1153   - getApp().request.put("/api/weshop/cartService/update", {
1154   - data: updata,
1155   - success: function(t) {
1156   - getApp().my_warnning('加入购物车成功', 1, th, 450);
1157   - var c_num = th.data.cartGoodsNum + th.data.goodsInputNum;
1158   - th.setData({
1159   - cartGoodsNum: c_num
1160   - });
1161   - th.closeSpecModal();
1162   - }
1163   - });
1164   - } else {
1165   - getApp().request.post("/api/weshop/cartService/save", {
1166   - data: newd,
1167   - success: function(t) {
1168   - getApp().my_warnning('加入购物车成功', 1, th, 450);
1169   - var c_num = th.data.cartGoodsNum + th.data.goodsInputNum;
1170   - th.setData({
1171   - cartGoodsNum: c_num
1172   - });
1173   - th.closeSpecModal();
1174   - }
1175   - });
1176   - }
1177   - }
1178   - });
1179 998  
1180   - };
1181   -
1182   -
1183   -
1184   -
1185   -
1186   -
1187   -
1188   - },
1189   -
1190   - //----------立即购买-----------
1191   - buyNow: function(e) {
1192   - getApp().globalData.service_now=e;
1193   - wx.redirectTo({
1194   - url: "/packageA/pages/cart2_ser/cart2_ser",
1195   - });
1196   - },
1197 999 //----------增加购买数量-----------
1198 1000 addCartNum: function(t) {
1199 1001 this.checkCartNum(this.data.goodsInputNum + 1);
... ... @@ -1663,12 +1465,11 @@ Page({
1663 1465 e.data.data.pageData.splice(k--, 1);
1664 1466 }
1665 1467 }
1666   -
1667 1468 }
1668 1469  
1669 1470 //如果有秒杀的指定门店
1670   - if(th.data.prom_type==1 && th.data.prom_act && th.data.prom_act.pick_up_lists && e.data.data.pageData.length && !is_normal){
1671   - var pick_up_lists=th.data.prom_act.pick_up_lists;
  1471 + if(th.data.presellForm && th.data.presellForm.pick_up_lists && e.data.data.pageData.length && !is_normal){
  1472 + var pick_up_lists=th.data.presellForm.pick_up_lists;
1672 1473 for (var kq = 0; kq < e.data.data.pageData.length; kq++) {
1673 1474 var it0=e.data.data.pageData[kq];
1674 1475 var idx0=pick_up_lists.findIndex(function (e){
... ... @@ -4036,6 +3837,7 @@ Page({
4036 3837 pre_arr = e.data.data.pageData[idx];
4037 3838 th.setData({ pre_arr: pre_arr, show: 1 })
4038 3839 th.data.prom_buy_limit = pre_arr.vip_butyqty;
  3840 + th.data.prom_price=pre_arr.presell_price; //定义一下活动的价格
4039 3841 }
4040 3842 })
4041 3843 if (!pre_arr) {
... ...
packageC/pages/presell/cardInfo/goodsInfo.wxml
... ... @@ -53,7 +53,7 @@
53 53 </swiper-item>
54 54 <swiper-item wx:for="{{gallery}}" wx:key="gallery">
55 55 <!-- <image class="wh100" src="{{item.image_url}}" mode="aspectFit" binderror="bind_bnerr" lazy-load="true" data-errorimg="gallery[{{index}}].image_url"></image> -->
56   - <view class="wh100 g_img_box" style="background-image:url({{item.image_url}});"></view>
  56 + <view class="wh100 g_img_box" style="background-image:url({{iurl +(item.image_url?item.image_url:'miniapp/images/default_g_img.gif')}});"></view>
57 57 </swiper-item>
58 58 </swiper>
59 59 <block wx:if="{{mapurl}}">
... ... @@ -208,6 +208,8 @@
208 208 </view>
209 209 </view>
210 210 </view>
  211 +
  212 +
211 213 <!-- - 宝贝评价 -- -->
212 214 <view class="bdt16">
213 215 <view class="bb_view">
... ... @@ -262,89 +264,82 @@
262 264 </view>
263 265 </scroll-view>
264 266 </view>
  267 +
  268 +
265 269 <!-- 图文详情 -->
266   - <view class="bdt16">
267   - <view class="t_g_info">
268   - <view class="red_shu"></view>
269   - <view class="fs30 bold">商品详情</view>
270   - </view>
271   - <view class="pd20">
272   - <view class="table_s">
273   - <view class="tb_item tb-l">
274   - <view class="item_left">
275   - <text>商品名称</text>
276   - </view>
277   - <view class="item_right">
278   - <text>{{data.goods_name}}</text>
  270 + <view class="t_g_info bdt16">
  271 + <view class="red_shu"></view>
  272 + <view class="fs30 bold">卡项详情</view>
  273 + </view>
  274 + <view class="pdh20">
  275 +
  276 + <block wx:if="{{listServiceItem && listServiceItem.length > 0}}">
  277 + <view class="card fs28" wx:for="{{listServiceItem}}">
  278 + <view class="flex ai_c jc_sb" style="height: 88rpx;">
  279 + <view class="ellipsis-2 f1" wx:if="{{item.displayqty==1}}" >{{item.projectName}}(无限次)</view>
  280 + <view class="ellipsis-2 f1" wx:else>{{item.projectName}}({{item.frequency}}次)</view>
  281 + <view class="pdl30 t-r">
  282 + <view class="rmb fs36 bold c-red">{{item.vipprice}}</view>
  283 + <view class="fs22 c-9 del" wx:if="{{item.showPrice}}">零售价:¥{{item.showPrice}}</view>
279 284 </view>
280 285 </view>
281   - <view class="tb_item tb-l">
282   - <view class="item_left">
283   - <text>商品编号</text>
284   - </view>
285   - <view class="item_right">
286   - <text>{{data.goods_sn}}</text>
287   - </view>
  286 + <view class="flex ai_c jc_sb fs24 c-6">
  287 + <view class="ellipsis-1">备注:{{filters.show_default(item.remark, '无')}}</view>
  288 + <!-- 指定开始日期和结束日期 -->
  289 + <view class="pdl30 shrink0">有效期:{{filters.showStartAndEndDate(item, data.validDays)}}</view>
288 290 </view>
289   - <view class="tb_item tb-l">
290   - <view class="item_left">
291   - <text>商品条码</text>
292   - </view>
293   - <view class="item_right">
294   - <text>{{data.sku}}</text>
295   - </view>
296   - </view>
297   - <view class="tb_item tb-l" wx:if="{{cat_name && is_show_pl}}">
298   - <view class="item_left">
299   - <text>品类</text>
  291 + </view>
  292 + </block>
  293 +
  294 + <block wx:if="{{enableMeiye}}">
  295 + <block wx:if="{{taoheList && taoheList.length > 0}}">
  296 + <view class="taohe fs28" wx:for="{{taoheList}}">
  297 + <view class="flex ai_c jc_sb" style="height: 88rpx;">
  298 + <view class="ellipsis-2 f1">{{item.goods_name}} ({{item.goods_sn}}) ({{item.frequency}}个)</view>
  299 + <view class="pdl30 t-r">
  300 + <view class="rmb fs36 bold c-red">{{item.vipprice}}</view>
  301 + <view class="fs22 c-9 del">零售价:¥{{item.show_price}}</view>
  302 + </view>
300 303 </view>
301   - <view class="item_right">
302   - <text>{{cat_name}}</text>
  304 + <view class="flex ai_c jc_sb fs24 c-6 pdt10">
  305 + <view class="ellipsis-1">备注:{{filters.show_default(item.remark, '无')}}</view>
  306 + <view class="pdl30 shrink0">有效期:{{filters.showStartAndEndDate(item,data.validDays)}}</view>
303 307 </view>
304 308 </view>
305   - <view class="tb_item tb-l" wx:if="{{brand_name && is_show_pp}}">
306   - <view class="item_left">
307   - <text>品牌</text>
308   - </view>
309   - <view class="item_right">
310   - <text>{{brand_name}}</text>
311   - </view>
  309 + </block>
  310 + </block>
  311 +
  312 + <!-- <view class="table_s" wx:if="{{service_list}}">
  313 +<view class="tb_item tb-l">
  314 +<view class="item_left f1">
  315 + <text>项目名称</text>
  316 +</view>
  317 + <view class="item_left f1">
  318 + <text>耗时(分)</text>
312 319 </view>
313   - <view class="tb_item tb-l" wx:if="{{nation_name && is_show_gb}}">
314   - <view class="item_left">
315   - <text>国别</text>
316   - </view>
317   - <view class="item_right">
318   - <text>{{nation_name}}</text>
319   - </view>
  320 + <view class="item_left f1">
  321 + <text>次数</text>
320 322 </view>
321   - <view class="tb_item tb-l">
322   - <view class="item_left">
323   - <text>规格</text>
324   - </view>
325   - <view class="item_right">
326   - <text>{{filters.show_gui_ge(data.goods_spec,data.goods_color)}}</text>
327   - </view>
  323 +</view>
  324 +<view class="tb_item tb-l" wx:for="{{service_list}}">
  325 +<view class="item_right f1">
  326 + <text>{{item.projectName}}</text>
  327 +</view>
  328 + <view class="item_right f1">
  329 + <text>{{item.timeConsuming}}</text>
328 330 </view>
329   - <view class="tb_item tb-l">
330   - <view class="item_left">
331   - <text>上架时间</text>
332   - </view>
333   - <view class="item_right">
334   - <text>{{data.on_time}}</text>
335   - </view>
  331 + <view class="item_right f1">
  332 + <text>{{item.frequency}}</text>
336 333 </view>
337   - </view>
338   - </view>
339   - <!-- 详情图片 -->
  334 +</view>
  335 +</view> -->
  336 +
340 337 <view class="wxParse">
341 338 <template is="wxParse" data="{{wxParseData:content.nodes}}"></template>
342 339 </view>
343   - <!-- 详情广告 -->
344   - <view class="wxParse">
345   - <template is="wxParse" data="{{wxParseData:goodInfo_ad.nodes}}"></template>
346   - </view>
  340 +
347 341 </view>
  342 +
348 343 <!-- 推荐商品 -->
349 344 <view class="flex-center rel xc-linellae-frame">
350 345 <view class="xc-linellae"></view>
... ... @@ -362,83 +357,76 @@
362 357 </view>
363 358 </view>
364 359 </view>
365   - <!-- ----------商品详情图片页面-------------- -->
  360 +
366 361 <view class="goods-norms" hidden="{{activeCategoryId==1?false:true}}">
367   - <view class="table_s">
368   - <view class="tb_item tb-l">
369   - <view class="item_left">
370   - <text>商品名称</text>
371   - </view>
372   - <view class="item_right">
373   - <text>{{data.goods_name}}</text>
374   - </view>
  362 + <view class="pd20">
  363 + <!-- <view class="table_s" wx:if="{{service_list}}">
  364 + <view class="tb_item tb-l">
  365 + <view class="item_left f1">
  366 + <text>项目名称</text>
375 367 </view>
376   - <view class="tb_item tb-l">
377   - <view class="item_left">
378   - <text>商品编号</text>
379   - </view>
380   - <view class="item_right">
381   - <text>{{data.goods_sn}}</text>
382   - </view>
383   - </view>
384   - <view class="tb_item tb-l">
385   - <view class="item_left">
386   - <text>商品条码</text>
387   - </view>
388   - <view class="item_right">
389   - <text>{{data.sku}}</text>
390   - </view>
391   - </view>
392   - <view class="tb_item tb-l" wx:if="{{cat_name && is_show_pl}}">
393   - <view class="item_left">
394   - <text>品类</text>
395   - </view>
396   - <view class="item_right">
397   - <text>{{cat_name}}</text>
398   - </view>
399   - </view>
400   - <view class="tb_item tb-l" wx:if="{{brand_name && is_show_pp}}">
401   - <view class="item_left">
402   - <text>品牌</text>
403   - </view>
404   - <view class="item_right">
405   - <text>{{brand_name}}</text>
406   - </view>
407   - </view>
408   - <view class="tb_item tb-l" wx:if="{{nation_name && is_show_gb}}">
409   - <view class="item_left">
410   - <text>国别</text>
411   - </view>
412   - <view class="item_right">
413   - <text>{{nation_name}}</text>
414   - </view>
415   - </view>
416   - <view class="tb_item tb-l">
417   - <view class="item_left">
418   - <text>规格</text>
419   - </view>
420   - <view class="item_right">
421   - <text>{{data.goods_spec==""?"规格1":data.goods_spec}}</text>
422   - </view>
  368 + <view class="item_left f1">
  369 + <text>耗时(分)</text>
  370 + </view>
  371 + <view class="item_left f1">
  372 + <text>次数</text>
  373 + </view>
  374 + </view>
  375 + <view class="tb_item tb-l" wx:for="{{service_list}}">
  376 + <view class="item_right f1">
  377 + <text>{{item.projectName}}</text>
423 378 </view>
424   - <view class="tb_item tb-l">
425   - <view class="item_left">
426   - <text>上架时间</text>
427   - </view>
428   - <view class="item_right">
429   - <text>{{data.on_time}}</text>
  379 + <view class="item_right f1">
  380 + <text>{{item.timeConsuming}}</text>
  381 + </view>
  382 + <view class="item_right f1">
  383 + <text>{{item.frequency}}</text>
  384 + </view>
  385 + </view>
  386 + </view> -->
  387 +
  388 + <block wx:if="{{listServiceItem && listServiceItem.length > 0}}">
  389 + <view class="card fs28" wx:for="{{listServiceItem}}">
  390 + <view class="flex ai_c jc_sb" style="height: 88rpx;">
  391 + <view class="ellipsis-2 f1">{{item.projectName}}({{item.frequency}}次)</view>
  392 + <view class="pdl30 t-r">
  393 + <view class="rmb fs36 bold c-red">{{item.vipprice}}</view>
  394 + <view class="fs22 c-9 del" wx:if="{{item.showPrice}}">零售价:¥{{item.showPrice}}</view>
  395 + </view>
  396 + </view>
  397 + <view class="flex ai_c jc_sb fs24 c-6">
  398 + <view class="ellipsis-1">备注:{{filters.show_default(item.remark, '无')}}</view>
  399 + <!-- 指定开始日期和结束日期 -->
  400 + <view class="pdl30 shrink0">有效期:{{filters.showStartAndEndDate(item, data.validDays)}}</view>
  401 + </view>
430 402 </view>
  403 + </block>
  404 +
  405 + <block wx:if="{{enableMeiye}}">
  406 + <block wx:if="{{taoheList && taoheList.length > 0}}">
  407 + <view class="taohe fs28" wx:for="{{taoheList}}">
  408 + <view class="flex ai_c jc_sb" style="height: 88rpx;">
  409 + <view class="ellipsis-2 f1">{{item.goods_name}} ({{item.goods_sn}}) ({{item.frequency}}个)</view>
  410 + <view class="pdl30 t-r">
  411 + <view class="rmb fs36 bold c-red">{{item.vipprice}}</view>
  412 + <view class="fs22 c-9 del">零售价:¥{{item.show_price}}</view>
  413 + </view>
  414 + </view>
  415 + <view class="flex ai_c jc_sb fs24 c-6 pdt10">
  416 + <view class="ellipsis-1">备注:{{filters.show_default(item.remark, '无')}}</view>
  417 + <view class="pdl30 shrink0">有效期:{{filters.showStartAndEndDate(item,data.validDays)}}</view>
  418 + </view>
  419 + </view>
  420 + </block>
  421 + </block>
  422 +
  423 + <view class="wxParse">
  424 + <template is="wxParse" data="{{wxParseData:content.nodes}}"></template>
431 425 </view>
  426 +
432 427 </view>
433   - <view class="wxParse">
434   - <template is="wxParse" data="{{wxParseData:content.nodes}}"></template>
435   - </view>
436   - <!-- 详情广告 -->
437   - <view class="wxParse">
438   - <template is="wxParse" data="{{wxParseData:goodInfo_ad.nodes}}"></template>
439   - </view>
440 428 </view>
441   - <!-- -------------评价页面------------ -->
  429 +
442 430 <view class="goods-comment" hidden="{{activeCategoryId==2?false:true}}">
443 431 <view class="topframe">
444 432 <view class="topframe-top">
... ... @@ -457,7 +445,7 @@
457 445 </view>
458 446 </view>
459 447 </view>
460   - <block wx:for="{{comments}}" wx:for-index="cIdx" wx:key="cIdx">
  448 + <block wx:for="{{comments}}" wx:for-index="cIdx" wx:key="{{cIdx}}">
461 449 <view style='border-bottom:4rpx solid #eee;'>
462 450 <view class="middle">
463 451 <view class="middle-img-frame">
... ... @@ -466,11 +454,11 @@
466 454 <view class="middle-user">
467 455 {{item.username==''||item.is_anonymous==1 ?'匿名用户':item.username}}
468 456 </view>
469   - <image class="star" src="{{iurl}}/miniapp/images/star-red.png" wx:for="{{item.sum_rank}}" wx:key="index"></image>
  457 + <image class="star" src="{{iurl}}/miniapp/images/star-red.png" wx:for="{{item.sum_rank}}" wx:key="{{index}}"></image>
470 458 </view>
471 459 </view>
472 460 <view class="xc-pirces">
473   - <view class="middle-font {{item.seeMore==true?'ellipsis-3':''}}">
  461 + <view class="middle-font {{item.seeMore==true?'ellipsis-3':''}}" style="word-break: break-all;">
474 462 {{item.content?item.content:'此用户没有填写评价。'}}
475 463 </view>
476 464 </view>
... ... @@ -482,12 +470,12 @@
482 470 </view>
483 471 <view class="img-ul">
484 472 <block wx:if="{{item.source_type==0}}">
485   - <view class="img-li" wx:for="{{item.img}}" wx:key="index">
  473 + <view class="img-li" wx:for="{{item.img}}" wx:key="{{index}}">
486 474 <image bindtap="previewCommentImgs" class="wh100" data-cidx="{{cIdx}}" data-img="{{iurl}}{{item}}" data-id="{{index}}" src="{{iurl}}{{item}}"></image>
487 475 </view>
488 476 </block>
489 477 <block wx:if="{{item.source_type==1}}">
490   - <view class="img-li" wx:for="{{item.weapp_img}}" wx:if="{{aitem.length>10}}" wx:key="index" wx:for-item="aitem">
  478 + <view class="img-li" wx:for="{{item.weapp_img}}" wx:if="{{aitem.length>10}}" wx:key="{{index}}" wx:for-item="aitem">
491 479 <image bindtap="previewCommentImgs_w" class="wh100" data-cidx="{{cIdx}}" data-img="{{aitem}}" data-id="{{index}}" src="{{aitem}}"></image>
492 480 </view>
493 481 </block>
... ... @@ -506,7 +494,7 @@
506 494 <view class="reply rel" wx:if="{{item.replay_list}}">
507 495 <view class="line_bulge"></view>
508 496 <view class="shop-reply">店家回复:</view>
509   - <view class="shop-font" wx:for="{{item.replay_list}}" wx:for-item="r_item" wx:key="index">
  497 + <view class="shop-font" wx:for="{{item.replay_list}}" wx:for-item="r_item" wx:key="{{index}}">
510 498 {{r_item.content}}
511 499 </view>
512 500 </view>
... ... @@ -519,6 +507,7 @@
519 507 <text class="no_pj_list">已经加载到底部</text>
520 508 </block>
521 509 </view>
  510 +
522 511 </view>
523 512 </view>
524 513 <!-- -滚动到顶部-- -->
... ... @@ -600,7 +589,7 @@
600 589 <view class="pding">
601 590 <icon bindtap="closeSpecModal" class="modal-close" color="black" size="22" type="cancel"></icon>
602 591 <view class="spec-goods">
603   - <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{sele_g.original_img}}" binderror="pop_err_img" data-errorimg="sele_g.original_img"></image>
  592 + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{iurl+sele_g.image_url}}" binderror="pop_err_img" data-errorimg="sele_g.image_url"></image>
604 593 <view class="spec-goods-info">
605 594 <view class="spec-goods-name ellipsis-2">{{sele_g.goods_name}}</view>
606 595 <view class="flex ai_end xc-val-money">
... ... @@ -831,6 +820,7 @@
831 820 </view>
832 821 </view>
833 822 </view>
  823 +
834 824 <!-- 选择门店的弹框,1.1版最新的 -->
835 825 <block wx:if="{{store==1}}">
836 826 <view class="mongolia-layer" bindtap="close_popup"></view>
... ...
packageC/pages/presell/cardInfo/goodsInfo.wxss
... ... @@ -3019,3 +3019,48 @@ button.custom-service::after{
3019 3019 .c-red22{
3020 3020 color: #d60021
3021 3021 }
  3022 +
  3023 +
  3024 +
  3025 +.card,
  3026 +.taohe {
  3027 + position: relative;
  3028 + padding: 20rpx;
  3029 + margin-bottom: 20rpx;
  3030 + border-radius: 8rpx;
  3031 + background: #ffdcdc;
  3032 + overflow: hidden;
  3033 + /* background: #ffdcdc url(https://mshopimg.yolipai.net/miniapp/images/fwk/crown_bg.png) no-repeat left top;
  3034 + background-position: 10rpx 10rpx;
  3035 + background-size: 206rpx 136rpx; */
  3036 +}
  3037 +
  3038 +.card::before {
  3039 + position: absolute;
  3040 + font-family: iconfont;
  3041 + content: '\e62a';
  3042 + color: rgba(255,0,0,.1);
  3043 + font-size: 260rpx;
  3044 + /* transform: rotateZ(45deg); */
  3045 + top: -110rpx;
  3046 + left: -70rpx;
  3047 +}
  3048 +
  3049 +.taohe::before {
  3050 + position: absolute;
  3051 + font-family: iconfont;
  3052 + content: '\e64e';
  3053 + color: rgba(255,0,0,.1);
  3054 + font-size: 260rpx;
  3055 + top: -20rpx;
  3056 + left: -30rpx;
  3057 +}
  3058 +
  3059 +.rmb::before {
  3060 + content: '¥';
  3061 + font-size: 24rpx;
  3062 +}
  3063 +
  3064 +.c-red {
  3065 + color: #f23030;
  3066 +}
3022 3067 \ No newline at end of file
... ...
packageC/pages/presell/cart/cart2.js
... ... @@ -467,11 +467,58 @@ Page({
467 467 },
468 468  
469 469 //-----获取立即购买的商品信息,入口----
470   - get_buy_goods: function (e) {
  470 + get_buy_goods:async function (e) {
471 471 var th = this;
472 472 th.data.gg = to.get_b_now();
  473 +
  474 + //定义变量
  475 + var gg = th.data.gg, act = null, prelist = null;
  476 + var url = "/api/weshop/marketing/marketingPresellForm/get/" + os.stoid + "/" + gg.prom_id;
  477 + await getApp().request.promiseGet(url, {}).then(res => {
  478 + if (res.data.code == 0) {
  479 + act = res.data.data;
  480 + }
  481 + })
  482 + if (!act) {
  483 + wx.showToast({ title: "未找到活动", icon: 'none', duration: 3000 });
  484 + return false;
  485 + }
  486 + if (act.is_end == 1) {
  487 + wx.showToast({ title: '活动已经结束', icon: 'none', duration: 3000 });
  488 + return false;
  489 + }
  490 + if (ut.gettimestamp() > act.end_time) {
  491 + wx.showToast({ title: "活动定金支付时间已过期", icon: 'none', duration: 3000 });
  492 + return false;
  493 + }
  494 +
  495 + var url = "/api/weshop/marketing/marketingPresellList/get/" + os.stoid + "/" + gg.presell_list_id;
  496 + await getApp().request.promiseGet(url, {}).then(res => {
  497 + if (res.data.code == 0) {
  498 + prelist = res.data.data;
  499 + }
  500 + })
  501 + if (!prelist) {
  502 + wx.showToast({ title: "未找到商品", icon: 'none', duration: 3000 });
  503 + return false;
  504 + }
  505 +
  506 + //如果是服务卡是时候
  507 + if(act.goods_type==1){
  508 + th.get_card_detail(act, prelist,gg);
  509 + }
  510 + //如果是商品的时候
  511 + else{
  512 + th.get_goods_detail(act, prelist,gg);
  513 + }
  514 + },
  515 +
  516 + //-- 获取到服务卡项的详情 --
  517 + get_card_detail(act, prelist,gg){
  518 + var th = this;
473 519 //--------如果goods_id一样,就是要立即购买-----
474   - getApp().request.get("/api/weshop/goods/get/" + oo.stoid + "/" + th.data.gg.goods_id, {
  520 + var cd_url="/api/weshop/serviceCard/get/" + oo.stoid + "/" + th.data.gg.goods_id
  521 + getApp().request.get(cd_url, {
475 522 success: async function (t) {
476 523 var gd = t.data.data;
477 524 if (!gd) return false;
... ... @@ -486,9 +533,51 @@ Page({
486 533 th.setData({show_same_city:1})
487 534 }
488 535 }
489   -
490 536 })
  537 + }
  538 +
  539 + t.data.data.original_img = oo.imghost + t.data.data.imgUrl;
  540 + t.data.data['buynum'] = th.data.gg.goods_num;
  541 + t.data.data.prom_id=th.data.gg.prom_id;
  542 + t.data.data.prom_type=8;
  543 +
  544 +
  545 + //这个位置要拿活动的预售价
  546 + t.data.data.shop_price = prelist.presell_money;
  547 + th.setData({
  548 + bn_goods: t.data.data,
  549 + bn_pickname: gg.pick_name,
  550 + bn_pick: gg.pick_id,
  551 + act: act
  552 + });
  553 +
  554 + //计算价格
  555 + th.calculatePrice2();
  556 +
  557 + },
  558 + });
  559 + },
  560 +
  561 + //-- 获取到服务卡项的详情 --
  562 + get_goods_detail(act, prelist,gg){
  563 + var th = this;
  564 + //--------如果goods_id一样,就是要立即购买-----
  565 + getApp().request.get("/api/weshop/goods/get/" + oo.stoid + "/" + th.data.gg.goods_id, {
  566 + success: async function (t) {
  567 + var gd = t.data.data;
  568 + if (!gd) return false;
  569 +
  570 + //-- 如果商品有同城配送的参数的时候,一件代发商品不能显示同城配送按钮 --
  571 + if(gd.is_same_city && th.data.is_same_city && gd.whsle_id<=0){
491 572  
  573 + await getApp().request.promiseGet("/api/weshop/pickup/get/"+os.stoid+"/"+th.data.gg.pick_id, {}).then(res=>{
  574 + if(res.data.code==0){
  575 + var pk=res.data.data;
  576 + if(pk && pk.is_same_city){
  577 + th.setData({show_same_city:1})
  578 + }
  579 + }
  580 + })
492 581 }
493 582  
494 583 t.data.data.original_img = oo.imghost + t.data.data.original_img;
... ... @@ -578,38 +667,6 @@ Page({
578 667 }
579 668 }
580 669  
581   - //定义变量
582   - var gg = th.data.gg, act = null, prelist = null;
583   - var url = "/api/weshop/marketing/marketingPresellForm/get/" + os.stoid + "/" + gg.prom_id;
584   - await getApp().request.promiseGet(url, {}).then(res => {
585   - if (res.data.code == 0) {
586   - act = res.data.data;
587   - }
588   - })
589   - if (!act) {
590   - wx.showToast({ title: "未找到活动", icon: 'none', duration: 3000 });
591   - return false;
592   - }
593   - if (act.is_end == 1) {
594   - wx.showToast({ title: '活动已经结束', icon: 'none', duration: 3000 });
595   - return false;
596   - }
597   - if (ut.gettimestamp() > act.end_time) {
598   - wx.showToast({ title: "活动定金支付时间已过期", icon: 'none', duration: 3000 });
599   - return false;
600   - }
601   -
602   - var url = "/api/weshop/marketing/marketingPresellList/get/" + os.stoid + "/" + gg.presell_list_id;
603   - await getApp().request.promiseGet(url, {}).then(res => {
604   - if (res.data.code == 0) {
605   - prelist = res.data.data;
606   - }
607   - })
608   - if (!prelist) {
609   - wx.showToast({ title: "未找到商品", icon: 'none', duration: 3000 });
610   - return false;
611   - }
612   -
613 670  
614 671 //如果有开启佣金抵扣,同时会员是分销商的时候
615 672 if(getApp().globalData.userInfo.is_distribut
... ... @@ -652,16 +709,13 @@ Page({
652 709 th.data.check_quan_ware_list = t.data.data.erpwareid + "";
653 710 }
654 711  
655   -
656 712 //计算价格
657 713 th.calculatePrice2();
658 714 //获取优惠券,如果有券的钱,就调用
659 715 if (th.data.ckeck_quan_price > 0) th.get_buy_now_quan();
660 716  
661   -
662 717 },
663 718 });
664   -
665 719 },
666 720  
667 721 //---------------检查是否有收货地址-------------------
... ... @@ -820,8 +874,8 @@ Page({
820 874 })
821 875 }
822 876  
823   - //-----------当地址不为空,且是物流时,计算物流费用,并同时商品不是优惠活动的包邮----------
824   - if (th.data.user_addr != null && th.data.bn_exp_type == 0 && good.is_past != 1) {
  877 + //-----------当地址不为空,且是物流时,计算物流费用,并同时商品不是优惠活动的包邮,同时商品购买时候,服务卡项购买不计算运费----------
  878 + if (th.data.user_addr != null && th.data.bn_exp_type == 0 && good.is_past != 1 && act.goods_type==0) {
825 879 //看是不是有调用过包邮券
826 880 if (!th.data.isget_by_quan[th.data.bn_pick] && good.is_xz_yh != 1) {
827 881 var condition = allpice - cut_price - quan_price;
... ...
packageC/pages/presell/cart/cart2.wxml
... ... @@ -6,7 +6,7 @@
6 6 <view class="container">
7 7  
8 8 <!-- 立即购买的时候 -->
9   - <view class="tab-container" wx:if="{{show_submit}}">
  9 + <view class="tab-container" wx:if="{{show_submit && act.goods_type==0}}">
10 10 <view class="tab-wrapper">
11 11 <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}"
12 12 data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >门店自提</view>
... ... @@ -22,7 +22,7 @@
22 22 </view>
23 23  
24 24 <!--要进行判断地址是否显示---->
25   - <view bindtap="enterAddressPage" class="user-mes mgt20" hidden='{{bn_exp_type==1 && is_b_now==1}}'>
  25 + <view bindtap="enterAddressPage" class="user-mes mgt20" hidden='{{bn_exp_type==1 && is_b_now==1 && act.goods_type==0}}'>
26 26 <!---默认地址显示------>
27 27 <block wx:if="{{user_addr!=null}}">
28 28 <view class="user-contact">
... ...