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.

129 lines
2.5 KiB

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