Commit 44c53af5 by honghong

最终

parent 7dce1974
......@@ -49,7 +49,8 @@
<view class="buttoncolor" v-if="subscript == '3'">
<button v-if="item.status == 3" style="background: red;" class="buttoncl"
@click.stop="abolish(2,item)">退款</button>
<button v-else-if="item.status == 4 || item.status == 5 || item.status == 6" class="buttonclde buttonGray"
<button v-else-if="item.status == 4 || item.status == 5 || item.status == 6"
class="buttonclde buttonGray"
@click.stop="abolish(4,item)">{{item.status == 4 ? '已完成' : item.status == 5 ? '退款中' : item.status == 6 ? '已退款' : ''}}</button>
<button class="buttoncl" @click.stop="abolish(3,item)">详情</button>
</view>
......@@ -97,19 +98,19 @@
},
mounted() {
if (this.subscript == 2) {
this.list.map((item,index)=>{
this.list.map((item, index) => {
this.timer = setInterval(() => {
this.showtime(item,index)
this.showtime(item, index)
}, 1000)
})
}
},
beforeDestroy() {
clearInterval(this.timer);
this.timer = null;
clearInterval(this.timer);
this.timer = null;
},
methods: {
showtime(item,index) {
showtime(item, index) {
let that = this
//获取当前时间
var curTime = new Date();
......@@ -134,9 +135,12 @@
that.countdowns = lefts //返回倒计时的字符串
// 倒计时结束时,显示00:00:00
if (lefttime < 0) {
that.countdownh = that.countdownm = that.countdowns = "00"
// that.countdownh = "00"
// that.countdownm = "00"
// that.countdowns = "00"
that.list.splice(index, 1)
}
that.$set(item,'isEndTime',that.countdownh + '时' + that.countdownm + '分' + that.countdowns + '秒')
that.$set(item, 'isEndTime', that.countdownh + '时' + that.countdownm + '分' + that.countdowns + '秒')
// that.isEndTime = that.countdownh + '时' + that.countdownm + '分' + that.countdowns + '秒'
},
......@@ -359,4 +363,4 @@
}
}
}
</style>
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment