Commit 9ccea2674c6e726d1e6ebf511d227e91f7d311c2
1 parent
a15f9c46
活动分享修改
Showing
3 changed files
with
170 additions
and
10 deletions
packageA/pages/activity_share/activity_share.js
| @@ -7,7 +7,7 @@ Page({ | @@ -7,7 +7,7 @@ Page({ | ||
| 7 | */ | 7 | */ |
| 8 | data: { | 8 | data: { |
| 9 | // tab | 9 | // tab |
| 10 | - tab: ['秒杀','拼单','促销','专享礼包','预售','团购','组合购'], | 10 | + tab: ['秒杀','拼单','促销','专享礼包','预售','团购','组合购','幸运购'], |
| 11 | currentIndex: 0, | 11 | currentIndex: 0, |
| 12 | //促销页tab | 12 | //促销页tab |
| 13 | tab2: ['订单促销','搭配促销','优惠促销'], | 13 | tab2: ['订单促销','搭配促销','优惠促销'], |
| @@ -170,13 +170,15 @@ Page({ | @@ -170,13 +170,15 @@ Page({ | ||
| 170 | let url = `packageC/pages/presell/goodsInfo/goodsInfo?goods_id=${goods_id}&pre_id=${pre_id}`; | 170 | let url = `packageC/pages/presell/goodsInfo/goodsInfo?goods_id=${goods_id}&pre_id=${pre_id}`; |
| 171 | let title = item.goods_name; | 171 | let title = item.goods_name; |
| 172 | let img = this.data.url + item.original_img; | 172 | let img = this.data.url + item.original_img; |
| 173 | - | 173 | + let ind = 9; |
| 174 | // console.log('preselll=======>>>>>', item, url); | 174 | // console.log('preselll=======>>>>>', item, url); |
| 175 | 175 | ||
| 176 | if(getApp().globalData.user_id){ | 176 | if(getApp().globalData.user_id){ |
| 177 | url += "&first_leader=" + getApp().globalData.user_id; | 177 | url += "&first_leader=" + getApp().globalData.user_id; |
| 178 | - } | ||
| 179 | - th.setData({share_hidden:1,share_good:null}); | 178 | + } |
| 179 | + th.insert_act_share(title,pre_id,ind,item.goods_sn,price); | ||
| 180 | + th.setData({share_hidden:1,share_good:null}); | ||
| 181 | + | ||
| 180 | return { | 182 | return { |
| 181 | title: price + "元 " +title, | 183 | title: price + "元 " +title, |
| 182 | path: url, | 184 | path: url, |
| @@ -189,12 +191,14 @@ Page({ | @@ -189,12 +191,14 @@ Page({ | ||
| 189 | let price = item.zhprice; | 191 | let price = item.zhprice; |
| 190 | let url = `/packageB/pages/zuhegou/index/index?id=${id}&title=${title}`; | 192 | let url = `/packageB/pages/zuhegou/index/index?id=${id}&title=${title}`; |
| 191 | let img = this.data.url + item.img_url; | 193 | let img = this.data.url + item.img_url; |
| 192 | - | ||
| 193 | - console.log('zuhebuy=======>>>>>', item, url); | 194 | + let ind = 11; |
| 195 | + // console.log('zuhebuy=======>>>>>', item, url); | ||
| 194 | 196 | ||
| 195 | if(getApp().globalData.user_id){ | 197 | if(getApp().globalData.user_id){ |
| 196 | url += "&first_leader=" + getApp().globalData.user_id; | 198 | url += "&first_leader=" + getApp().globalData.user_id; |
| 197 | - } | 199 | + } |
| 200 | + | ||
| 201 | + th.insert_act_share(title,id,ind,null,price); | ||
| 198 | th.setData({share_hidden:1}); | 202 | th.setData({share_hidden:1}); |
| 199 | return { | 203 | return { |
| 200 | title: price + "元 " +title, | 204 | title: price + "元 " +title, |
| @@ -202,6 +206,29 @@ Page({ | @@ -202,6 +206,29 @@ Page({ | ||
| 202 | imageUrl: img, | 206 | imageUrl: img, |
| 203 | }; | 207 | }; |
| 204 | 208 | ||
| 209 | + } else if(th.data.currentIndex==7) { | ||
| 210 | + // /packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=462393&group_id=288 | ||
| 211 | + let item = this.data.hui_active; | ||
| 212 | + // console.log('luckygo>>>>>', item); | ||
| 213 | + let id = item.id; | ||
| 214 | + let title = item.title; | ||
| 215 | + let price = item.group_price / 100; | ||
| 216 | + let url = `/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=462393&group_id=288`; | ||
| 217 | + let img = this.data.url + item.original_img; | ||
| 218 | + let ind = 12; | ||
| 219 | + // console.log('zuhebuy=======>>>>>', item, url); | ||
| 220 | + | ||
| 221 | + if(getApp().globalData.user_id){ | ||
| 222 | + url += "&first_leader=" + getApp().globalData.user_id; | ||
| 223 | + } | ||
| 224 | + | ||
| 225 | + th.insert_act_share(title,id,ind,null,price); | ||
| 226 | + th.setData({share_hidden:1}); | ||
| 227 | + return { | ||
| 228 | + title: price + "元 " +title, | ||
| 229 | + path: url, | ||
| 230 | + imageUrl: img, | ||
| 231 | + }; | ||
| 205 | } else { | 232 | } else { |
| 206 | //---秒杀,拼团,促销, 团购--- | 233 | //---秒杀,拼团,促销, 团购--- |
| 207 | var item=this.data.share_good; | 234 | var item=this.data.share_good; |
| @@ -247,7 +274,7 @@ Page({ | @@ -247,7 +274,7 @@ Page({ | ||
| 247 | }else if(th.data.currentIndex==2){ | 274 | }else if(th.data.currentIndex==2){ |
| 248 | ind=5;//促销 | 275 | ind=5;//促销 |
| 249 | }else if(th.data.currentIndex==5){ | 276 | }else if(th.data.currentIndex==5){ |
| 250 | - ind=8;//团购 | 277 | + ind=10;//团购 |
| 251 | } | 278 | } |
| 252 | 279 | ||
| 253 | //插入活动 | 280 | //插入活动 |
| @@ -515,6 +542,15 @@ Page({ | @@ -515,6 +542,15 @@ Page({ | ||
| 515 | req_data.key_str = th.data.key_str.trim(); | 542 | req_data.key_str = th.data.key_str.trim(); |
| 516 | } | 543 | } |
| 517 | break; | 544 | break; |
| 545 | + | ||
| 546 | + case 7: //幸运购 | ||
| 547 | + url = '/api/weshop/prom/luckyActivity/page'; | ||
| 548 | + req_data.is_end = 0; | ||
| 549 | + req_data.timetype = 1; | ||
| 550 | + if(th.data.key_str && th.data.key_str.trim()){ | ||
| 551 | + req_data.key_str = th.data.key_str.trim(); | ||
| 552 | + } | ||
| 553 | + break; | ||
| 518 | } | 554 | } |
| 519 | 555 | ||
| 520 | if(this.data.key_str && this.data.key_str.trim()){ | 556 | if(this.data.key_str && this.data.key_str.trim()){ |
| @@ -1319,7 +1355,13 @@ Page({ | @@ -1319,7 +1355,13 @@ Page({ | ||
| 1319 | }) | 1355 | }) |
| 1320 | 1356 | ||
| 1321 | 1357 | ||
| 1322 | - } | 1358 | + }, |
| 1359 | + | ||
| 1360 | + //跳转 | ||
| 1361 | + go: function (e) { | ||
| 1362 | + var url = e.currentTarget.dataset.url; | ||
| 1363 | + getApp().goto(url); | ||
| 1364 | + }, | ||
| 1323 | 1365 | ||
| 1324 | 1366 | ||
| 1325 | }) | 1367 | }) |
| 1326 | \ No newline at end of file | 1368 | \ No newline at end of file |
packageA/pages/activity_share/activity_share.wxml
| @@ -225,6 +225,34 @@ | @@ -225,6 +225,34 @@ | ||
| 225 | </view> | 225 | </view> |
| 226 | </block> | 226 | </block> |
| 227 | 227 | ||
| 228 | + <!-- 幸运购 --> | ||
| 229 | + <block wx:if="{{currentIndex == 7}}"> | ||
| 230 | + <view class="list-item luckygo" wx:if="{{item.status == 1}}" bindtap="{{item.actLen == 0 ? '':'go'}}" data-url="/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id={{item.goods_id}}&prom_type=9&group_id={{item.id}}"> | ||
| 231 | + <view class="flex ai-center"> | ||
| 232 | + <view class="img-container"> | ||
| 233 | + <image class="img-block" src="{{url + item.original_img}}" data-val="{{item.original_img}}" | ||
| 234 | + data-errorimg="list[{{index}}].original_img" binderror="bind_bnerr2" lazy-load="true" mode="heightFix"></image></view> | ||
| 235 | + <view class="pdl20 flex fdc jc_sb f1"> | ||
| 236 | + | ||
| 237 | + <view class="ellipsis-2 name fs28" data-content="{{item.group_num}}人团">{{item.title}}</view> | ||
| 238 | + <view> | ||
| 239 | + <view class="flex ai-center"> | ||
| 240 | + <text class="rmb c-red">{{filters.price(item.group_price)}}</text> | ||
| 241 | + <view class="del fs22 c-a pdl10">零售价:<text class="rmb">{{item.market_price}}</text></view> | ||
| 242 | + </view> | ||
| 243 | + <view class="flex jc_sb"> | ||
| 244 | + <progress class="pdr20 f1 progress" percent="{{filters.percent(item.num, item.group_num)}}" activeColor="#FF6768" backgroundColor="#d0d0d0" border-radius="12" stroke-width="12" data-content="{{item.num}}人已参团"></progress> | ||
| 245 | + <!-- <view class="btn fs26 {{item.actLen == 0 ? 'gray':''}}" wx:if="{{item.actLen == 0}}">已抢光</view> --> | ||
| 246 | + <view class="btn-share fs26" catchtap="share_index" data-index="{{index}}">分享</view> | ||
| 247 | + </view> | ||
| 248 | + </view> | ||
| 249 | + | ||
| 250 | + </view> | ||
| 251 | + </view> | ||
| 252 | + <view class="fs24 pdt10 c-7b">*<text class="c-red">{{item.group_num}}</text>人成团,<text class="c-red">{{item.group_win}}</text>人得商品,<text class="c-red">{{item.group_num - item.group_win}}</text>人全额退款并得<text class="c-red">惊喜礼品</text>!</view> | ||
| 253 | + </view> | ||
| 254 | + </block> | ||
| 255 | + | ||
| 228 | </block><!--for的闭合 --> | 256 | </block><!--for的闭合 --> |
| 229 | <view style="height: 1rpx;"></view> | 257 | <view style="height: 1rpx;"></view> |
| 230 | <nodata wx:if="{{list.length==0}}" nodataContainer="nodata">暂无数据</nodata> | 258 | <nodata wx:if="{{list.length==0}}" nodataContainer="nodata">暂无数据</nodata> |
packageA/pages/activity_share/activity_share.wxss
| @@ -139,7 +139,7 @@ page { | @@ -139,7 +139,7 @@ page { | ||
| 139 | padding-bottom: 8rpx; | 139 | padding-bottom: 8rpx; |
| 140 | } | 140 | } |
| 141 | .pdl20 { | 141 | .pdl20 { |
| 142 | - padding-left: 104rpx; | 142 | + padding-left: 20rpx; |
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | 145 | ||
| @@ -562,3 +562,93 @@ padding-top: 4rpx; | @@ -562,3 +562,93 @@ padding-top: 4rpx; | ||
| 562 | padding-top: 20rpx; | 562 | padding-top: 20rpx; |
| 563 | } | 563 | } |
| 564 | 564 | ||
| 565 | + | ||
| 566 | + | ||
| 567 | + | ||
| 568 | +.luckygo.list-item { | ||
| 569 | + display: block; | ||
| 570 | + background-color: white; | ||
| 571 | + padding: 20rpx; | ||
| 572 | + border-radius: 12rpx; | ||
| 573 | + /* margin-top: 20rpx; */ | ||
| 574 | +} | ||
| 575 | + | ||
| 576 | +.luckygo .img-container { | ||
| 577 | + width: 220rpx; | ||
| 578 | + height: 220rpx; | ||
| 579 | + border-radius: 14rpx; | ||
| 580 | + overflow: hidden; | ||
| 581 | + flex-shrink: 0; | ||
| 582 | + position: relative; | ||
| 583 | +} | ||
| 584 | + | ||
| 585 | +.luckygo .img-container::before { | ||
| 586 | + content: '幸运购'; | ||
| 587 | + position: absolute; | ||
| 588 | + left: 0; | ||
| 589 | + top: 0; | ||
| 590 | + padding: 4rpx; | ||
| 591 | + background-color: rgba(255,103,103,.7); | ||
| 592 | + color: white; | ||
| 593 | + font-size: 22rpx; | ||
| 594 | + border-radius: 0 0 14rpx 0; | ||
| 595 | +} | ||
| 596 | + | ||
| 597 | +.luckygo .name::before { | ||
| 598 | + content: attr(data-content); | ||
| 599 | + background-color: #FF6768; | ||
| 600 | + color: white; | ||
| 601 | + font-size: 24rpx; | ||
| 602 | + padding-left: 10rpx; | ||
| 603 | + padding-right: 10rpx; | ||
| 604 | + border-radius: 20rpx; | ||
| 605 | + margin-right: 10rpx; | ||
| 606 | +} | ||
| 607 | + | ||
| 608 | +.luckygo .rmb::before { | ||
| 609 | + content: '¥'; | ||
| 610 | + font-size: 24rpx; | ||
| 611 | +} | ||
| 612 | + | ||
| 613 | +.luckygo .del { | ||
| 614 | + text-decoration: line-through; | ||
| 615 | +} | ||
| 616 | + | ||
| 617 | +.luckygo .btn { | ||
| 618 | + background-color: #FF6768; | ||
| 619 | + border-radius: 20rpx; | ||
| 620 | + padding-left:20rpx; | ||
| 621 | + padding-right: 20rpx; | ||
| 622 | + color: white; | ||
| 623 | +} | ||
| 624 | + | ||
| 625 | +.luckygo .name { | ||
| 626 | + height: 88rpx; | ||
| 627 | + word-break: break-all; | ||
| 628 | +} | ||
| 629 | + | ||
| 630 | +/* .no-more { | ||
| 631 | + font-size: 24rpx; | ||
| 632 | + line-height: 2; | ||
| 633 | + text-align: center; | ||
| 634 | + padding-top: 20rpx; | ||
| 635 | + padding-bottom: 20rpx; | ||
| 636 | + color: #ccc; | ||
| 637 | +} */ | ||
| 638 | + | ||
| 639 | +.luckygo .progress { | ||
| 640 | + position: relative; | ||
| 641 | +} | ||
| 642 | +.luckygo .progress::before { | ||
| 643 | + position: absolute; | ||
| 644 | + width: 100%; | ||
| 645 | + content: attr(data-content); | ||
| 646 | + font-size: 20rpx; | ||
| 647 | + color: white; | ||
| 648 | + text-align: center; | ||
| 649 | +} | ||
| 650 | + | ||
| 651 | +.luckygo .btn.gray { | ||
| 652 | + background-color: #ccc; | ||
| 653 | +} | ||
| 654 | + |