Commit 713449c9 authored by 郝聪敏's avatar 郝聪敏

fix: 修复删除光标位置异常、家人位置关系修改、立即缴费异常等bug

parent 6bf7420c
NODE_ENV=devtest
\ No newline at end of file
module.exports = {
// Sentry options are required
organization: 'sentry',
project: 'mongo-ui',
apiKey: '2e7e0678d81d4542b09cdbc35812f1cbb07a4993cd13435ba49d9511be11ec95',
// Release version name/hash is required
release: 'mongo-ui@0.0.1',
baseSentryURL: 'http://sentry.quantgroups.com/api/0',
deleteAfterCompile: true,
include: /js\//, // 只上传js和map文件
ignore: ['node_modules'],
suppressErrors: true,
filenameTransform: function (filename) {
return '~/' + filename
},
}
......@@ -5,19 +5,21 @@
"scripts": {
"serve": "vue-cli-service serve --open",
"build": "vue-cli-service build",
"build:devtest": "vue-cli-service build --mode devtest",
"report": "vue-cli-service build --report",
"release": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"@better-scroll/core": "^2.0.0-beta.6",
"@qg/cherry-ui": "=1.2.1",
"@qg/cherry-ui": "^1.2.3",
"@qg/qg-scroll": "^1.4.2",
"amfe-flexible": "^2.2.1",
"axios": "^0.19.2",
"core-js": "^3.6.5",
"date-fns": "^2.15.0",
"lodash": "^4.17.19",
"raven-js": "^3.27.2",
"sa-sdk-javascript": "^1.15.16",
"vant": "^2.10.2",
"vconsole": "^3.3.4",
......@@ -45,7 +47,8 @@
"postcss-px2rem": "^0.3.0",
"prettier": "^1.19.1",
"svg-sprite-loader": "^5.0.0",
"vue-template-compiler": "^2.6.11"
"vue-template-compiler": "^2.6.11",
"webpack-sentry-plugin": "^1.16.0"
},
"lint-staged": {
"src/**/*.{js,vue}": [
......
import prod from "./prod.config";
import dev from "./dev.config";
export default process.env.NODE_ENV === "production" ? prod : dev;
export default process.env.NODE_ENV === "development" ? dev : prod;
......@@ -9,7 +9,10 @@ import vConsole from "vconsole";
import sa from "sa-sdk-javascript";
import "@/assets/icons/index";
import "@/service/cherry-ui";
import Raven from "raven-js";
import RavenVue from "raven-js/plugins/vue";
import config from "@/config";
import { release } from "../.sentryclirc";
Vue.config.productionTip = false;
new Vue({
......@@ -18,7 +21,15 @@ new Vue({
render: h => h(App)
}).$mount("#app");
// 初始化
// 初始化sentry
Raven.config("https://1dc603dd7c09468793aa003ab0bf9480@sentry.quantgroups.com/57", {
release,
environment: process.env.NODE_ENV
})
.addPlugin(RavenVue, Vue)
.install();
// 初始化神策
sa.init({
server_url: config.shenceUrl,
heatmap: {
......
......@@ -36,15 +36,15 @@ router.beforeEach((to, from, next) => {
});
// 路由异常错误处理,尝试解析一个异步组件时发生错误,重新渲染目标页面
// router.onError(error => {
// console.log("router error:", error.message);
// const pattern = /Loading chunk (\d)+ failed/g;
// const isChunkLoadFailed = error.message.match(pattern);
// const targetPath = router.history.pending.fullPath;
// if (isChunkLoadFailed) {
// router.replace(targetPath);
// }
// });
router.onError(error => {
console.log("router error:", error.message);
const pattern = /Loading chunk (\d)+ failed/g;
const isChunkLoadFailed = error.message.match(pattern);
const targetPath = router.history.pending.fullPath;
if (isChunkLoadFailed) {
router.replace(targetPath);
}
});
async function getAuthInfo(xyqbToken) {
if (localStorage.get("xyqbToken")) return;
......
......@@ -11,7 +11,7 @@ const CONSTANT = {
man,
woman
},
relation: ["本人", "父母", "配偶", "子女"]
relation: ["本人", "父母", "配偶", "子女", "未知"]
};
// 0: man; 1: woman
......@@ -23,6 +23,8 @@ function getReletion(relation, gender) {
} else {
result = +gender === 0 ? "女儿" : "儿子";
}
} else if (+relation === -1) {
result = CONSTANT.relation[4];
} else {
result = CONSTANT.relation[+relation - 1];
}
......
......@@ -321,19 +321,21 @@
display: flex;
// justify-content: space-around;
box-sizing: border-box;
padding: 0 16px;
padding: 13px 16px;
align-items: center;
width: 100%;
height: 50px;
// height: 50px;
background: #F6F7FA;
border-radius: 14px;
span:first-child {
width: 55px;
margin-right: 10px;
width: 70px;
font-size: 14px;
font-weight: 500;
color: #333333;
line-height: 24px;
word-break: break-all;
}
span:last-child {
......
......@@ -40,7 +40,7 @@ export default {
type: Object,
default: () => ({
title: "",
button: "立即缴费"
button: ""
})
},
payInfo: {
......@@ -79,7 +79,7 @@ export default {
},
methods: {
goNext() {
if (this.statusKey === "4") {
if (["2", "4"].includes(this.statusKey)) {
this.orderInfo = this.payInfo;
this.goPay();
} else {
......
......@@ -17,7 +17,11 @@ const statusMap = {
buttons: ["去支付", "电子保单"],
detailText: "",
recordText: "保单已欠费,欠缴${money}元",
component: "Guarantee"
component: "Guarantee",
payCostConfig: {
title: "",
button: "立即缴费"
}
},
"3": {
status: ["6.1-3"],
......
<template>
<div class="user-family">
<p class="family-title">{{ title }}</p>
<cr-form ref="form" class="family-form" @submit="modal.confirm = true" @failed="onFailed">
<cr-form ref="form" class="family-form" @submit="showModal" @failed="onFailed">
<cr-field
class="family-form-item"
v-model="formData.name"
......@@ -188,6 +188,11 @@ export default {
socialSecurity: false
}
};
} else if (this.formData?.relation === "未知") {
result = {
...result,
relation: false
};
}
return result;
},
......@@ -214,6 +219,7 @@ export default {
idNo: this.formData?.idNo,
relation: this.getReletion(this.formData?.relation)
};
// 转换参数类型
if (this.formData?.socialSecurity !== "") {
params.socialSecurity = this.formData?.socialSecurity === "true" ? true : false;
......@@ -245,7 +251,6 @@ export default {
});
},
async delFamily() {
console.log(this.information);
this.modal.delete = false;
await delFamily({ userInfoSecId: this.information?.userInfoSecId });
this.$router.push("/user/family");
......@@ -264,6 +269,13 @@ export default {
}
return result;
},
showModal() {
if (this.formData?.relation === "未知") {
this.$notify({ type: "warning", message: "请选择与本人的关系" });
return;
}
this.modal.confirm = true;
}
}
};
......
......@@ -103,13 +103,14 @@ export default {
},
methods: {
go(path, params) {
let pathObj = "";
if (path === "/goods/detail" && params) {
let [userInfoSecId, relation] = ["", ""];
if (this.familyList && this.familyList.length) {
userInfoSecId = this.familyList[this.activeIndex].userInfoSecId;
relation = this.familyList[this.activeIndex].relation;
}
path = {
pathObj = {
path,
query: { id: params.id, type: params.itype }
};
......@@ -117,9 +118,12 @@ export default {
sessionStorage.setItem(params.itype + "userInfoSecId", userInfoSecId);
localStorage.remove(params.itype + "DetailFormData");
} else if (path === "/policy/detail" && params.orderNo) {
path = `${path}/${params.orderNo}`;
pathObj = `${path}/${params.orderNo}`;
}
if (pathObj) {
this.$emit("go", pathObj, false);
}
this.$emit("go", path);
}
}
};
......
const path = require("path");
const resolve = dir => path.join(__dirname, dir);
const SentryPlugin = require("webpack-sentry-plugin");
const SentryConfig = require("./.sentryclirc");
const IS_PROD = process.env.NODE_ENV === "production";
module.exports = {
......@@ -81,6 +83,10 @@ module.exports = {
config.optimization.runtimeChunk("single");
return config;
},
configureWebpack: config => {
// 添加sentry插件
config.plugins.push(new SentryPlugin(SentryConfig));
},
lintOnSave: true,
runtimeCompiler: false, // 是否使用包含运行时编译器的 Vue 构建版本
productionSourceMap: IS_PROD // 生产环境的 source map
......
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