|
@@ -6,12 +6,12 @@
|
|
|
<view class="box">
|
|
<view class="box">
|
|
|
<view >
|
|
<view >
|
|
|
<view v-show="current === 0">
|
|
<view v-show="current === 0">
|
|
|
- <view class="content" v-for="(item,index) in list" :key="index">
|
|
|
|
|
|
|
+ <view class="content" v-for="(item,index) in list1" :key="index">
|
|
|
<view>
|
|
<view>
|
|
|
<u-row >
|
|
<u-row >
|
|
|
<u-col span="4" >
|
|
<u-col span="4" >
|
|
|
<view class="price_box">
|
|
<view class="price_box">
|
|
|
- <text class="price_num">20</text>
|
|
|
|
|
|
|
+ <text class="price_num">{{item.price}}</text>
|
|
|
<text class="price_unit">元</text>
|
|
<text class="price_unit">元</text>
|
|
|
</view>
|
|
</view>
|
|
|
</u-col>
|
|
</u-col>
|
|
@@ -34,10 +34,10 @@
|
|
|
有效期:
|
|
有效期:
|
|
|
</view>
|
|
</view>
|
|
|
<view class="time">
|
|
<view class="time">
|
|
|
- 2021-03-23 ~ 2021-04-22
|
|
|
|
|
|
|
+ {{ $method.timestampToTime(item.createTime) }} ~ {{ $method.timestampToTime(item.endTime) }}
|
|
|
</view>
|
|
</view>
|
|
|
<view class="tip">
|
|
<view class="tip">
|
|
|
- 所有题库均可使用
|
|
|
|
|
|
|
+ 仅部分课程使用
|
|
|
</view>
|
|
</view>
|
|
|
</u-col>
|
|
</u-col>
|
|
|
</u-row>
|
|
</u-row>
|
|
@@ -45,12 +45,12 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view v-show="current === 1">
|
|
<view v-show="current === 1">
|
|
|
- <view class="content" v-for="(item,index) in list" :key="index">
|
|
|
|
|
|
|
+ <view class="content" v-for="(item,index) in list2" :key="index">
|
|
|
<view>
|
|
<view>
|
|
|
<u-row >
|
|
<u-row >
|
|
|
<u-col span="4" >
|
|
<u-col span="4" >
|
|
|
<view class="price_box">
|
|
<view class="price_box">
|
|
|
- <text class="price_num">8.8</text>
|
|
|
|
|
|
|
+ <text class="price_num">{{item.price}}</text>
|
|
|
<text class="price_unit">折</text>
|
|
<text class="price_unit">折</text>
|
|
|
</view>
|
|
</view>
|
|
|
</u-col>
|
|
</u-col>
|
|
@@ -59,7 +59,7 @@
|
|
|
<u-row >
|
|
<u-row >
|
|
|
<u-col span="6" >
|
|
<u-col span="6" >
|
|
|
<view class="coupon_title">
|
|
<view class="coupon_title">
|
|
|
- 题库折扣券
|
|
|
|
|
|
|
+ 课程折扣券
|
|
|
</view>
|
|
</view>
|
|
|
</u-col>
|
|
</u-col>
|
|
|
<u-col span="4" offset="2">
|
|
<u-col span="4" offset="2">
|
|
@@ -73,10 +73,10 @@
|
|
|
有效期:
|
|
有效期:
|
|
|
</view>
|
|
</view>
|
|
|
<view class="time">
|
|
<view class="time">
|
|
|
- 2021-03-23 ~ 2021-04-22
|
|
|
|
|
|
|
+ {{ $method.timestampToTime(item.createTime) }} ~ {{ $method.timestampToTime(item.endTime) }}
|
|
|
</view>
|
|
</view>
|
|
|
<view class="tip">
|
|
<view class="tip">
|
|
|
- 所有题库均可使用
|
|
|
|
|
|
|
+ 仅部分课程可使用
|
|
|
</view>
|
|
</view>
|
|
|
</u-col>
|
|
</u-col>
|
|
|
</u-row>
|
|
</u-row>
|
|
@@ -93,7 +93,7 @@
|
|
|
<u-popup v-model="show" mode="bottom" :safe-area-inset-bottom="true">
|
|
<u-popup v-model="show" mode="bottom" :safe-area-inset-bottom="true">
|
|
|
<view class="popup_box" >
|
|
<view class="popup_box" >
|
|
|
<scroll-view scroll-y="true" class="popup_list" >
|
|
<scroll-view scroll-y="true" class="popup_list" >
|
|
|
- <view class="content" v-for="(item,index) in list1" :key="index" v-show="current === 0">
|
|
|
|
|
|
|
+ <view class="content" v-for="(item,index) in list3" :key="index" v-show="current === 0">
|
|
|
<view style="position: relative;">
|
|
<view style="position: relative;">
|
|
|
<u-row >
|
|
<u-row >
|
|
|
<u-col span="4" >
|
|
<u-col span="4" >
|
|
@@ -117,10 +117,10 @@
|
|
|
有效期:
|
|
有效期:
|
|
|
</view>
|
|
</view>
|
|
|
<view class="time">
|
|
<view class="time">
|
|
|
- 2021-03-23 ~ 2021-04-22
|
|
|
|
|
|
|
+ {{ $method.timestampToTime(item.createTime) }} ~ {{ $method.timestampToTime(item.endTime) }}
|
|
|
</view>
|
|
</view>
|
|
|
<view class="tip">
|
|
<view class="tip">
|
|
|
- 所有题库均可使用
|
|
|
|
|
|
|
+ 仅部分课程可使用
|
|
|
</view>
|
|
</view>
|
|
|
</u-col>
|
|
</u-col>
|
|
|
</u-row>
|
|
</u-row>
|
|
@@ -129,7 +129,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="content" v-for="(item,index) in list2" :key="index" v-show="current === 1">
|
|
|
|
|
|
|
+ <view class="content" v-for="(item,index) in list4" :key="index" v-show="current === 1">
|
|
|
<view style="position: relative;">
|
|
<view style="position: relative;">
|
|
|
<u-row >
|
|
<u-row >
|
|
|
<u-col span="4" >
|
|
<u-col span="4" >
|
|
@@ -153,10 +153,10 @@
|
|
|
有效期:
|
|
有效期:
|
|
|
</view>
|
|
</view>
|
|
|
<view class="time">
|
|
<view class="time">
|
|
|
- 2021-03-23 ~ 2021-04-22
|
|
|
|
|
|
|
+ {{ $method.timestampToTime(item.createTime) }} ~ {{ $method.timestampToTime(item.endTime) }}
|
|
|
</view>
|
|
</view>
|
|
|
<view class="tip">
|
|
<view class="tip">
|
|
|
- 所有题库均可使用
|
|
|
|
|
|
|
+ 仅部分课程可使用
|
|
|
</view>
|
|
</view>
|
|
|
</u-col>
|
|
</u-col>
|
|
|
</u-row>
|
|
</u-row>
|
|
@@ -186,14 +186,92 @@
|
|
|
list1:['/static/coupon/overdue.png',
|
|
list1:['/static/coupon/overdue.png',
|
|
|
'/static/coupon/used.png','/static/coupon/used.png',
|
|
'/static/coupon/used.png','/static/coupon/used.png',
|
|
|
'/static/coupon/overdue.png','/static/coupon/overdue.png'],
|
|
'/static/coupon/overdue.png','/static/coupon/overdue.png'],
|
|
|
|
|
+ paramList: [
|
|
|
|
|
+ {
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ pageSize: 10,
|
|
|
|
|
+ total: 0,
|
|
|
|
|
+ showStatus: 0,
|
|
|
|
|
+ couponType:0,
|
|
|
|
|
+ userStatus:0
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ pageSize: 10,
|
|
|
|
|
+ total: 0,
|
|
|
|
|
+ showStatus: 0,
|
|
|
|
|
+ couponType:1,
|
|
|
|
|
+ userStatus:0
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+ list1: [],
|
|
|
|
|
+ list2: [],
|
|
|
|
|
+ list3: [],
|
|
|
|
|
+ list4: [],
|
|
|
|
|
+ userParamList: [
|
|
|
|
|
+ {
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ pageSize: 10,
|
|
|
|
|
+ total: 0,
|
|
|
|
|
+ couponType:0,
|
|
|
|
|
+ userStatus:2
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ pageSize: 10,
|
|
|
|
|
+ total: 0,
|
|
|
|
|
+ couponType:1,
|
|
|
|
|
+ userStatus:2
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ onReachBottom() {
|
|
|
|
|
+ console.log(32423)
|
|
|
|
|
+ },
|
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
|
-
|
|
|
|
|
|
|
+ this.getList1()
|
|
|
|
|
+ this.getList2()
|
|
|
|
|
+ this.getList3()
|
|
|
|
|
+ this.getList4()
|
|
|
},
|
|
},
|
|
|
onShow(){
|
|
onShow(){
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ getList1(){
|
|
|
|
|
+ let self = this
|
|
|
|
|
+ let param = this.paramList[0]
|
|
|
|
|
+ self.$api.configurationlistCoupon(param).then(res => {
|
|
|
|
|
+ self.list1 = res.data.rows;
|
|
|
|
|
+ self.paramList[0].total = res.data.total;
|
|
|
|
|
+ self.items[0] = '现金券('+res.data.total+')'
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ getList2(){
|
|
|
|
|
+ let self = this
|
|
|
|
|
+ let param = this.paramList[1]
|
|
|
|
|
+ self.$api.configurationlistCoupon(param).then(res => {
|
|
|
|
|
+ self.list2 = res.data.rows;
|
|
|
|
|
+ self.paramList[1].total = res.data.total;
|
|
|
|
|
+ self.items[1] = '折扣券('+res.data.total+')'
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ getList3(){
|
|
|
|
|
+ let self = this
|
|
|
|
|
+ let param = this.userParamList[0]
|
|
|
|
|
+ self.$api.configurationlistCoupon(param).then(res => {
|
|
|
|
|
+ self.list3 = res.data.rows;
|
|
|
|
|
+ self.userParamList[0].total = res.data.total;
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ getList4(){
|
|
|
|
|
+ let self = this
|
|
|
|
|
+ let param = this.userParamList[1]
|
|
|
|
|
+ self.$api.configurationlistCoupon(param).then(res => {
|
|
|
|
|
+ self.list4 = res.data.rows;
|
|
|
|
|
+ self.userParamList[1].total = res.data.total;
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
onClickItem(e){
|
|
onClickItem(e){
|
|
|
this.current = e.currentIndex
|
|
this.current = e.currentIndex
|
|
|
},
|
|
},
|