Commit 87498d12 authored by 郝聪敏's avatar 郝聪敏

fix: 添加自动续保协议、修改跳转路由页面不更新问题

parent 0c9697ed
<template> <template>
<div id="app"> <div id="app">
<transition :name="transitionName"> <transition :name="transitionName">
<router-view /> <router-view :key="$route.fullPath" />
</transition> </transition>
<div class="loading-container" v-if="isLoading"> <div class="loading-container" v-if="isLoading">
<cr-loading class="loading" size="24px">加载中...</cr-loading> <cr-loading class="loading" size="24px">加载中...</cr-loading>
......
...@@ -5,6 +5,10 @@ export default { ...@@ -5,6 +5,10 @@ export default {
"https://mangobaoxian.sobot.com/chat/h5/v2/index.html?sysnum=cfe2ac6677f94698be2e2d842f23066d", "https://mangobaoxian.sobot.com/chat/h5/v2/index.html?sysnum=cfe2ac6677f94698be2e2d842f23066d",
icp: "京ICP备15059975号", icp: "京ICP备15059975号",
copyright: "全天候保险代理股份有限公司", copyright: "全天候保险代理股份有限公司",
renewalAgreement: {
title: "自动续保协议",
url: "http://mangguo-contract.qthbx.com/zi-dong-xu-bao-fu-wu-xie-yi-v1/"
},
consultant: { consultant: {
name: "赵玉龙", name: "赵玉龙",
role: "金牌保险顾问", role: "金牌保险顾问",
......
...@@ -114,7 +114,7 @@ export default [ ...@@ -114,7 +114,7 @@ export default [
}, },
{ {
path: "/policy/detail/:orderNo", path: "/policy/detail/:orderNo",
name: "Detail", name: "PolicyDetail",
component: () => import("../views/Policy/Detail/index.vue"), component: () => import("../views/Policy/Detail/index.vue"),
meta: { title: "保单详情" } meta: { title: "保单详情" }
}, },
......
...@@ -81,7 +81,7 @@ export default { ...@@ -81,7 +81,7 @@ export default {
}, },
getPayResult() { getPayResult() {
const { payOrderNo, orderNo } = this.orderInfo; const { payOrderNo, orderNo } = this.orderInfo;
placeOrder.polling({ payOrderNo, payOrderType: 1 }).then(payRes => { placeOrder.polling({ payOrderNo, payOrderType: 1 }).then(payRes => {
if (!payRes.result && payRes.payState === 2) { if (!payRes.result && payRes.payState === 2) {
this.payTimer = setTimeout(() => { this.payTimer = setTimeout(() => {
this.getPayResult(); this.getPayResult();
...@@ -89,6 +89,10 @@ export default { ...@@ -89,6 +89,10 @@ export default {
} else { } else {
this.setIsPayWait(false); this.setIsPayWait(false);
this.setIsLoading(false); this.setIsLoading(false);
if (this.$route.name === "PolicyDetail") {
this.getPolicy();
return;
}
this.$router.replace({ path: "/policy/detail/" + orderNo }); this.$router.replace({ path: "/policy/detail/" + orderNo });
} }
}); });
......
...@@ -21,6 +21,12 @@ ...@@ -21,6 +21,12 @@
&_closed { &_closed {
background: #F65D5D; background: #F65D5D;
.renewal-status {
color: #FFFFFF;
}
.renewal-desc {
color: #FFFFFF;
}
} }
&-status { &-status {
......
...@@ -18,7 +18,9 @@ ...@@ -18,7 +18,9 @@
<span class="Rcc-item-text">续保保费按照续保应交保费,自动扣款</span> <span class="Rcc-item-text">续保保费按照续保应交保费,自动扣款</span>
</div> </div>
</div> </div>
<p class="renewal-container-read">阅读并同意《<span>次年自动续保服务协议</span></p> <p class="renewal-container-read" @click="popupShow = true">
阅读并同意《<span>次年自动续保服务协议</span>
</p>
<div class="renewal-container-detail" v-if="!isOpened"></div> <div class="renewal-container-detail" v-if="!isOpened"></div>
<div class="renewal-container-detail" v-if="isOpened"> <div class="renewal-container-detail" v-if="isOpened">
<div class="Rc-detail-item"> <div class="Rc-detail-item">
...@@ -32,17 +34,25 @@ ...@@ -32,17 +34,25 @@
</div> </div>
<cr-button class="renewal-container-button" @click="submit">{{ buttonText }}</cr-button> <cr-button class="renewal-container-button" @click="submit">{{ buttonText }}</cr-button>
</div> </div>
<popup-with-iframe v-model="popupShow" :title="pupopData.title" :url="pupopData.url" />
</div> </div>
</template> </template>
<script> <script>
import PopupWithIframe from "@/components/PopupWithIframe";
import { getPolicyDetail, updateRenewal } from "@/api/policy"; import { getPolicyDetail, updateRenewal } from "@/api/policy";
import settings from "@/api/settings";
export default { export default {
name: "Renewal", name: "Renewal",
components: {
PopupWithIframe
},
data() { data() {
return { return {
isOpened: false, isOpened: false,
nextYear: "-" nextYear: "-",
popupShow: false,
pupopData: settings.renewalAgreement
}; };
}, },
async created() { async created() {
......
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