You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

122 lines
2.4 KiB

4 years ago
<template>
<view>
<view class="content">
2 years ago
<u-icon name="checkmark-circle" size="90" color="#cf995a"></u-icon>
4 years ago
<view class="h3">您已经{{option}}成功</view>
4 years ago
<view class="p">即将跳转到{{tips}} {{time}} s</view>
4 years ago
</view>
4 years ago
<view class="pinkBtn" @click="goHome"></view>
4 years ago
</view>
</template>
<script>
export default {
data() {
return {
4 years ago
tips: "参观预约",
4 years ago
time: 3,
option:"预约"
4 years ago
}
},
4 years ago
onLoad(options) {
4 years ago
let that = this;
if (options.from) {
4 years ago
var url = "";
if (options.from == "visit") {
this.tips = "参观预约";
url = "/pages/order/visitorderinfo?id=" + options.id
} else if (options.from == "activity") {
this.tips = "活动预约";
url = "/pages/order/activityorderinfo?id=" + options.id
} else if (options.from == "park") {
this.tips = "车位预约";
url = "/pages/order/parkorderinfo?id=" + options.id
4 years ago
} else if (options.from == "feed") {
4 years ago
this.tips = "首页";
this.option = "提交"
4 years ago
url = ""
4 years ago
}
4 years ago
4 years ago
if (url == "") {
4 years ago
var t = setInterval(function() {
if (that.time > 1)
that.time = that.time - 1;
}, 1000)
4 years ago
setTimeout(function() {
that.goHome();
4 years ago
clearInterval(t);
}, 3000)
4 years ago
} else {
4 years ago
var t = setInterval(function() {
if (that.time > 0)
that.time = that.time - 1;
}, 1000)
4 years ago
setTimeout(function() {
4 years ago
uni.redirectTo({
4 years ago
url: url
})
4 years ago
clearInterval(t);
}, 3000)
4 years ago
}
4 years ago
}
4 years ago
4 years ago
},
methods: {
4 years ago
goHome() {
uni.switchTab({
url: "/pages/index/index"
})
}
4 years ago
}
}
</script>
<style lang="scss" scoped>
.content {
display: flex;
flex-direction: column;
align-items: center;
4 years ago
justify-content: center;
4 years ago
padding-top: 90px;
}
.successBox {
.iconfont {
color: #00CCB9;
font-size: 180rpx;
}
.h3 {
font-size: 40rpx;
font-weight: 500;
color: #333333;
margin-top: 40rpx;
}
.p {
font-size: 28rpx;
font-weight: 400;
color: #333333;
margin-top: 24rpx;
}
}
.pinkBtn {
width: 670rpx;
height: 88rpx;
2 years ago
background-image: linear-gradient(45deg, #cf995a 0%, #cf995a 100%);
4 years ago
border-radius: 44rpx;
font-size: 36rpx;
font-weight: 500;
color: #FFFFFF;
text-align: center;
line-height: 88rpx;
margin: 80rpx auto;
}
</style>