刘翔宇-旅管家 4 years ago
parent 066c0cbdfe
commit b07f3613eb

@ -18,7 +18,7 @@
<view class="orderBoxInfoRow flex-row" style="margin-bottom: 20rpx;"> <view class="orderBoxInfoRow flex-row" style="margin-bottom: 20rpx;">
<text class="iconfont icon-youkexuzhi"></text> <text class="iconfont icon-youkexuzhi"></text>
<text class="orderBoxInfoRowTxt"> <text class="orderBoxInfoRowTxt">
订单信息{{$u.timeFormat(new Date(item.date), 'mm月dd日')}}{{item.time}}{{item.details_count}} 位观众</text> 订单信息{{timeFormat(item.date, 'MM月DD日')}}{{item.time}}{{item.details_count}} 位观众</text>
</view> </view>
<view class="orderBoxInfoRow flex-row"> <view class="orderBoxInfoRow flex-row">
@ -72,6 +72,9 @@
this.loadOrder(); this.loadOrder();
}, },
methods: { methods: {
timeFormat(date, format) {
return this.$moment(date).format(format);
},
handleChange(e) { handleChange(e) {
this.current = e.index; this.current = e.index;
this.loadOrder(); this.loadOrder();

@ -4,7 +4,7 @@
<u-icon name="checkmark-circle" size="90" color="#EF9525"></u-icon> <u-icon name="checkmark-circle" size="90" color="#EF9525"></u-icon>
<view class="h3">您已经预约成功</view> <view class="h3">您已经预约成功</view>
<view class="p">即将跳转到{{tips}}</view> <view class="p">即将跳转到{{tips}} {{time}} s</view>
</view> </view>
<view class="pinkBtn" @click="goHome"></view> <view class="pinkBtn" @click="goHome"></view>
</view> </view>
@ -14,10 +14,11 @@
export default { export default {
data() { data() {
return { return {
tips: "参观预约" tips: "参观预约",
time: 3
} }
}, },
onLoad(options) { onLoad(options) {
let that = this; let that = this;
if (options.from) { if (options.from) {
var url = ""; var url = "";
@ -37,15 +38,25 @@
if (url == "") { if (url == "") {
var t = setInterval(function() {
if (that.time > 1)
that.time = that.time - 1;
}, 1000)
setTimeout(function() { setTimeout(function() {
that.goHome(); that.goHome();
}, 5000) clearInterval(t);
}, 3000)
} else { } else {
var t = setInterval(function() {
if (that.time > 0)
that.time = that.time - 1;
}, 1000)
setTimeout(function() { setTimeout(function() {
uni.navigateTo({ uni.reLaunch({
url: url url: url
}) })
}, 5000) clearInterval(t);
}, 3000)
} }
} }

Loading…
Cancel
Save