Commit 83a67b48 authored by 郝聪敏's avatar 郝聪敏

fix: 缴费记录支持多条退款记录、应退金额替换字段

parent 9a0a4f88
NODE_ENV = 'development'
ENVIRONMENT = 'development'
\ No newline at end of file
NODE_ENV=devtest NODE_ENV = 'production'
\ No newline at end of file ENVIRONMENT = 'devtest'
\ No newline at end of file
NODE_ENV = 'production'
ENVIRONMENT = 'production'
\ No newline at end of file
This diff is collapsed.
...@@ -29,12 +29,23 @@ ...@@ -29,12 +29,23 @@
// ! 上线需要删掉 // ! 上线需要删掉
var baseUrl = ""; var baseUrl = "";
</script> </script>
<style>
#app .mainload{
margin-top:180px;
text-align: center;
font-size:18px;
}
</style>
</head> </head>
<body> <body>
<noscript> <noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript> </noscript>
<div id="app"></div> <div id="app">
<div class="mainload">
<p>加载中...</p>
</div>
</div>
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
</body> </body>
</html> </html>
import prod from "./prod.config"; import prod from "./prod.config";
import dev from "./dev.config"; import dev from "./dev.config";
export default process.env.NODE_ENV === "development" ? dev : prod; export default process.env.NODE_ENV === "production" ? prod : dev;
...@@ -24,7 +24,7 @@ new Vue({ ...@@ -24,7 +24,7 @@ new Vue({
// 初始化sentry // 初始化sentry
Raven.config("https://1dc603dd7c09468793aa003ab0bf9480@sentry.q-gp.com/57", { Raven.config("https://1dc603dd7c09468793aa003ab0bf9480@sentry.q-gp.com/57", {
release, release,
environment: process.env.NODE_ENV environment: process.env.ENVIRONMENT
}) })
.addPlugin(RavenVue, Vue) .addPlugin(RavenVue, Vue)
.install(); .install();
......
...@@ -75,6 +75,16 @@ function setTitle(title, path, query) { ...@@ -75,6 +75,16 @@ function setTitle(title, path, query) {
title = goods.title; title = goods.title;
} }
document.title = title; document.title = title;
// 如果是 iOS 设备,则使用如下 hack 的写法实现页面标题的更新
if (navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)) {
const hackIframe = document.createElement("iframe");
hackIframe.style.display = "none";
hackIframe.src = "/public/fixIosTitle.html?r=" + Math.random();
document.body.appendChild(hackIframe);
setTimeout(() => {
document.body.removeChild(hackIframe);
}, 300);
}
} }
export default router; export default router;
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<div class="Rcpc-body-opera"> <div class="Rcpc-body-opera">
<p class="Rcpcb-opera-left"> <p class="Rcpcb-opera-left">
<span>{{ `¥${item.price}` }}</span <span>{{ `¥${item.price}` }}</span
>{{ item.unit }} >{{ item.unit | unit }}
</p> </p>
<cr-button class="Rcpcb-opera-right" @click="goDetail(item)"> <cr-button class="Rcpcb-opera-right" @click="goDetail(item)">
去投保 去投保
...@@ -176,6 +176,11 @@ export default { ...@@ -176,6 +176,11 @@ export default {
}); });
}); });
} }
},
filters: {
unit: value => {
return value === "年起" ? " / 年起" : ` ${value}`;
}
} }
}; };
</script> </script>
......
...@@ -107,7 +107,7 @@ export default { ...@@ -107,7 +107,7 @@ export default {
result = { result = {
titelText: `共缴纳${this.record.totalPaidAmount}`, titelText: `共缴纳${this.record.totalPaidAmount}`,
refundTimeText: "保障已终止", refundTimeText: "保障已终止",
amount: `${this.record?.nextTermAmount || 0}`, amount: `${this.record?.refundAmount || 0}`,
amountText: "应退金额", amountText: "应退金额",
termText: `${this.record.paidTerm}/${this.record.totalTerm}期`, termText: `${this.record.paidTerm}/${this.record.totalTerm}期`,
delayTerm: `${this.record.delayTerm}期` delayTerm: `${this.record.delayTerm}期`
...@@ -118,7 +118,7 @@ export default { ...@@ -118,7 +118,7 @@ export default {
}, },
getTermList() { getTermList() {
const status = this.$route.params.status; const status = this.$route.params.status;
const list = let list =
this.record?.recordTerm?.map(v => ({ this.record?.recordTerm?.map(v => ({
termNoText: this.record?.payPeriod === 1 ? `第${v.termNo}期保费` : "1年保费", termNoText: this.record?.payPeriod === 1 ? `第${v.termNo}期保费` : "1年保费",
recordDate: v.recordDate, recordDate: v.recordDate,
...@@ -128,22 +128,24 @@ export default { ...@@ -128,22 +128,24 @@ export default {
})) || []; })) || [];
if (["9-5", "9-6"].includes(status) && this.record?.refundRecord) { if (["9-5", "9-6"].includes(status) && this.record?.refundRecord) {
list.unshift({ const refundRecordList = this.record?.refundRecord.map(refundRecord => ({
termNoText: termNoText:
this.record?.refundRecord?.currentState === 2 refundRecord?.currentState === 2
? "退款中" ? "退款中"
: this.record?.refundRecord?.currentState === 3 : refundRecord?.currentState === 3
? "退款成功" ? "退款成功"
: "-", : "-",
recordDate: this.record?.refundRecord?.payTime || "-", recordDate: refundRecord?.payTime || "-",
amountText: `${this.record?.refundRecord?.amount}`, amountText: `${refundRecord?.amount}`,
payStatusText: payStatusText:
this.record?.refundRecord?.currentState === 2 refundRecord?.currentState === 2
? "应退金额" ? "应退金额"
: this.record?.refundRecord?.currentState === 3 : refundRecord?.currentState === 3
? "已退金额" ? "已退金额"
: "-" : "-"
}); }));
list = [...refundRecordList, ...list];
} }
this.termList = list; this.termList = list;
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<script> <script>
import pdf from "vue-pdf"; import pdf from "vue-pdf";
import config from "@/config";
import { mapActions } from "vuex"; import { mapActions } from "vuex";
let CMAP_URL = "https://cdn.jsdelivr.net/npm/pdfjs-dist@2.5.207/cmaps/"; let CMAP_URL = "https://cdn.jsdelivr.net/npm/pdfjs-dist@2.5.207/cmaps/";
...@@ -27,7 +28,8 @@ export default { ...@@ -27,7 +28,8 @@ export default {
methods: { methods: {
...mapActions(["setIsLoading"]), ...mapActions(["setIsLoading"]),
setDetail() { setDetail() {
const { url } = this.$route.query; let { url } = this.$route.query;
if (!url?.startsWith("http")) url = `${config.basicHost}${url}`;
this.setIsLoading(true); this.setIsLoading(true);
if (!url) this.$router.back(); if (!url) this.$router.back();
this.url = url; this.url = url;
......
const path = require("path"); const path = require("path");
const resolve = dir => path.join(__dirname, dir); const resolve = dir => path.join(__dirname, dir);
const SentryPlugin = require("webpack-sentry-plugin"); const SentryPlugin = require("webpack-sentry-plugin");
const CompressionPlugin = require("compression-webpack-plugin");
const SentryConfig = require("./.sentryclirc"); const SentryConfig = require("./.sentryclirc");
const IS_PROD = process.env.NODE_ENV === "production"; const IS_PROD = process.env.NODE_ENV === "production";
...@@ -84,11 +85,17 @@ module.exports = { ...@@ -84,11 +85,17 @@ module.exports = {
config.optimization.runtimeChunk("single"); config.optimization.runtimeChunk("single");
return config; return config;
}, },
configureWebpack: { configureWebpack: config => {
plugins: [new SentryPlugin(SentryConfig)], config.plugins.push(new SentryPlugin(SentryConfig));
output: { if (IS_PROD) {
filename: `js/[name].[${IS_PROD ? "chunk" : ""}hash:5].js`, config.plugins.push(
chunkFilename: `js/[name].[${IS_PROD ? "chunk" : ""}hash:5].js` new CompressionPlugin({
test: /\.js$|\.html$|\.css$|\.jpg$|\.jpeg$|\.png/, // 需要压缩的文件类型
threshold: 10240, // 归档需要进行压缩的文件大小最小值,我这个是10K以上的进行压缩
deleteOriginalAssets: false, // 是否删除原文件
minRatio: 0.8
})
);
} }
}, },
lintOnSave: true, lintOnSave: true,
......
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