<!--
|
* @Author: 小明丶
|
* @Date: 2020-08-17 15:34:00
|
* @LastEditors: 小明丶
|
* @LastEditTime: 2020-10-12 17:22:28
|
* @Description: 通联提现结果页面
|
-->
|
<template>
|
<div class="withdrawal-result-page">
|
<v-navbar title="提现结果"></v-navbar>
|
<div class="res-box">
|
<img
|
v-if="status == 2"
|
src="../../../../../static/img/cg.png"
|
alt="提现成功"
|
/>
|
<img
|
v-if="status == 0"
|
src="../../../../../static/img/ing.png"
|
alt="初始化"
|
/>
|
<img
|
v-if="status == 1"
|
src="../../../../../static/img/ing.png"
|
alt="提现中"
|
/>
|
<img
|
v-if="status == 3"
|
src="../../../../../static/img/cs.png"
|
alt="提现失败"
|
/>
|
<p>{{ resultText }}</p>
|
</div>
|
<button class="btn-y" v-show="status != 0 && status != 1" @click="$router.go(-1)">返回</button>
|
</div>
|
</template>
|
<script>
|
export default {
|
data() {
|
return {
|
status: 0, //0 初始化 1提现中 2成功 3失败
|
resultText: "提现中,请稍后",
|
timer:"",
|
};
|
},
|
created() {
|
this.init()
|
},
|
methods: {
|
init() {
|
clearInterval(this.timer)
|
this.$api
|
.tltWalletWithdrawStatus({
|
withdrawId: this.$route.query.withdrawId,
|
})
|
.then((res) => {
|
|
this.status = res.body.status;
|
if (res.body.status == 3) {
|
this.resultText = "提现失败,请重试";
|
} else if (res.body.status == 2) {
|
this.resultText = "提现成功";
|
} else {
|
this.resultText = "提现中,请稍后";
|
this.timer = setInterval(()=>{
|
this.init()
|
},5000)
|
}
|
});
|
},
|
},
|
beforeRouteLeave (to, from, next) {
|
clearInterval(this.timer)
|
next()
|
}
|
};
|
</script>
|
<style lang="less">
|
.withdrawal-result-page {
|
& {
|
min-height: 100vh;
|
background: #f5f5f7;
|
}
|
.res-box {
|
width: 96vw;
|
margin-left: 2vw;
|
box-sizing: border-box;
|
padding: 33px;
|
margin-top: 10px;
|
background: #fff;
|
text-align: center;
|
img {
|
width: 95px;
|
height: 95px;
|
}
|
p {
|
margin-top: 17px;
|
font-size: 14px;
|
color: #333;
|
font-weight: 500;
|
}
|
}
|
.btn-y{
|
width: 94%;
|
margin-left: 3%;
|
margin-top: 20px;
|
color:#fff ;
|
height: 44px;
|
background: #896edb;
|
border: 0;
|
outline: none;
|
border-radius: 22px;
|
}
|
}
|
</style>
|