/*
|
* @Author: c.y
|
* @Date: 2018-12-24 15:25:57
|
* @Last Modified by: c.y
|
* @Last Modified time: 2019-06-06 15:22:27
|
* @文件说明:开通花呗--审核结果
|
*/
|
<template>
|
<div class="huabei-result-page">
|
<x-header
|
:title="'开通' + this.$route.query.title"
|
:left-options="{backText:'',preventGoBack:true}"
|
@on-click-back="pageGoBack()"
|
></x-header>
|
<div class="status-icon">
|
<i v-if="openStatus == 1" class="iconfont scene_Staging-shenhezhong1"></i>
|
<i v-if="openStatus == 2" class="iconfont scene_Staging-danxuan"></i>
|
<i v-if="openStatus == 3" class="iconfont scene_Staging-shibai1"></i>
|
<i v-if="openStatus == 4" class="iconfont scene_Staging-shenhezhong1"></i>
|
</div>
|
<div class="tips">
|
<p v-if="openStatus == 1">审核中</p>
|
<p v-if="openStatus == 2">审核通过</p>
|
<p v-if="openStatus == 3">审核未通过</p>
|
<p v-if="openStatus == 4">人工审核中,请联系客服</p>
|
</div>
|
<div style="padding:0 15px;margin-top:20px;color:#999;" v-if="openStatus != 4">
|
<x-input title="花呗审核备注" v-model="hbAuditRemark" :readonly="true" text-align="right"></x-input>
|
</div>
|
<f-button @on-click="handleBack">{{ buttonText }}</f-button>
|
<f-button v-if="signUrl" @on-click="goSign">去签约</f-button>
|
</div>
|
</template>
|
|
<script>
|
export default {
|
name: "add-account",
|
data() {
|
return {
|
openStatus: 0, // 开通状态
|
buttonText: "", // 底部按钮文字
|
signUrl: null, //签约地址
|
hbAuditRemark: "无", //花呗审核备注
|
timer:"",//定时器
|
};
|
},
|
computed:{
|
isApp(){
|
return Number(this.$route.query.isApp)
|
}
|
},
|
methods: {
|
goSign() {
|
window.location.href = this.signUrl;
|
},
|
pageGoBack() {
|
if(this.isApp==1){
|
this.$router.push({
|
path: "/app/home"
|
});
|
}else{
|
this.$router.push({
|
path: "/main/productManagement"
|
});
|
}
|
|
},
|
// 1.商户提交开通花呗分期申请后状态:审核中,审核不通过,开通成功。
|
// 2.如果是审核中,点击返回按钮回到“我”的界面;
|
// 3.如果审核失败,底部按钮改为“重新开通”,点击进入产品管理页并可以重新开通花呗分期;
|
// 4.如果开通成功,按钮改为“查看详情”,点击进入花呗详情页面;
|
// 5.如果是审核中,点击返回按钮回到“我”的界面;
|
handleBack() {
|
let jumpUrl = "";
|
switch (this.openStatus) {
|
case 1:
|
if(this.isApp==1){
|
jumpUrl = "/app/home";
|
}else{
|
jumpUrl = "/main/mine";
|
}
|
break;
|
case 2:
|
if(this.isApp==1){
|
if(this.$route.query.prodId == 30000003){
|
jumpUrl = "/app/zfbVersionDetail";
|
}else{
|
jumpUrl = "/app/shskVersionDetail";
|
}
|
}else{
|
if (this.$route.query.title == "花呗分期") {
|
jumpUrl = "/huabei/staging";
|
} else {
|
jumpUrl = "/huabei/staging_dmf";
|
}
|
}
|
break;
|
case 3:
|
if(this.isApp==1){
|
jumpUrl = "/app/home";
|
}else{
|
jumpUrl = "/main/productManagement";
|
}
|
break;
|
case 4:
|
if(this.isApp==1){
|
jumpUrl = "/app/home";
|
}else{
|
jumpUrl = "/main/mine";
|
}
|
}
|
// 审核未通过3---需要调用--重新开通接口
|
if (this.openStatus === 3) {
|
this.$api.hbOpenReOpen({}).then(res => {
|
this.$router.push({
|
path: jumpUrl,
|
query:{
|
...this.$route.query
|
}
|
});
|
});
|
} else {
|
this.$router.push({
|
path: jumpUrl,
|
query:{
|
...this.$route.query
|
}
|
});
|
}
|
},
|
// * 开通状态 mOpenStatus 0-待开户,1-审核中,2-审核通过,3-审核未通过 4-人工审核
|
init() {
|
if (this.$route.query.prodId == "30000011") {
|
this.$api.findXygOpenSts().then(res => {
|
console.log(res);
|
try {
|
this.signUrl = res.body.signUrl || null;
|
this.hbAuditRemark = res.body.hbAuditRemark || "无";
|
} catch (err) {}
|
this.openStatus = res.body.openStatus;
|
console.log("aaa" + this.openStatus);
|
switch (res.body.openStatus) {
|
case 1:
|
this.buttonText = "返回";
|
|
break;
|
case 2:
|
this.buttonText = "查看详情";
|
clearInterval(this.timer)
|
break;
|
case 3:
|
this.buttonText = "重新开通";
|
clearInterval(this.timer)
|
break;
|
case 4:
|
this.buttonText = "返回";
|
clearInterval(this.timer)
|
}
|
console.log("bbb" + this.buttonText);
|
});
|
} else {
|
this.$api
|
.findOpenSts({
|
zfbVersion: this.$route.query.zfbVersion
|
})
|
.then(res => {
|
console.log(res);
|
try {
|
this.signUrl = res.body.signUrl || null;
|
this.hbAuditRemark = res.body.hbAuditRemark || "无";
|
} catch (err) {}
|
this.openStatus = res.body.openStatus;
|
console.log("aaa" + this.openStatus);
|
switch (res.body.openStatus) {
|
case 1:
|
this.buttonText = "返回";
|
|
break;
|
case 2:
|
this.buttonText = "查看详情";
|
clearInterval(this.timer)
|
break;
|
case 3:
|
this.buttonText = "重新开通";
|
clearInterval(this.timer)
|
break;
|
case 4:
|
this.buttonText = "返回";
|
clearInterval(this.timer)
|
}
|
console.log("bbb" + this.buttonText);
|
});
|
}
|
}
|
},
|
created() {
|
console.log(this.$route.query.title);
|
this.buttonText = "";
|
this.openStatus = 0;
|
this.init();
|
},
|
mounted(){
|
let _this = this
|
this.timer = setInterval(()=>{
|
_this.init();
|
},5000)
|
},
|
beforeRouteLeave (to, from, next) {
|
// 清除定时器
|
clearInterval(this.timer)
|
next()
|
}
|
};
|
</script>
|
|
<style lang="less">
|
.huabei-result-page {
|
padding-top: 45px;
|
.status-icon {
|
padding-top: 20px;
|
text-align: center;
|
}
|
.iconfont {
|
font-size: 64px;
|
color: #bfa073;
|
}
|
.scene_Staging-shibai1 {
|
color: #f76260;
|
}
|
.tips {
|
color: #999;
|
font-size: 14px;
|
line-height: 1.6;
|
text-align: center;
|
}
|
}
|
</style>
|