Commit 6adc2f669ebb41830c33a0626e0a1b6d48348d12
1 parent
071c4f8c
1、服务卡项预售分享的优化
2、服务卡项列表点击跳转的优化
Showing
2 changed files
with
22 additions
and
41 deletions
packageC/pages/presell/cardInfo/goodsInfo.js
| ... | ... | @@ -1328,21 +1328,20 @@ Page({ |
| 1328 | 1328 | |
| 1329 | 1329 | var th = this; |
| 1330 | 1330 | var price = th.data.data.shop_price; |
| 1331 | - if (th.data.prom_act) { | |
| 1332 | - price = th.data.prom_act.price; | |
| 1333 | 1331 | |
| 1334 | - } | |
| 1335 | - var title= th.data.data.goods_name; | |
| 1336 | - var img=th.data.iurl+th.data.data.image_url; | |
| 1337 | - if(th.data.prom_type==6){ | |
| 1338 | - title=th.data.prom_act.share_title; | |
| 1339 | - img=th.data.iurl+th.data.prom_act.share_imgurl; | |
| 1340 | - } | |
| 1341 | - | |
| 1342 | - | |
| 1332 | + var title= th.data.data.service_name; | |
| 1333 | + var img=th.data.iurl+th.data.data.img_url; | |
| 1334 | + | |
| 1335 | + | |
| 1343 | 1336 | |
| 1344 | - | |
| 1345 | 1337 | var url="/packageA/pages/goodsInfo/goodsInfo?goods_id=" + th.data.gid; |
| 1338 | + if(th.data.prom_act){ | |
| 1339 | + title=th.data.prom_act.share_title; | |
| 1340 | + img=th.data.iurl+th.data.prom_act.share_img; | |
| 1341 | + url="/packageC/pages/presell/cardInfo/goodsInfo?goods_id=" + th.data.gid+"&pre_id="+th.data.presellList.id; | |
| 1342 | + price= th.data.presellList.presell_price; | |
| 1343 | + } | |
| 1344 | + | |
| 1346 | 1345 | if(getApp().globalData.user_id) { |
| 1347 | 1346 | url+="&first_leader="+getApp().globalData.user_id; |
| 1348 | 1347 | } |
| ... | ... | @@ -1354,25 +1353,12 @@ Page({ |
| 1354 | 1353 | ){ |
| 1355 | 1354 | url+="&room_id="+getApp().globalData.room_id+"&room_user_share=1"; |
| 1356 | 1355 | } |
| 1357 | - | |
| 1358 | - | |
| 1356 | + | |
| 1359 | 1357 | var ob={ |
| 1360 | 1358 | title: price + "元 " +title, |
| 1361 | 1359 | path:url, |
| 1362 | 1360 | imageUrl: img, |
| 1363 | 1361 | }; |
| 1364 | - | |
| 1365 | - // 如果服务卡参加秒杀活动,且后台设置了分享标题和分享图片 | |
| 1366 | - if(th.data.prom_type == 1) { | |
| 1367 | - if(th.data.sele_g && th.data.sele_g.share_title) { | |
| 1368 | - title = th.data.sele_g.share_title; | |
| 1369 | - ob.title = title; | |
| 1370 | - }; | |
| 1371 | - if(th.data.sele_g && th.data.sele_g.share_imgurl) { | |
| 1372 | - img = th.data.iurl + th.data.sele_g.share_imgurl; | |
| 1373 | - ob.imageUrl = img; | |
| 1374 | - } | |
| 1375 | - } | |
| 1376 | 1362 | |
| 1377 | 1363 | return ob; |
| 1378 | 1364 | |
| ... | ... | @@ -2965,20 +2951,11 @@ Page({ |
| 2965 | 2951 | getApp().globalData.no_clear=1 |
| 2966 | 2952 | |
| 2967 | 2953 | var th = this; |
| 2968 | - var price = th.data.data.shop_price; | |
| 2969 | - if (th.data.prom_act) { | |
| 2970 | - price = th.data.prom_act.price; | |
| 2954 | + var price = th.data.presellList.presell_price; | |
| 2955 | + var title= th.data.prom_act.share_title; | |
| 2956 | + var img=th.data.iurl+th.data.prom_act.share_img; | |
| 2971 | 2957 | |
| 2972 | - } | |
| 2973 | - var title= th.data.data.goods_name; | |
| 2974 | - // var img=th.data.data.original_img; | |
| 2975 | - var img=th.data.iurl+th.data.data.image_url; | |
| 2976 | - if(th.data.prom_type==6){ | |
| 2977 | - title=th.data.prom_act.share_title; | |
| 2978 | - img=th.data.iurl+th.data.prom_act.share_imgurl; | |
| 2979 | - } | |
| 2980 | - | |
| 2981 | - var url="goods_id=" + th.data.gid; | |
| 2958 | + var url="goods_id=" + th.data.gid+"&pre_id="+th.data.presellList.id; | |
| 2982 | 2959 | if(getApp().globalData.user_id) { |
| 2983 | 2960 | url+="&first_leader="+getApp().globalData.user_id; |
| 2984 | 2961 | } |
| ... | ... | @@ -3739,13 +3716,17 @@ Page({ |
| 3739 | 3716 | // ut.wx_back(); |
| 3740 | 3717 | // }, 2000) |
| 3741 | 3718 | // gnext = 0; |
| 3742 | - th.setData({ show: true }); | |
| 3719 | + th.setData({ type: 0 }); | |
| 3743 | 3720 | // return false; |
| 3721 | + }else{ | |
| 3722 | + th.setData({ type: 1 }); | |
| 3744 | 3723 | } |
| 3745 | 3724 | |
| 3746 | 3725 | th.setData({ |
| 3747 | 3726 | presellForm: res.data.data, |
| 3748 | 3727 | }); |
| 3728 | + | |
| 3729 | + th.data.prom_act=res.data.data; | |
| 3749 | 3730 | th.countDown(res.data.data.end_time) |
| 3750 | 3731 | } |
| 3751 | 3732 | }) | ... | ... |
packageC/pages/presell/list/list.wxml
| ... | ... | @@ -27,7 +27,7 @@ |
| 27 | 27 | |
| 28 | 28 | <view class="kill-list seckill_list"> |
| 29 | 29 | <view class="kill-item" wx:for="{{goodlist}}" wx:key="gs"> |
| 30 | - <navigator class="kill-pic rel" url="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&pre_id={{item.id}}"> | |
| 30 | + <navigator class="kill-pic rel" url="/packageC/pages/presell/{{item.goods_type?'cardInfo':'goodsInfo'}}/goodsInfo?goods_id={{item.goods_id}}&pre_id={{item.id}}"> | |
| 31 | 31 | <image class="wh100" src="{{url+item.original_img}}" data-val="{{item.original_img}}" |
| 32 | 32 | data-errorimg="goodlist[{{index}}].original_img" binderror="bind_bnerr2" lazy-load="true"></image> |
| 33 | 33 | </navigator> | ... | ... |