Commit e06eabe1aebecf6a3b9ac663f03cdb437af8c59a
1 parent
481a4398
优惠券修改
Showing
3 changed files
with
24 additions
and
8 deletions
packageB/pages/coupons/query/index.js
... | ... | @@ -479,6 +479,17 @@ Page({ |
479 | 479 | }, |
480 | 480 | |
481 | 481 | |
482 | + // 使用说明详情展开 | |
483 | + clickDetails: function(e) { | |
484 | + let details = this.data.details; | |
485 | + let index = e.currentTarget.dataset.index; | |
486 | + details[index].isShowDetails = !details[index].isShowDetails; | |
487 | + this.setData({ | |
488 | + details, | |
489 | + }); | |
490 | + }, | |
491 | + | |
492 | + | |
482 | 493 | |
483 | 494 | //---加载更多是靠这个函数---- |
484 | 495 | onReachBottom: function () { | ... | ... |
packageB/pages/coupons/query/index.wxml
... | ... | @@ -70,7 +70,7 @@ |
70 | 70 | <view class="fs28 ellipsis-1x">包邮券</view> |
71 | 71 | <view class="fs24 c-7b pdt4 ellipsis-1x">微券来源: 微信商城</view> |
72 | 72 | </view> |
73 | - <view class="shrink0"><text class="btn {{currentIndex != 0 ? 'gray':''}}" bindtap="{{currentIndex == 0 ? 'clickUse':''}}" data-index="{{idx}}" data-cashrepno="{{detail.CashRepNo}}">立即使用</text></view> | |
73 | + <view class="shrink0"><text class="btn {{currentIndex != 0 ? 'gray':''}}" bindtap="{{currentIndex == 0 ? 'clickUse':''}}" data-index="{{idx}}" data-cashrepno="{{detail.CashRepNo}}">{{filter.showBtnText(currentIndex)}}</text></view> | |
74 | 74 | </view> |
75 | 75 | <view class="c-time"> |
76 | 76 | <text class="ellipsis-1x" wx:if="{{detail.use_end_time!=null}}">有效期:{{detail.use_start_time==null?" " : time.format_time(detail.use_start_time)}}至{{ time.format_time(detail.use_end_time)}}</text> |
... | ... | @@ -80,8 +80,8 @@ |
80 | 80 | </view> |
81 | 81 | </view> |
82 | 82 | <!-- <view class="c-info arrow-down"> --> |
83 | - <view class="c-info"> | |
84 | - <text class="ellipsis-1x">使用说明: 包邮券,全场通用,满 {{detail.condition}}元使用{{detail.title?',不包邮地区:'+detail.title:''}}</text> | |
83 | + <view class="c-info arrow-down {{detail.isShowDetails ? 'active':''}}" bindtap="clickDetails" data-index="{{idx}}"> | |
84 | + <text class="{{detail.isShowDetails ? '':'ellipsis-1x'}}">使用说明: 包邮券,全场通用,满 {{detail.condition}}元使用{{detail.title?',不包邮地区:'+detail.title:''}}</text> | |
85 | 85 | </view> |
86 | 86 | </block> |
87 | 87 | |
... | ... | @@ -106,9 +106,9 @@ |
106 | 106 | </view> |
107 | 107 | </view> |
108 | 108 | </view> |
109 | - <view class="c-info"> | |
110 | - <text class="ellipsis-1x" wx:if="{{detail.Remark1}}">{{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}};{{detail.Remark}}</text> | |
111 | - <text wx:else>使用说明: {{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}}</text> | |
109 | + <view class="c-info arrow-down {{detail.isShowDetails ? 'active':''}}" bindtap="clickDetails" data-index="{{idx}}"> | |
110 | + <text class="{{detail.isShowDetails ? '':'ellipsis-1x'}}" wx:if="{{detail.Remark1}}">{{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}};{{detail.Remark}}</text> | |
111 | + <text class="{{detail.isShowDetails ? '':'ellipsis-1x'}}" wx:else>使用说明: {{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}}</text> | |
112 | 112 | </view> |
113 | 113 | </block> |
114 | 114 | </view> | ... | ... |
packageB/pages/coupons/query/index.wxss
... | ... | @@ -530,8 +530,13 @@ page { |
530 | 530 | font-size: 32rpx; |
531 | 531 | position: absolute; |
532 | 532 | right: 10rpx; |
533 | - top: 50%; | |
534 | - transform: translateY(-50%); | |
533 | + top: 10rpx; | |
534 | + /* transform: translateY(-50%); */ | |
535 | + transition: all 0.3s; | |
536 | + } | |
537 | + | |
538 | + .arrow-down.active::after { | |
539 | + transform: rotateZ(180deg); | |
535 | 540 | } |
536 | 541 | |
537 | 542 | .mask { | ... | ... |