Commit 9b4163f9469e6bfb4499050c9028fc5278e0ba35

Authored by 后端研发-苏泰源
1 parent 42b27bb8

服务卡分享修改

packageA/pages/goodsInfo/goodsInfo.js
@@ -529,11 +529,10 @@ Page({ @@ -529,11 +529,10 @@ Page({
529 this.check_prom(goods_id, prom_type, prom_id); 529 this.check_prom(goods_id, prom_type, prom_id);
530 530
531 } else { // 从非秒杀入口进入,地址不带prom_type、prom_id参数 531 } else { // 从非秒杀入口进入,地址不带prom_type、prom_id参数
532 - getApp().request.promiseGet('/api/weshop/activitylist/getGoodActInfo', { 532 + getApp().request.promiseGet('/api/weshop/activitylist/listGoodActInfo2', {
533 data: { 533 data: {
534 store_id: os.stoid, 534 store_id: os.stoid,
535 - goodsidlist: goods_id,  
536 - is_detail: 1, 535 + goods_id: goods_id,
537 goods_type: 1, 536 goods_type: 1,
538 user_id: oo.user_id, 537 user_id: oo.user_id,
539 } 538 }
@@ -1370,6 +1369,8 @@ Page({ @@ -1370,6 +1369,8 @@ Page({
1370 title=th.data.prom_act.share_title; 1369 title=th.data.prom_act.share_title;
1371 img=th.data.iurl+th.data.prom_act.share_imgurl; 1370 img=th.data.iurl+th.data.prom_act.share_imgurl;
1372 } 1371 }
  1372 +
  1373 +
1373 1374
1374 1375
1375 var url="/packageA/pages/goodsInfo/goodsInfo?goods_id=" + th.data.gid; 1376 var url="/packageA/pages/goodsInfo/goodsInfo?goods_id=" + th.data.gid;
@@ -1385,30 +1386,24 @@ Page({ @@ -1385,30 +1386,24 @@ Page({
1385 url+="&room_id="+getApp().globalData.room_id+"&room_user_share=1"; 1386 url+="&room_id="+getApp().globalData.room_id+"&room_user_share=1";
1386 } 1387 }
1387 1388
  1389 +
1388 var ob={ 1390 var ob={
1389 title: price + "元 " +title, 1391 title: price + "元 " +title,
1390 path:url, 1392 path:url,
1391 imageUrl: img, 1393 imageUrl: img,
1392 - };  
1393 - // if(th.data.prom_type==6){  
1394 - // title+='\n'+th.data.prom_act.share_remark;  
1395 - // ob.title=title;  
1396 - // ob.desc=th.data.prom_act.share_remark;  
1397 - // }  
1398 -  
1399 - //如果是积分购的时候  
1400 - // if(th.data.prom_type==4){  
1401 - // var name = th.data.prom_act.name;  
1402 - // //-- 积分购的 --  
1403 - // var pri0 = th.data.prom_act.addmoney;  
1404 - // var integral=th.data.prom_act.integral;  
1405 - // var text="";  
1406 - // if(integral){text=integral+"积分"; }  
1407 - // if(pri0 && integral){ text+="+";}  
1408 - // if(pri0){ text+="¥"+pri0;} 1394 + };
1409 1395
1410 - // ob.title= text+" "+name;  
1411 - // } 1396 + // 如果服务卡参加秒杀活动,且后台设置了分享标题和分享图片
  1397 + if(th.data.prom_type == 1) {
  1398 + if(th.data.sele_g && th.data.sele_g.share_title) {
  1399 + title = th.data.sele_g.share_title;
  1400 + ob.title = title;
  1401 + };
  1402 + if(th.data.sele_g && th.data.sele_g.share_imgurl) {
  1403 + img = th.data.iurl + th.data.sele_g.share_imgurl;
  1404 + ob.imageUrl = img;
  1405 + };
  1406 + };
1412 1407
1413 return ob; 1408 return ob;
1414 1409
packageA/pages/goodsInfo/goodsInfo.wxml
@@ -756,12 +756,12 @@ @@ -756,12 +756,12 @@
756 </block> 756 </block>
757 757
758 <!-- 普通商品 --> 758 <!-- 普通商品 -->
759 - <!-- <block wx:else> 759 + <block wx:else>
760 <view wx:if="{{openSpecModal_ind==2}}" bindtap="addCart" data-openSpecModal_ind="{{openSpecModal_ind}}" class="spec-cart-btn spec-buy {{!sto_sele_name?'gray':''}}" 760 <view wx:if="{{openSpecModal_ind==2}}" bindtap="addCart" data-openSpecModal_ind="{{openSpecModal_ind}}" class="spec-cart-btn spec-buy {{!sto_sele_name?'gray':''}}"
761 data-action="buy"> 761 data-action="buy">
762 {{sele_g.offline_price?"券后购买":"立即购买"}} 762 {{sele_g.offline_price?"券后购买":"立即购买"}}
763 </view> 763 </view>
764 - </block> --> 764 + </block>
765 765
766 </block> 766 </block>
767 </block> 767 </block>