| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396 |
- <template>
- <view >
- <view class="box_head">
- <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" styleType="button" activeColor="#2F4379"></uni-segmented-control>
- </view>
- <view class="box">
- <view >
- <view v-show="current === 0">
- <view class="content" v-for="(item,index) in list" :key="index">
- <view>
- <u-row >
- <u-col span="4" >
- <view class="price_box">
- <text class="price_num">20</text>
- <text class="price_unit">元</text>
- </view>
- </u-col>
- <u-col span="8" >
- <view style="margin-top: 20rpx;">
- <u-row >
- <u-col span="6" >
- <view class="coupon_title">
- 课程现金券
- </view>
- </u-col>
- <u-col span="4" offset="2">
- <view class="coupon_btn">
- 立即使用
- </view>
- </u-col>
- </u-row>
- </view>
- <view class="date">
- 有效期:
- </view>
- <view class="time">
- 2021-03-23 ~ 2021-04-22
- </view>
- <view class="tip">
- 所有题库均可使用
- </view>
- </u-col>
- </u-row>
- </view>
- </view>
- </view>
- <view v-show="current === 1">
- <view class="content" v-for="(item,index) in list" :key="index">
- <view>
- <u-row >
- <u-col span="4" >
- <view class="price_box">
- <text class="price_num">8.8</text>
- <text class="price_unit">折</text>
- </view>
- </u-col>
- <u-col span="8" >
- <view style="margin-top: 20rpx;">
- <u-row >
- <u-col span="6" >
- <view class="coupon_title">
- 题库折扣券
- </view>
- </u-col>
- <u-col span="4" offset="2">
- <view class="coupon_btn">
- 立即使用
- </view>
- </u-col>
- </u-row>
- </view>
- <view class="date">
- 有效期:
- </view>
- <view class="time">
- 2021-03-23 ~ 2021-04-22
- </view>
- <view class="tip">
- 所有题库均可使用
- </view>
- </u-col>
- </u-row>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="footer">
- <view class="footer_btn" @click="openPopup">
- 失效券
- </view>
- </view>
- <u-popup v-model="show" mode="bottom" :safe-area-inset-bottom="true">
- <view class="popup_box" >
- <scroll-view scroll-y="true" class="popup_list" >
- <view class="content" v-for="(item,index) in list1" :key="index" v-show="current === 0">
- <view style="position: relative;">
- <u-row >
- <u-col span="4" >
- <view class="price_box">
- <text class="price_num">20</text>
- <text class="price_unit">元</text>
- </view>
- </u-col>
- <u-col span="8" >
- <view style="margin-top: 20rpx;">
- <u-row >
- <u-col span="6" >
- <view class="coupon_title">
- 课程现金券
- </view>
- </u-col>
-
- </u-row>
- </view>
- <view class="date">
- 有效期:
- </view>
- <view class="time">
- 2021-03-23 ~ 2021-04-22
- </view>
- <view class="tip">
- 所有题库均可使用
- </view>
- </u-col>
- </u-row>
- <view>
- <image :src="item" class="status_img"></image>
- </view>
- </view>
- </view>
- <view class="content" v-for="(item,index) in list2" :key="index" v-show="current === 1">
- <view style="position: relative;">
- <u-row >
- <u-col span="4" >
- <view class="price_box">
- <text class="price_num">5.5</text>
- <text class="price_unit">折</text>
- </view>
- </u-col>
- <u-col span="8" >
- <view style="margin-top: 20rpx;">
- <u-row >
- <u-col span="6" >
- <view class="coupon_title">
- 课程折扣券
- </view>
- </u-col>
-
- </u-row>
- </view>
- <view class="date">
- 有效期:
- </view>
- <view class="time">
- 2021-03-23 ~ 2021-04-22
- </view>
- <view class="tip">
- 所有题库均可使用
- </view>
- </u-col>
- </u-row>
- <view>
- <image :src="item" class="status_img"></image>
- </view>
- </view>
- </view>
- </scroll-view>
- </view>
- </u-popup>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- items: [
- '现金券(0)',
- '折扣券(0)'
- ],
- list:[],
- current:0,
- show:false,
- list2:[],
- list1:['/static/coupon/overdue.png',
- '/static/coupon/used.png','/static/coupon/used.png',
- '/static/coupon/overdue.png','/static/coupon/overdue.png'],
- }
- },
- onLoad(option) {
-
- },
- onShow(){
- },
- methods: {
- onClickItem(e){
- this.current = e.currentIndex
- },
- openPopup(){
- this.show = true
- }
-
- },
-
- }
- </script>
- <style>
- ::-webkit-scrollbar{
- width: 0;
- height: 0;
- color: transparent;
- }
- .u-drawer-content-visible{
- border-radius: 32rpx 32rpx 0rpx 0rpx;
- overflow: hidden;
- }
- </style>
- <style scope>
- .status_img{
- width: 161rpx;
- height: 161rpx;
- position: absolute;
- top: 40rpx;
- left: 20%;
- }
- .popup_list{
- border-radius: 32rpx 32rpx 0rpx 0rpx;
- height: 580rpx;
- margin-bottom: 20rpx;
- }
- .popup_box{
- height: 600rpx;
- box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
- border-radius: 32rpx 32rpx 0rpx 0rpx;
- background: #F2F3F6;
- padding-left: 20rpx;
- padding-right: 20rpx;
- }
- .footer_btn{
- width: 686rpx;
- height: 88rpx;
- background: #FFFFFF;
- box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
- border-radius: 32rpx;
- text-align: center;
- line-height: 88rpx;
- margin: 0 auto;
- margin-top: 10rpx;
- }
- .footer{
- position: fixed;
- bottom: 0;
- width: 100%;
- height: 120rpx;
- background: #F2F3F6;
- text-align: center;
- }
- .price_box view{
- padding: 0;
- }
- .date{
- font-size: 20rpx;
- color: #636A75;
- margin-top: 20rpx;
- }
- .time{
- font-size: 20rpx;
- color: #636A75;
- margin-top: 20rpx;
- }
- .tip{
- font-size: 20rpx;
- color: #636A75;
- opacity: 0.5;
- margin-top: 20rpx;
- }
- .coupon_btn{
- width: 112rpx;
- height: 48rpx;
- background: #32467B;
- border-radius: 16rpx;
- line-height: 48rpx;
- text-align: center;
- font-size: 20rpx;
- color: #FFFFFF;
- }
- .coupon_title{
- width: 140rpx;
- height: 48rpx;
- background: #FFFFFF;
- border: 2rpx solid #32467B;
- border-radius: 16rpx;
- font-size: 24rpx;
- color: #636A75;
- line-height: 48rpx;
- text-align: center;
- }
- .price_box{
- text-align: center;
- vertical-align: middle;
- height: 240rpx;
- border-right:1px dashed #EEEEEE;
- }
- .price_unit{
- font-size: 24rpx;
- color: #636A75;
- }
- .price_num{
- font-size: 88rpx;
- font-family: Impact;
- font-weight: bold;
- color: #32467B;
- line-height: 240rpx;
- }
- .box_head{
- z-index: 999;
- padding: 20rpx 100rpx;
- height: 96rpx;
- position: fixed;
- width: 100%;
- background-color: #F2F3F6;
- text-align: center;
- }
- .box{
- padding-top: 96rpx;
- padding-left: 20rpx;
- padding-right: 20rpx;
- padding-bottom: 120rpx;
- overflow-x: hidden;
- overflow-y: auto;
- }
- .c_log{
- font-size: 20rpx;
- font-family: PingFang SC;
- font-weight: 400;
- color: #2F4379;
- position: absolute;
- bottom: 10rpx;
- }
- .c_title{
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #2F4379;
- padding-top: 10rpx;
- }
- .c_img{
- width: 278rpx;
- height: 134rpx;
- }
- .c_t1{
- font-size: 20rpx;
- color: #2F4379;
- padding: 15rpx;
- }
- .content{
- margin-top: 20rpx;
- width: 100%;
- height: 240rpx;
- background: #FFFFFF;
- border-radius: 32rpx;
- position: relative;
- }
- .content:after {
- content: '';
- position: absolute;
- top: 0px;
- bottom: 0px;
- left: -35rpx;
- width: 70rpx;
- height: 100%;
- background: radial-gradient(circle, #F2F3F6, #F2F3F6 30rpx, transparent 35rpx);
- }
- .content:before {
- content: '';
- position: absolute;
- top: 0px;
- bottom: 0px;
- right: -35rpx;
- width: 70rpx;
- height: 100%;
- background: radial-gradient(circle, #F2F3F6, #F2F3F6 30rpx, transparent 35rpx);
- }
- .segmented-control__text{
- font-size: 24rpx !important;
- }
- .segmented-control{
- height: 56rpx !important;
- background-color: #F8F9FF;
- }
-
- page {
- background: #F2F3F6;
- }
- </style>
|