Commit cc5e428cc7a1f73c93961e67c77e1e9efc69c138

Authored by yvan.ni
1 parent f9fdd19b

1. 提交订单的页面 显示等级卡时, 要*购卡数量

2.  积分购再购买的时候,要处理is_integral_normal=1
pages/cart/cart2/cart2.js
@@ -364,8 +364,7 @@ Page({ @@ -364,8 +364,7 @@ Page({
364 } 364 }
365 365
366 //-- 如果是等级会员注册返回 -- 366 //-- 如果是等级会员注册返回 --
367 - if(is_card_back){  
368 - 367 + if(is_card_back){
369 // 拼团,搭配购不计算,赠品也不计算 368 // 拼团,搭配购不计算,赠品也不计算
370 if( item['prom_type']!=5 && item['prom_type']!=6 && !item.is_gift && !item['is_collocation'] && item.goods_price>item[th.data.card_name] ){ 369 if( item['prom_type']!=5 && item['prom_type']!=6 && !item.is_gift && !item['is_collocation'] && item.goods_price>item[th.data.card_name] ){
371 item.goods_price=item[th.data.card_name]; 370 item.goods_price=item[th.data.card_name];
@@ -376,7 +375,7 @@ Page({ @@ -376,7 +375,7 @@ Page({
376 if(item[th.data.card_name]>0 && item['prom_type']!=5 && item['prom_type']!=6 && !th.data.userinfo.card_field 375 if(item[th.data.card_name]>0 && item['prom_type']!=5 && item['prom_type']!=6 && !th.data.userinfo.card_field
377 && !item.is_gift && !item['is_collocation'] && item.goods_price>item[th.data.card_name] ){ 376 && !item.is_gift && !item['is_collocation'] && item.goods_price>item[th.data.card_name] ){
378 item.cut_price= item.goods_price-item[th.data.card_name]; 377 item.cut_price= item.goods_price-item[th.data.card_name];
379 - carr[i].cut_price=item.goods_price-item[th.data.card_name]; 378 + carr[i].cut_price=(item.goods_price-item[th.data.card_name])*item.goods_num;
380 } 379 }
381 380
382 } 381 }
@@ -503,7 +502,7 @@ Page({ @@ -503,7 +502,7 @@ Page({
503 //--- 商家等级卡开通的情况下, 会员不是等级会员的情况, 商品有设置等级卡价格,同时等级卡价格小于商品的价格 502 //--- 商家等级卡开通的情况下, 会员不是等级会员的情况, 商品有设置等级卡价格,同时等级卡价格小于商品的价格
504 //-- 搭配购的商品也可以单独购买,所以此时搭配购的商品要进行计算优惠 -- 503 //-- 搭配购的商品也可以单独购买,所以此时搭配购的商品要进行计算优惠 --
505 if(!gg.collocation_goods && gd['prom_type']!=6 && th.data.card_name && gd[th.data.card_name]>0 && gg.goods_price>gd[th.data.card_name] && !th.data.userinfo.card_field){ 504 if(!gg.collocation_goods && gd['prom_type']!=6 && th.data.card_name && gd[th.data.card_name]>0 && gg.goods_price>gd[th.data.card_name] && !th.data.userinfo.card_field){
506 - var cut_p= gg.goods_price-gd[th.data.card_name]; 505 + var cut_p= (gg.goods_price-gd[th.data.card_name])*gg.goods_num;
507 th.setData({card_cut_price:cut_p}); 506 th.setData({card_cut_price:cut_p});
508 } 507 }
509 } 508 }
@@ -526,7 +525,7 @@ Page({ @@ -526,7 +525,7 @@ Page({
526 525
527 t.data.data.prom_id = 0; 526 t.data.data.prom_id = 0;
528 t.data.data.prom_type = 0; 527 t.data.data.prom_type = 0;
529 - 528 +
530 //如果立即购买那边过来,就要读取接口,查看活动的优惠内容 529 //如果立即购买那边过来,就要读取接口,查看活动的优惠内容
531 if(gg.prom_type==3){ 530 if(gg.prom_type==3){
532 t.data.data.prom_id = gg.prom_id ; 531 t.data.data.prom_id = gg.prom_id ;
@@ -1617,7 +1616,10 @@ Page({ @@ -1617,7 +1616,10 @@ Page({
1617 if(gg.room_id && gg.room_id>0){ 1616 if(gg.room_id && gg.room_id>0){
1618 goods.room_id=gg.room_id; 1617 goods.room_id=gg.room_id;
1619 } 1618 }
1620 - 1619 +
  1620 + //积分购,先要带is_integral_normal=1
  1621 + if(gg.is_integral_normal) goods.is_integral_normal=1;
  1622 +
1621 //如果不立即购买或者秒杀,如果是线下库存购买的时候 1623 //如果不立即购买或者秒杀,如果是线下库存购买的时候
1622 if(goods.prom_type!=1 && goods.prom_type!=6 && th.data.sales_rules==2){ 1624 if(goods.prom_type!=1 && goods.prom_type!=6 && th.data.sales_rules==2){
1623 var isok=1; 1625 var isok=1;
pages/goods/goodsInfo/goodsInfo.js
@@ -1004,7 +1004,8 @@ Page({ @@ -1004,7 +1004,8 @@ Page({
1004 goods_name: o.goods_name, 1004 goods_name: o.goods_name,
1005 goods_sn: o.goods_sn, 1005 goods_sn: o.goods_sn,
1006 sku: o.sku, 1006 sku: o.sku,
1007 - }; 1007 + };
  1008 + if(th.data.is_integral_normal) newd.is_integral_normal=1;
1008 1009
1009 //---是不是从收藏夹出来的--- 1010 //---是不是从收藏夹出来的---
1010 if(th.data.c_guide_id){ 1011 if(th.data.c_guide_id){
@@ -2242,6 +2243,9 @@ Page({ @@ -2242,6 +2243,9 @@ Page({
2242 }); 2243 });
2243 return false; 2244 return false;
2244 } 2245 }
  2246 + if(prom_type==4){
  2247 + th.setData({is_integral_normal:1});
  2248 + }
2245 //if (prom_type != 3 && prom_type!=0){ 2249 //if (prom_type != 3 && prom_type!=0){
2246 //---判断秒杀---- 2250 //---判断秒杀----
2247 if (prom_type == 1) { 2251 if (prom_type == 1) {