Commit 13354185 authored by 郝聪敏's avatar 郝聪敏

Merge branch 'feature/fix_cursor' into 'master'

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

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