Commit 5a0c4a62 authored by 郝聪敏's avatar 郝聪敏

fix: 修改定时刷新问题、修改续费跳转路由

parent 13006a5c
...@@ -100,7 +100,11 @@ export default { ...@@ -100,7 +100,11 @@ export default {
// expectResult为true时期望支付结果成功,否则继续执行 // expectResult为true时期望支付结果成功,否则继续执行
if (expectResult && !payRes?.result) return; if (expectResult && !payRes?.result) return;
// 清除定时器 // 清除定时器
if (this.timer) clearInterval(this.timer); if (this.timer) window.clearInterval(this.timer);
// payOrderNo为月计划订单时跳转保单列表
if (+payType === 2) {
this.$router.replace(`/policy`);
}
// 根据状态跳转页面 // 根据状态跳转页面
const status = await this.getPolicyStatus(orderNo); const status = await this.getPolicyStatus(orderNo);
if (["6.2-3", "6.1-3"].includes(status)) { if (["6.2-3", "6.1-3"].includes(status)) {
......
...@@ -36,7 +36,7 @@ export default { ...@@ -36,7 +36,7 @@ export default {
}, },
async created() { async created() {
await this.getPolicy(); await this.getPolicy();
if (this.$route?.query?.isWxH5) { if (this.$route?.query?.isWxH5 && +this.policy?.payState !== 3) {
this.$dialog({ this.$dialog({
message: "请确认是否已经完成了微信免密支付签约", message: "请确认是否已经完成了微信免密支付签约",
onCancel: this.refresh, onCancel: this.refresh,
...@@ -55,11 +55,12 @@ export default { ...@@ -55,11 +55,12 @@ export default {
payType: this.policy?.payInfo?.payOrderType, payType: this.policy?.payInfo?.payOrderType,
orderNo: this.policy?.orderNo orderNo: this.policy?.orderNo
}; };
this.timer = setInterval(() => this.getPayResult(true), 3000); this.timer = window.setInterval(() => this.getPayResult(true), 3000);
this.$once("hook:beforeDestroy", () => {
window.clearInterval(this.timer);
this.timer = null;
});
} }
},
beforeDestroy() {
clearInterval(this.timer);
} }
}; };
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment