|
|
|
@ -7,9 +7,9 @@ |
|
|
|
|
<view :class="{on:typeClass=='noinvalid'}" @tap="switchType('noinvalid')">已过期</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<scroll-view scroll-x='true' class="srollview width100" scroll-with-animation> |
|
|
|
|
<view class="conent" :class="[ordertypeid == index ? 'activeconent' : 'frontconent']" |
|
|
|
|
v-for="(item,index) in orderTyplist" :key="index">{{item}}</view> |
|
|
|
|
<scroll-view scroll-x='true' :style="{top:headerswiperTop}" class="srollview width100" scroll-with-animation> |
|
|
|
|
<view class="conent" :class="[ordertypeid == item.codeValue ? 'activeconent' : 'frontconent']" |
|
|
|
|
v-for="(item,index) in orderTyplist" :key="index" @tap="selectlist(item)">{{item.codeName}}</view> |
|
|
|
|
</scroll-view> |
|
|
|
|
<view class="place"></view> |
|
|
|
|
<view class="list"> |
|
|
|
@ -23,31 +23,43 @@ |
|
|
|
|
<view class="carrier"> |
|
|
|
|
<view class="left"> |
|
|
|
|
<view class="alijusstart" style="margin-top: -7px;"> |
|
|
|
|
<view class="alijus font12 fotct fcorfff" |
|
|
|
|
<view class="alijus font12 fotct fcorfff" v-if="row.discountType == 1" |
|
|
|
|
style="width: 70px;height: 20px;background-color: #FFBDBA;margin-right: 2px;"> |
|
|
|
|
<image src="../../../static/img/user/user16.png" mode="widthFix" class="icon12"> |
|
|
|
|
</image> |
|
|
|
|
满减券 |
|
|
|
|
</view> |
|
|
|
|
<view class="alijus font12 fotct fcorfff" v-if="row.discountType == 2" |
|
|
|
|
style="width: 70px;height: 20px;background-color: #3ecbb0;margin-right: 2px;"> |
|
|
|
|
<image src="../../../static/img/user/user15.png" mode="widthFix" class="icon12"> |
|
|
|
|
<image src="../../../static/img/user/user16.png" mode="widthFix" class="icon12"> |
|
|
|
|
</image> |
|
|
|
|
抵扣券 |
|
|
|
|
</view> |
|
|
|
|
<view class="alijus font12 fotct fcorfff" v-if="row.discountType == 3" |
|
|
|
|
style="width: 70px;height: 20px;background-color: #7986AA;margin-right: 2px;"> |
|
|
|
|
<image src="../../../static/img/user/user16.png" mode="widthFix" class="icon12"> |
|
|
|
|
</image> |
|
|
|
|
折扣券 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="title alijusstart"> |
|
|
|
|
<text class="height20 fotct fcorfff font11" |
|
|
|
|
style="width: 50px;background-color: #347edd;border-radius: 20px;">话费券</text> |
|
|
|
|
<view class="text1 width70">{{row.highDiscount.discountName}}</view> |
|
|
|
|
style="width: 50px;background-color: #347edd;border-radius: 20px;">{{orderTyplist | msgFormat(row.discountUseScope)}}</text> |
|
|
|
|
<view class="text1 width70">{{row.discountName}}</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="term"> |
|
|
|
|
有效期:{{row.useEndTime | formatDate('-')}} |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="right"> |
|
|
|
|
<view class="ticket"> |
|
|
|
|
<view class="num" v-if="row.highDiscount.discountType == 3"> |
|
|
|
|
{{row.highDiscount.discountPrice * 10}} |
|
|
|
|
<view class="ticket" style="background-color: #009DFF;padding-top: 1vw;"> |
|
|
|
|
<view class="num" v-if="row.discountType == 3"> |
|
|
|
|
{{row.discountPrice * 10}} |
|
|
|
|
</view> |
|
|
|
|
<view class="num" v-else> |
|
|
|
|
{{row.highDiscount.discountPrice}} |
|
|
|
|
{{row.discountPrice}} |
|
|
|
|
</view> |
|
|
|
|
<view class="unit" v-if="row.highDiscount.discountType == 3"> |
|
|
|
|
<view class="unit" v-if="row.discountType == 3"> |
|
|
|
|
折 |
|
|
|
|
</view> |
|
|
|
|
<view class="unit" v-else> |
|
|
|
@ -55,7 +67,7 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<!-- <view class="criteria"> |
|
|
|
|
{{row.highDiscount.discountName}} |
|
|
|
|
{{row.discountName}} |
|
|
|
|
</view> --> |
|
|
|
|
<view class="use"> |
|
|
|
|
去使用 |
|
|
|
@ -73,27 +85,51 @@ |
|
|
|
|
<!-- content --> |
|
|
|
|
<view class="carrier"> |
|
|
|
|
<view class="left"> |
|
|
|
|
<view class="title"> |
|
|
|
|
{{row.highDiscount.discountName}} |
|
|
|
|
<view class="alijusstart" style="margin-top: -7px;"> |
|
|
|
|
<view class="alijus font12 fotct fcorfff" v-if="row.discountType == 1" |
|
|
|
|
style="width: 70px;height: 20px;background-color: #999999;margin-right: 2px;"> |
|
|
|
|
<image src="../../../static/img/user/user16.png" mode="widthFix" class="icon12"> |
|
|
|
|
</image> |
|
|
|
|
满减券 |
|
|
|
|
</view> |
|
|
|
|
<view class="alijus font12 fotct fcorfff" v-if="row.discountType == 2" |
|
|
|
|
style="width: 70px;height: 20px;background-color: #999999;margin-right: 2px;"> |
|
|
|
|
<image src="../../../static/img/user/user16.png" mode="widthFix" class="icon12"> |
|
|
|
|
</image> |
|
|
|
|
抵扣券 |
|
|
|
|
</view> |
|
|
|
|
<view class="alijus font12 fotct fcorfff" v-if="row.discountType == 3" |
|
|
|
|
style="width: 70px;height: 20px;background-color: #999999;margin-right: 2px;"> |
|
|
|
|
<image src="../../../static/img/user/user16.png" mode="widthFix" class="icon12"> |
|
|
|
|
</image> |
|
|
|
|
折扣券 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="title alijusstart"> |
|
|
|
|
<text class="height20 fotct fcorfff font11" |
|
|
|
|
style="width: 50px;background-color: #999999;border-radius: 20px;">{{orderTyplist | msgFormat(row.discountUseScope)}}</text> |
|
|
|
|
<view class="text1 width70">{{row.discountName}}</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="term"> |
|
|
|
|
使用时间:{{row.useTime | formatDate('-')}} |
|
|
|
|
有效期:{{row.useEndTime | formatDate('-')}} |
|
|
|
|
</view> |
|
|
|
|
<image src="../../../static/img/user/use.png" mode="widthFix" |
|
|
|
|
style="position: absolute;right: 5px;top: 5px;" class="icon50"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="right invalid"> |
|
|
|
|
<view class="ticket"> |
|
|
|
|
<view class="num"> |
|
|
|
|
{{row.highDiscount.discountPrice}} |
|
|
|
|
<view class="right"> |
|
|
|
|
<view class="ticket" style="background-color: #999999;padding-top: 7vw;"> |
|
|
|
|
<view class="num" v-if="row.discountType == 3"> |
|
|
|
|
{{row.discountPrice * 10}} |
|
|
|
|
</view> |
|
|
|
|
<view class="unit"> |
|
|
|
|
元 |
|
|
|
|
<view class="num" v-else> |
|
|
|
|
{{row.discountPrice}} |
|
|
|
|
</view> |
|
|
|
|
<view class="unit" v-if="row.discountType == 3"> |
|
|
|
|
折 |
|
|
|
|
</view> |
|
|
|
|
<view class="criteria"> |
|
|
|
|
{{row.highDiscount.discountName}} |
|
|
|
|
<view class="unit" v-else> |
|
|
|
|
元 |
|
|
|
|
</view> |
|
|
|
|
<view class="use"> |
|
|
|
|
已使用 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -108,27 +144,51 @@ |
|
|
|
|
<!-- content --> |
|
|
|
|
<view class="carrier"> |
|
|
|
|
<view class="left"> |
|
|
|
|
<view class="title"> |
|
|
|
|
{{row.highDiscount.discountName}} |
|
|
|
|
<view class="alijusstart" style="margin-top: -7px;"> |
|
|
|
|
<view class="alijus font12 fotct fcorfff" v-if="row.discountType == 1" |
|
|
|
|
style="width: 70px;height: 20px;background-color: #999999;margin-right: 2px;"> |
|
|
|
|
<image src="../../../static/img/user/user16.png" mode="widthFix" class="icon12"> |
|
|
|
|
</image> |
|
|
|
|
满减券 |
|
|
|
|
</view> |
|
|
|
|
<view class="alijus font12 fotct fcorfff" v-if="row.discountType == 2" |
|
|
|
|
style="width: 70px;height: 20px;background-color: #999999;margin-right: 2px;"> |
|
|
|
|
<image src="../../../static/img/user/user16.png" mode="widthFix" class="icon12"> |
|
|
|
|
</image> |
|
|
|
|
抵扣券 |
|
|
|
|
</view> |
|
|
|
|
<view class="alijus font12 fotct fcorfff" v-if="row.discountType == 3" |
|
|
|
|
style="width: 70px;height: 20px;background-color: #999999;margin-right: 2px;"> |
|
|
|
|
<image src="../../../static/img/user/user16.png" mode="widthFix" class="icon12"> |
|
|
|
|
</image> |
|
|
|
|
折扣券 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="title alijusstart"> |
|
|
|
|
<text class="height20 fotct fcorfff font11" |
|
|
|
|
style="width: 50px;background-color: #999999;border-radius: 20px;">{{orderTyplist | msgFormat(row.discountUseScope)}}</text> |
|
|
|
|
<view class="text1 width70">{{row.discountName}}</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="term"> |
|
|
|
|
过期时间:{{row.useEndTime | formatDate('-')}} |
|
|
|
|
有效期:{{row.useEndTime | formatDate('-')}} |
|
|
|
|
</view> |
|
|
|
|
<image src="../../../static/img/user/overdue.png" mode="widthFix" |
|
|
|
|
style="position: absolute;right: 5px;top: 5px;" class="icon50"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="right invalid"> |
|
|
|
|
<view class="ticket"> |
|
|
|
|
<view class="num"> |
|
|
|
|
{{row.highDiscount.discountPrice}} |
|
|
|
|
<view class="right"> |
|
|
|
|
<view class="ticket" style="background-color: #999999;padding-top: 7vw;"> |
|
|
|
|
<view class="num" v-if="row.discountType == 3"> |
|
|
|
|
{{row.discountPrice * 10}} |
|
|
|
|
</view> |
|
|
|
|
<view class="unit"> |
|
|
|
|
元 |
|
|
|
|
<view class="num" v-else> |
|
|
|
|
{{row.discountPrice}} |
|
|
|
|
</view> |
|
|
|
|
<view class="unit" v-if="row.discountType == 3"> |
|
|
|
|
折 |
|
|
|
|
</view> |
|
|
|
|
<view class="criteria"> |
|
|
|
|
{{row.highDiscount.discountName}} |
|
|
|
|
<view class="unit" v-else> |
|
|
|
|
元 |
|
|
|
|
</view> |
|
|
|
|
<view class="use"> |
|
|
|
|
已过期 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -142,7 +202,8 @@ |
|
|
|
|
<script> |
|
|
|
|
import { |
|
|
|
|
getUserDiscountList, |
|
|
|
|
useDiscount |
|
|
|
|
useDiscount, |
|
|
|
|
getDictionaryByCodeType |
|
|
|
|
} from '../../../Utils/Api.js'; |
|
|
|
|
let app = getApp(); |
|
|
|
|
export default { |
|
|
|
@ -154,6 +215,7 @@ |
|
|
|
|
imagewxUrl: app.globalData.imageWxImg, |
|
|
|
|
imgadres: 'noorder.png', |
|
|
|
|
headerTop: 0, |
|
|
|
|
headerswiperTop: '45px', |
|
|
|
|
//控制滑动效果 |
|
|
|
|
typeClass: 'valid', |
|
|
|
|
subState: '', |
|
|
|
@ -165,8 +227,10 @@ |
|
|
|
|
isNoMoreData: false, |
|
|
|
|
loadingText: '', |
|
|
|
|
couponcout: 0, |
|
|
|
|
orderTyplist: ['全部订单', '在线加油', '肯德基', '星巴克', '话费充值', '卡券订单'], //消息类型 |
|
|
|
|
ordertypeid: 1 //类型id |
|
|
|
|
ordertypeid: 1, //类型id |
|
|
|
|
usercouFeedbackHidden: 'none', // 默认隐藏 |
|
|
|
|
orderTyplist: '', //订单类型 |
|
|
|
|
statusid: '' //状态 |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onPageScroll(e) { |
|
|
|
@ -179,7 +243,7 @@ |
|
|
|
|
}, 1000); |
|
|
|
|
}, |
|
|
|
|
onLoad() { |
|
|
|
|
this.getUserDiscountList(1); |
|
|
|
|
// this.getUserDiscountList(1); |
|
|
|
|
//兼容H5下排序栏位置 |
|
|
|
|
// #ifdef H5 |
|
|
|
|
//定时器方式循环获取高度为止,这么写的原因是onLoad中head未必已经渲染出来。 |
|
|
|
@ -191,6 +255,7 @@ |
|
|
|
|
} |
|
|
|
|
}, 1); |
|
|
|
|
// #endif |
|
|
|
|
this.getDictionaryByCodeType(); |
|
|
|
|
}, |
|
|
|
|
filters: { |
|
|
|
|
//过滤器 用于格式化时间 |
|
|
|
@ -208,6 +273,15 @@ |
|
|
|
|
mm = mm >= 10 ? mm : "0" + mm; |
|
|
|
|
s = s >= 10 ? s : "0" + s; |
|
|
|
|
return `${year}${spe}${month}${spe}${day} ${h}:${mm}:${s}`; |
|
|
|
|
}, |
|
|
|
|
//过滤器 用于格式化状态 |
|
|
|
|
msgFormat: function(value, value1) { |
|
|
|
|
for (var i = 0; i < value.length; i++) { |
|
|
|
|
if (value1 == value[i].codeValue) { |
|
|
|
|
let a = value[i].codeName; |
|
|
|
|
return a; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onReachBottom() { |
|
|
|
@ -222,6 +296,7 @@ |
|
|
|
|
methods: { |
|
|
|
|
//查询我的优惠券 |
|
|
|
|
getUserDiscountList(item) { |
|
|
|
|
this.statusid = item; |
|
|
|
|
uni.showLoading({ |
|
|
|
|
title: '加载中...' |
|
|
|
|
}) |
|
|
|
@ -234,7 +309,8 @@ |
|
|
|
|
let params = { |
|
|
|
|
pageNum: pagenum, |
|
|
|
|
status: item, |
|
|
|
|
pageSize: this.pageSize |
|
|
|
|
pageSize: this.pageSize, |
|
|
|
|
useScope: this.ordertypeid |
|
|
|
|
} |
|
|
|
|
getUserDiscountList(params).then(res => { |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
@ -260,31 +336,55 @@ |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
//分类类型 |
|
|
|
|
getDictionaryByCodeType() { |
|
|
|
|
let datas = { |
|
|
|
|
codeType: 'USING_RANGE' |
|
|
|
|
} |
|
|
|
|
getDictionaryByCodeType(datas).then(res => { |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
this.orderTyplist = res.return_data; |
|
|
|
|
this.ordertypeid = res.return_data[0].codeValue; |
|
|
|
|
this.getUserDiscountList(1); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
//筛选类型 |
|
|
|
|
selectlist(item) { |
|
|
|
|
this.ordertypeid = item.codeValue; |
|
|
|
|
this.pageNum = 1; |
|
|
|
|
this.couponValidList = []; |
|
|
|
|
this.couponinvalidList = []; |
|
|
|
|
this.couponnoinvalidList = []; |
|
|
|
|
this.isNoMoreData = false; |
|
|
|
|
this.getUserDiscountList(this.statusid); |
|
|
|
|
}, |
|
|
|
|
//跳转详情 |
|
|
|
|
jumpcoupons(e) { |
|
|
|
|
if(e.highDiscount.useScope == 3){ |
|
|
|
|
if (e.useScope == 3) { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '../../unionPay/recharge/recharge' |
|
|
|
|
}) |
|
|
|
|
}else if (e.highDiscount.useScope == 4) { |
|
|
|
|
} else if (e.useScope == 4) { |
|
|
|
|
app.globalData.distinguishid = 1; |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/qianzhu-KFC/buffet-order/buffet-order' |
|
|
|
|
}) |
|
|
|
|
} else if (e.highDiscount.useScope == 5) { |
|
|
|
|
} else if (e.useScope == 5) { |
|
|
|
|
app.globalData.distinguishid = 2; |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/qianzhu-KFC/buffet-order/buffet-order' |
|
|
|
|
}) |
|
|
|
|
} else if (e.highDiscount.useScope == 6) { |
|
|
|
|
} else if (e.useScope == 6) { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/member-Recharge/choicepage/choicepage' |
|
|
|
|
}) |
|
|
|
|
} else if (e.highDiscount.useScope == 7) { |
|
|
|
|
} else if (e.useScope == 7) { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '../../goods/refuel/refuel' |
|
|
|
|
}) |
|
|
|
|
}else if (e.highDiscount.usingRange == 5) { |
|
|
|
|
} else if (e.usingRange == 5) { |
|
|
|
|
this.useDiscount(e.discountAgentCodeId); |
|
|
|
|
} else { |
|
|
|
|
uni.navigateTo({ |
|
|
|
@ -303,8 +403,7 @@ |
|
|
|
|
uni.showModal({ |
|
|
|
|
title: '温馨提示', |
|
|
|
|
content: '请前往微信“中油好客e站”小程序使用,须在有效期30天内使用。(中油好客E站APP也可使用)', |
|
|
|
|
success: function(res) { |
|
|
|
|
} |
|
|
|
|
success: function(res) {} |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
uni.showToast({ |
|
|
|
@ -354,13 +453,23 @@ |
|
|
|
|
view { |
|
|
|
|
display: flex; |
|
|
|
|
flex-wrap: wrap; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.btnsclick { |
|
|
|
|
width: 50px; |
|
|
|
|
height: 20px; |
|
|
|
|
justify-content: center; |
|
|
|
|
align-items: center; |
|
|
|
|
font-size: 12px; |
|
|
|
|
border-radius: 20px; |
|
|
|
|
padding: 0 5px; |
|
|
|
|
position: fixed; |
|
|
|
|
margin-top: 50px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.srollview { |
|
|
|
|
position: fixed; |
|
|
|
|
z-index: 9999; |
|
|
|
|
top: 45px; |
|
|
|
|
height: 60px; |
|
|
|
|
background-color: #ffffff; |
|
|
|
|
display: flex; |
|
|
|
@ -396,10 +505,56 @@ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
page { |
|
|
|
|
position: relative; |
|
|
|
|
background-color: #f5f5f5; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.popup_content { |
|
|
|
|
position: fixed; |
|
|
|
|
top: 40%; |
|
|
|
|
left: 50%; |
|
|
|
|
width: 520upx; |
|
|
|
|
height: 400upx; |
|
|
|
|
margin-left: -270upx; |
|
|
|
|
margin-top: -270upx; |
|
|
|
|
border: 10px solid white; |
|
|
|
|
background-color: white; |
|
|
|
|
z-index: 1002; |
|
|
|
|
overflow: auto; |
|
|
|
|
border-radius: 20upx; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.popup_title { |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: center; |
|
|
|
|
text-align: center; |
|
|
|
|
width: 480upx; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 弹窗 |
|
|
|
|
.popup_overlay { |
|
|
|
|
|
|
|
|
|
position: fixed; |
|
|
|
|
top: 0%; |
|
|
|
|
left: 0%; |
|
|
|
|
width: 100%; |
|
|
|
|
height: 100%; |
|
|
|
|
background-color: black; |
|
|
|
|
z-index: 1001; |
|
|
|
|
-moz-opacity: 0.8; |
|
|
|
|
opacity: .80; |
|
|
|
|
filter: alpha(opacity=88); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.btnno { |
|
|
|
|
height: 40px; |
|
|
|
|
line-height: 40PX; |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: center; |
|
|
|
|
color: #ffffff; |
|
|
|
|
background: #999999; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.hidden { |
|
|
|
|
display: none !important; |
|
|
|
|
} |
|
|
|
@ -641,8 +796,8 @@ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.ticket { |
|
|
|
|
background-image: radial-gradient(6px at top left, #f5f5f5 50px, #009DFF); |
|
|
|
|
padding-top: 1vw; |
|
|
|
|
// background-image: radial-gradient(6px at top left, #f5f5f5 50px, #009DFF); |
|
|
|
|
// padding-top: 1vw; |
|
|
|
|
justify-content: center; |
|
|
|
|
align-items: baseline; |
|
|
|
|
|
|
|
|
|