Commit 4810a01b authored by 郝聪敏's avatar 郝聪敏

fix: 修改bug

parent ac4a0cbc
<template>
<div id="app">
<router-view />
<transition :name="transitionName">
<router-view />
</transition>
<div class="loading-container" v-if="isLoading">
<cr-loading class="loading" size="24px">加载中...</cr-loading>
</div>
......@@ -20,9 +22,28 @@ export default {
AuthFromXyqb,
NetError
},
data() {
return {
transitionName: "slide-right"
};
},
computed: {
...mapState(["isLoading", "showAuthXyqb"])
},
watch: {
$route(to, from) {
const firstPath = ["/home", "/goods", "/consultant", "/user"];
if (
[to.path, from.path].every(v => firstPath.includes(v)) ||
[to.path, from.path].includes("/")
) {
this.transitionName = "";
return;
}
this.transitionName = this.$router.isBack ? "slide-right" : "slide-left";
this.$router.isBack = false;
}
},
methods: {
...mapActions(["setIsLoading"])
}
......@@ -31,6 +52,35 @@ export default {
<style lang="less" scoped>
@import "./style/index.less";
.slide-right-enter-active,
.slide-right-leave-active,
.slide-left-enter-active,
.slide-left-leave-active {
will-change: transform;
transition: all 500ms;
position: absolute;
}
.slide-right-enter {
opacity: 0;
transform: translate3d(-100%, 0, 0);
}
.slide-right-leave-active {
opacity: 0;
transform: translate3d(100%, 0, 0);
}
.slide-left-enter {
opacity: 0;
transform: translate3d(100%, 0, 0);
}
.slide-left-leave-active {
opacity: 0;
transform: translate3d(-100%, 0, 0);
}
.loading-container {
position: fixed;
left: 0;
......@@ -46,6 +96,7 @@ export default {
border-radius: 6px;
background-color: rgba(0, 0, 0, 0.5);
color: #fff;
@{deep} .cr-loading--text {
color: #fff;
}
......
......@@ -16,6 +16,14 @@ new Vue({
render: h => h(App)
}).$mount("#app");
window.addEventListener(
"popstate",
() => {
router.isBack = true;
},
false
);
// if (process.env.NODE_ENV !== "development") {
// ! 上线后务必取掉
new vConsole();
......
......@@ -125,7 +125,7 @@ export default [
meta: { title: "次年自动续保" }
},
{
path: "/policy/payment-record/:policySecId/:status",
path: "/policy/payment-record/:policySecId/:status/:isAClear",
name: "Renewal",
component: () => import("../views/Policy/PaymentRecord/index.vue"),
meta: { title: "缴费记录" }
......
......@@ -5,6 +5,7 @@
min-height: 100%;
background: #EDEDED;
padding: 20px 15px;
width: 100%;
.measure-dialogue {
margin-bottom: 20px;
......
<template>
<div>
<status-desc :cardConfig="data.cardConfig" :policySecId="data.policySecId"></status-desc>
<status-desc
:cardConfig="data.cardConfig"
:policySecId="data.policySecId"
:payType="data.productItem && data.productItem.payType"
:payTypeList="data.payType"
></status-desc>
<pay-cost
v-if="showPayCost"
:statusKey="data.cardConfig.key"
......
<template>
<div>
<status-desc :cardConfig="data.cardConfig" :policySecId="data.policySecId"></status-desc>
<status-desc :cardConfig="cardConfig" :policySecId="data.policySecId"></status-desc>
<pay-cost
v-if="showPayCost"
:statusKey="data.cardConfig.key"
:payCostConfig="data.cardConfig.payCostConfig"
></pay-cost>
<refund
v-else
v-show="showRefund"
:refundConfig="data.cardConfig.refundConfig"
:amount="amount"
:payTime="payTime"
:payTimeText="payTimeText"
></refund>
<cr-button class="Pdb-button" v-if="showBackButton" @click="$router.push('/home')"
>知道了,回首页</cr-button
>
<Phone></Phone>
</div>
</template>
......@@ -22,7 +25,6 @@ import Phone from "../modules/Phone";
import Refund from "../modules/Refund";
import PayCost from "../modules/PayCost";
import detailPayMixin from "@/views/Policy/mixin/orderInfo.mixin";
// import { parseTime } from "@/service/utils";
export default {
name: "Guarantee",
......@@ -44,7 +46,6 @@ export default {
},
computed: {
amount() {
console.log(this.data);
return this.data.refundInfo?.amount || 0;
},
payTime() {
......@@ -57,6 +58,23 @@ export default {
},
showPayCost() {
return ["14", "13"].includes(this.data?.cardConfig?.key);
},
showRefund() {
return (
!["14", "13"].includes(this.data?.cardConfig?.key) &&
!["4", "5"].includes(this.data?.cardConfig?.status)
);
},
showBackButton() {
return ["7-5", "4", "5", "7-3"].includes(this.data?.cardConfig?.status);
},
cardConfig() {
const result = this.data?.cardConfig;
if (["4", "5"].includes(this.data?.cardConfig?.status)) {
result.detailText = "核保失败";
result.statusText = "您未通过保险公司的核保";
}
return result;
}
}
};
......
......@@ -457,5 +457,19 @@
.Pdb-recommend {
margin-bottom: 49px;
}
.Pdb-button {
position: absolute;
top: 380px;
margin: 0 20px;
width:335px;
height:52px;
background: #FFFFFF !important;
border-radius: 14px !important;
font-size: 16px;
font-weight: 400;
line-height: 22px;
color: #666666 !important;
}
}
}
\ No newline at end of file
......@@ -11,6 +11,8 @@
</div>
</template>
<script>
import settings from "@/api/settings";
export default {
name: "CustomerService",
data() {
......@@ -20,6 +22,8 @@ export default {
goNext(type) {
if (type === "home") {
this.$router.push("/home");
} else {
window.location.href = settings.sobot;
}
}
}
......
......@@ -70,12 +70,7 @@ export default {
},
methods: {
showPdf() {
this.$router.push({
path: "/policy/virtual-detail",
query: {
url: "http://hathaway-mg.liangkebang.net/third/huagui/download?idStr=Z3BSb1djY1N0S2s9"
}
});
this.$router.push({ path: "/policy/virtual-detail", query: { url: this.data.policyUrl } });
}
},
computed: {
......
......@@ -24,6 +24,14 @@ export default {
policySecId: {
type: [String, Number],
default: ""
},
payType: {
type: Number,
default: 0
},
payTypeList: {
type: Array,
default: () => []
}
},
data() {
......@@ -42,8 +50,12 @@ export default {
methods: {
goNext() {
const arr = ["6.2-3", "6.1-3", "6.3", "8", "9-5", "9-6", "10"];
const payTypeText = this.payTypeList?.find(v => v.value === this.payType);
const isAClear = payTypeText.label === "一次交清";
if (arr.includes(this.cardConfig?.status)) {
this.$router.push(`/policy/payment-record/${this.policySecId}/${this.cardConfig.status}`);
this.$router.push(
`/policy/payment-record/${this.policySecId}/${this.cardConfig.status}/${isAClear}`
);
}
}
}
......
......@@ -72,7 +72,6 @@ export default {
return this.record.payPeriod === 1 ? "按月缴费" : "按年缴费";
},
isShowCard() {
console.log(this.record?.payPeriod === 1);
return this.record?.payPeriod === 1 && !["8", "10"].includes(this.$route.params.status);
}
},
......@@ -92,9 +91,10 @@ export default {
if (["6.2-3", "6.1-3", "6.3"].includes(status)) {
result = {
titelText: isMonthPay ? "持续缴费中" : "缴费成功",
refundTimeText: isMonthPay
? `预计下次扣费时间 ${this.record.nextPayDate}`
: `下次缴费时间 ${this.record.nextPayDate}`,
refundTimeText:
isMonthPay && this.$route.params.isAClear === "false"
? `预计下次扣费时间 ${this.record.nextPayDate}`
: "",
amount: `${this.record?.nextTermAmount || 0}`,
amountText: "下期应缴金额",
termText: `${this.record.paidTerm}/${this.record.totalTerm}期`,
......
......@@ -3,6 +3,7 @@
.renewal {
overflow: hidden;
height: 100%;
width: 100%;
&:after {
position: absolute;
......
......@@ -60,11 +60,12 @@ export default {
...result,
permium: `${this.policy?.downPayPrice || 0}/`,
note: `注:合同终止前,每年${this.policy?.nextPayInfo?.month || "-"}${this.policy
?.nextPayInfo?.day || "-"}${this.policy?.company || "-"}保险公司将在您预留尾号为${this
.policy?.bankCardNoLast4 || "-"}的银行卡内扣除次年保费,请保证余额充足哦。`
?.nextPayInfo?.day || "-"}日前${this.policy?.company ||
"-"}保险公司将在您预留尾号为${this.policy?.bankCardNoLast4 ||
"-"}的银行卡内扣除次年保费,请保证余额充足哦。`
};
// 缴费方式为“一次结清”时不显示扣费提醒
if (!payType || payType === "一次交清") {
if (!payType || payType?.label === "一次交清") {
result.isShowNote = false;
}
}
......
......@@ -7,7 +7,7 @@
<script>
import pdf from "vue-pdf";
import { mapActions } from "vuex";
let CMAP_URL = "https://unpkg.com/pdfjs-dist@2.0.943/cmaps/";
let CMAP_URL = "https://cdn.jsdelivr.net/npm/pdfjs-dist@2.2.228/cmaps/";
export default {
name: "PolicyVirtualDetail",
......
......@@ -12,7 +12,12 @@ export default {
methods: {
getData(policy) {
const key = this.findKey(policy);
const value = _.cloneDeep(STATUS_MAP[key]);
let value = _.cloneDeep(STATUS_MAP[key]);
// 保单详情key为“15”时特殊处理
if (key === "15") {
value = _.cloneDeep(STATUS_MAP["6"]);
}
if (["6", "7", "8", "9"].includes(key)) {
value.title = value.title.replace("${title}", policy?.refundInfo?.amount || "-");
......
......@@ -76,6 +76,7 @@
import _ from "lodash";
import GOODS_LIST from "@/api/goodsList.mock";
import { getPolicyList } from "@/api/policy";
import settings from "@/api/settings";
import policyStatusMixin from "../mixin/policyStatus.mixin";
import detailPayMixin from "@/views/Goods/Detail/modules/detailPay.mixin";
......@@ -137,8 +138,9 @@ export default {
orderNo: item?.orderNo
};
this.goPay();
// eslint-disable-next-line
} else if (text === "联系客服") {}
} else if (text === "联系客服") {
window.location.href = settings.sobot;
}
},
goDetail(orderNo) {
const policy = this.list.find(v => v.orderNo === orderNo);
......
......@@ -3,6 +3,7 @@
.family {
box-sizing: border-box;
padding: 28px 16px 0;
width: 100%;
height: 100%;
background: #F6F6F6;
......
......@@ -48,7 +48,7 @@
/>
</cr-field>
</div>
<cr-button class="family-form-button_confirm" native-type="submit" v-if="isShowSub">
<cr-button class="family-form-button_confirm" native-type="submit">
{{ saveText }}
</cr-button>
<cr-button class="family-form-button_deleted" @click="modal.delete = true" v-if="isShowDel">
......@@ -185,7 +185,7 @@ export default {
...{
name: true,
idNo: true,
socialSecurity: true
socialSecurity: false
}
};
}
......@@ -196,13 +196,11 @@ export default {
},
isShowDel() {
return this.type === "update" && this.formData.relation !== "本人" ? true : false;
},
isShowSub() {
return this.type === "add" || this.formData.relation !== "本人" ? true : false;
}
},
watch: {
information(value) {
console.log(value);
this.formData = _.cloneDeep(value);
}
},
......
......@@ -3,6 +3,7 @@
.help-center {
overflow: hidden;
height: 100%;
width: 100%;
background: #FFC842;
&-head {
display: flex;
......
@import "../../style/index.less";
.user {
width: 100%;
overflow: hidden;
background-color: @user-background-color;
&-info {
......
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