123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253 |
- <template>
- <view class="pages">
- <u-navbar
- title="我的优惠券"
- :placeholder="true"
- :autoBack="false"
- @leftClick="leftClick"
- :safeAreaInsetTop="true"
- >
- </u-navbar>
- <view class="tabs-wrap">
- <view class="inner">
- <u-tabs
- :list="tabsArr"
- @click="tabsClick"
- lineColor="#ED0000"
- lineWidth="82rpx"
- :activeStyle="{color: '#2D2D2D',fontWeight: 'bold'}"
- itemStyle="width:33%; height: 46px;box-sizing:border-box"
- >
- </u-tabs>
- </view>
- </view>
- <view class="page-wrap">
- <mescroll-body class="" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback">
-
- <view class="list">
- <view v-for="(item,index) in dataList" class="list-item u-flex" :class="{hotel:index==1}" :key="item.id" :style="{backgroundImage:`url(${staticUrl}/img/coupon-bg.png)`}">
- <view class="left u-flex u-row-center u-col-top">
- <text class="icon">¥</text>
- <text class="num">30</text>
- </view>
- <view class="right u-flex u-row-between">
- <view class="text">
- <view class="name">演出购票折扣券</view>
- <view class="time">有限期:2023.10.22-2023.10.22</view>
- <view class="rule u-flex">
- 使用规则
- <u-icon name="arrow-right" color="#D56442" size="30rpx"></u-icon>
- </view>
- </view>
- <view class="btn">去使用</view>
- </view>
- </view>
- </view>
- </mescroll-body>
- </view>
- </view>
- </template>
- <script>
-
- import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
- export default {
- mixins: [MescrollMixin],
- components: {
-
- },
- data() {
- return {
- staticUrl:this.$commonConfig.staticUrl,
-
-
-
-
-
-
-
-
-
-
-
-
-
- params:{
- },
- dataList:[
- {name:'路线推荐',pic:`${this.$commonConfig.staticUrl}/img/indexnav-luxian.png`,id:1},
- {name:'路线推荐',pic:`${this.$commonConfig.staticUrl}/img/indexnav-luxian.png`,id:1},
- ],
- tabsArr:[
- {name:'待使用',status:0},
- {name:'已使用',status:1},
- {name:'已过期',status:2}
- ],
- status:0,
-
- }
- },
- onShow() {
- },
- onLoad() {
- },
- methods: {
- leftClick(e){
- let pages = getCurrentPages();
- if(pages.length==1){
- uni.$u.route('/pages/index/index')
- }else{
- uni.navigateBack()
- };
- },
-
- </script>
- <style lang="scss" scoped>
- .tabs-wrap{
- position: relative;
- margin-bottom: 24rpx;
- box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(226,226,226,0.5);
- }
- .list{
- .list-item{
- width: 100%;
- height: 158rpx;
- background-repeat: no-repeat;
- background-size: 100% 100%;
- margin-bottom: 24rpx;
- .left{
- width: 190rpx;
- .icon{
- width: 26rpx;
- height: 26rpx;
- line-height: 26rpx;
- text-align: center;
- font-size: 10px;
- color: #fff;
- border-radius: 50%;
- background: linear-gradient(360deg, #ED0000 0%, #F27C7D 100%);
- }
- .num{
- font-size: 100rpx;
- font-family: Helvetica, Helvetica;
- font-weight: bold;
- color: #000000;
- background: linear-gradient(180deg, #F28082 0%, #ED0000 100%);
- -webkit-background-clip: text;
- -webkit-text-fill-color: transparent;
- }
- }
- .right{
- flex: 1;
- padding: 32rpx 20rpx;
- .text{
- padding-left: 10rpx;
- color: #D56442;
- font-size: 20rpx;
- font-weight: 400;
- }
- .name{
- font-size: 28rpx;
- font-weight: bold;
- color: #C5412B;
- margin-bottom: 16rpx;
- }
- .time{
- margin-bottom: 16rpx;
- }
- .btn{
- height: 50rpx;
- line-height: 50rpx;
- background: #ED0000;
- border-radius: 25rpx;
- font-size: 24rpx;
- font-weight: bold;
- color: #FFFFFF;
- padding: 0 24rpx;
- }
- }
- &.hotel{
- .num{
- background: linear-gradient(180deg, #F77941 0%, #E84816 100%);
- background: linear-gradient(180deg, #F77941 0%, #E84816 100%);
- -webkit-background-clip: text;
- -webkit-text-fill-color: transparent;
- }
- .icon{
- background: linear-gradient(360deg, #E84917 0%, #F97E45 100%);
- }
- }
- }
- }
- </style>
|