Commit 4210c87c authored by 郝聪敏's avatar 郝聪敏

Merge branch 'feature/fix_record' into 'master'

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

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