Compare commits

..

No commits in common. "52d8f2874ff4f835de55848365683b214ef41fdc" and "d13add7f3a0b1f475bca4f6a62dc6809e923da7b" have entirely different histories.

7 changed files with 155 additions and 352 deletions

View File

@ -24,7 +24,7 @@ const route = useRoute()
//
onMounted(() => {
// getGlobalNotify()
getGlobalNotify()
})
//

View File

@ -1,87 +0,0 @@
<script setup>
import LTitle from "@/components/LTitle.vue";
const props = defineProps({
data: {
type: Object,
required: true,
},
});
const { data } = props;
//
const statusMap = {
0: {
text: "未婚或尚未登记结婚",
bgClass: "bg-yellow-100",
textClass: "text-yellow-700",
description: "未进行民政登记婚姻",
},
1: {
text: "已婚",
bgClass: "bg-green-100",
textClass: "text-green-700",
description: "已登记婚姻,家庭幸福美满",
},
2: {
text: "离异",
bgClass: "bg-red-100",
textClass: "text-red-700",
description: "离异状态,未来生活可期",
},
3: {
text: "离婚冷静期",
bgClass: "bg-blue-100",
textClass: "text-blue-700",
description: "目前处于离婚冷静期,请谨慎决策",
},
};
// `data.status`
const currentStatus =
data.status !== undefined
? statusMap[data.status] || statusMap["0"]
: {
text: "无相关记录",
bgClass: "bg-gray-200",
textClass: "text-gray-500",
description: "暂无婚姻相关记录",
};
</script>
<template>
<div class="card">
<div class="status-info flex flex-col items-center ">
<div
:class="`status-label rounded-full px-6 py-3 text-center font-bold shadow-md ${currentStatus.bgClass} ${currentStatus.textClass}`">
{{ currentStatus.text }}
</div>
<p class="status-description mt-3 text-sm text-gray-600">
{{ currentStatus.description }}
</p>
</div>
</div>
</template>
<style lang="scss" scoped>
.status-info {
text-align: center;
}
.status-label {
font-size: 1.25rem;
padding: 0.75rem 1.5rem;
border-radius: 9999px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.status-description {
color: #4a5568;
margin-top: 0.5rem;
font-weight: 500;
}
.additional-info p {
margin-top: 0.5rem;
}
</style>

View File

@ -50,9 +50,7 @@ const currentStatus =
text: "暂无相关婚姻记录",
bgClass: "bg-gray-200",
textClass: "text-gray-500",
// description: "<br />1. <br />2. 30退26.8",
description: "暂无婚姻相关记录",
description: "由于民政部门系统正在升级,当前查询功能暂未恢复。<br />1. 当系统恢复查询功能时,我们将第一时间更新报告(您可以在我的历史查询记录中查看),并通过短信通知您。<br />2. 如果30个工作日内未能查询到相关信息我们承诺将为您退款26.8元的婚姻状态查询费用。",
} : {
text: "无相关记录",
bgClass: "bg-gray-200",

View File

@ -43,10 +43,6 @@ const featureMap = {
name: '企业涉诉',
component: defineAsyncComponent(() => import('@/ui/CLawsuit.vue')),
},
G22SC01: {
name: '司法涉诉',
component: defineAsyncComponent(() => import('@/ui/CLawsuitPP.vue')),
},
G15BJ02: {
name: '手机三要素',
component: defineAsyncComponent(() => import('@/ui/CPhoneThreeElements.vue')),
@ -90,12 +86,7 @@ const featureMap = {
CAR061: {
name: '名下车辆',
component: defineAsyncComponent(() => import('@/ui/CCAR061.vue')),
},
IDV044: {
name: '婚姻状态',
component: defineAsyncComponent(() => import('@/ui/CIDV044.vue')),
remark: '查询结果为"未婚或尚未登记结婚"时,表示婚姻登记处暂无相关的登记记录。婚姻状态信息由婚姻登记处逐级上报,可能存在数据遗漏或更新滞后。当前可查询的婚姻状态包括:未婚或尚未登记结婚、已婚、离异、离异冷静期。如您对查询结果有疑问,请联系客服反馈。'
},
}
};
@ -104,7 +95,7 @@ import LRemark from "@/components/LRemark.vue";
const productId = ref(null);
const isDone = ref(false);
const isDone = ref(true);
const active = ref(null)
const reportData = ref([])
@ -113,9 +104,9 @@ const reportName = ref("")
const reportDateTime = ref(null)
const feature = ref("")
const isEmpty = ref(false)
const reportScore = ref(0); //
const reportScore = ref(75); //
onBeforeMount(() => {
onMounted(() => {
const query = new URLSearchParams(window.location.search);
feature.value = query.get("feature");
console.log("feature", feature.value)
@ -146,7 +137,6 @@ const getReport = async () => {
} else if (data.value.code === 200003) {
isEmpty.value = true
}
isDone.value = true
}
}
const maskValue = computed(() => {
@ -201,12 +191,12 @@ const maskValue = computed(() => {
//
const calculateScore = (reportData) => {
// 00
// 0
let score = 0;
// 9090
// 90
const maxScore = 90;
//
//
const relativeWeights = {
//
'G34BJ03': 250, //
@ -237,7 +227,7 @@ const calculateScore = (reportData) => {
const availableAPIs = reportData.map(item => item.data.apiID).filter(id => relativeWeights[id]);
//
if (availableAPIs.length === 0) return 30; // 30
if (availableAPIs.length === 0) return 60; // 60
//
let totalWeight = 0;
@ -255,7 +245,7 @@ const calculateScore = (reportData) => {
actualWeights[apiID] = relativeWeights[apiID] * pointValue;
});
// -
//
reportData.forEach(item => {
const apiID = item.data.apiID;
const data = item.data.data;
@ -263,7 +253,7 @@ const calculateScore = (reportData) => {
//
if (!actualWeights[apiID]) return;
// API ID
// API ID
switch (apiID) {
case 'G09SC02': //
//
@ -271,58 +261,61 @@ const calculateScore = (reportData) => {
case 'G27BJ05': //
if (data) {
//
let hasRisk = false;
// 0
let noRisk = true;
for (const key in data) {
if (data[key] !== 0 && data[key] !== '0' &&
key.indexOf('allnum') > -1 &&
!isNaN(parseInt(data[key])) &&
parseInt(data[key]) > 0) {
hasRisk = true;
if (data[key] !== 0 && data[key] !== '0') {
noRisk = false;
break;
}
}
if (hasRisk) {
if (noRisk || !Object.keys(data).length) {
score += actualWeights[apiID];
}
} else {
//
score += actualWeights[apiID];
}
break;
case 'G28BJ05': //
if (data) {
//
let hasRisk = false;
// 0
let noRisk = true;
for (const key in data) {
if (data[key] !== 0 && data[key] !== '0' &&
(key.indexOf('lendamt') > -1 || key.indexOf('num') > -1) &&
!isNaN(parseInt(data[key])) &&
parseInt(data[key]) > 0) {
hasRisk = true;
if (data[key] !== 0 && data[key] !== '0') {
noRisk = false;
break;
}
}
if (hasRisk) {
if (noRisk || !Object.keys(data).length) {
score += actualWeights[apiID];
}
} else {
//
score += actualWeights[apiID];
}
break;
case 'G26BJ05': //
if (data) {
//
// 0
const excludeFields = ['swift_number', 'code', 'flag_specialList_c'];
let hasRisk = false;
let noRisk = true;
for (const key in data) {
if (!excludeFields.includes(key) && data[key] !== 0 && data[key] !== '0') {
hasRisk = true;
noRisk = false;
break;
}
}
if (hasRisk) {
if (noRisk || !Object.keys(data).length) {
score += actualWeights[apiID];
}
} else {
//
score += actualWeights[apiID];
}
break;
@ -331,20 +324,23 @@ const calculateScore = (reportData) => {
//
switch (data.risk_level) {
case 'A': //
//
score += actualWeights[apiID];
break;
case 'F': //
score += actualWeights[apiID] * 0.3;
score += actualWeights[apiID] * 0.7;
break;
case 'C': //
case 'D': //
score += actualWeights[apiID] * 0.7;
score += actualWeights[apiID] * 0.3;
break;
case 'B': //
case 'E': //
score += actualWeights[apiID];
//
break;
}
} else {
//
score += actualWeights[apiID];
}
break;
@ -379,9 +375,12 @@ const calculateScore = (reportData) => {
hasRisk = true;
}
if (hasRisk) {
if (!hasRisk) {
score += actualWeights[apiID];
}
} else {
//
score += actualWeights[apiID];
}
break;
@ -390,29 +389,38 @@ const calculateScore = (reportData) => {
// filterType
switch (data.filterType) {
case '0': //
//
break;
case '3': //
score += actualWeights[apiID] * 0.3;
break;
case '2': //
score += actualWeights[apiID] * 0.7;
break;
case '1': //
score += actualWeights[apiID];
break;
case '3': //
score += actualWeights[apiID] * 0.7;
break;
case '2': //
score += actualWeights[apiID] * 0.3;
break;
case '1': //
//
break;
}
} else {
//
score += actualWeights[apiID];
}
break;
case 'G19BJ02': //
if (data && data.is_second_card === true) {
if (data && data.is_second_card === false) {
score += actualWeights[apiID];
} else if (!data) {
//
score += actualWeights[apiID];
}
break;
case 'G02BJ02': //
if (data && data.online_months < 6) {
if (data && data.online_months >= 6) {
score += actualWeights[apiID];
} else if (!data) {
//
score += actualWeights[apiID];
}
break;
@ -421,13 +429,19 @@ const calculateScore = (reportData) => {
case 'G17BJ02': //
case 'KZEYS': //
case 'G20GZ01': //
if (data && data.is_consistent === false) {
if (data && data.is_consistent) {
score += actualWeights[apiID];
} else if (!data) {
//
score += actualWeights[apiID];
}
break;
case 'FIN019': //
if (data && data.is_blacklisted === true) {
if (data && data.is_blacklisted === false) {
score += actualWeights[apiID];
} else if (!data) {
//
score += actualWeights[apiID];
}
break;
@ -581,14 +595,13 @@ const calculateScore = (reportData) => {
</div>
<LRemark content="如查询的姓名/身份证与运营商提供的不一致,可能会存在报告内容不匹配的情况" />
</van-tab>
<van-tab v-for="(item, index) in reportData" :key="index"
:title="featureMap[item.data.apiID]?.name">
<div id="lawsuit" class="title mb-4">{{ featureMap[item.data.apiID]?.name }}</div>
<component :is="featureMap[item.data.apiID]?.component" :data="item.data.data"
<van-tab v-for="(item, index) in reportData" :key="index" :title="featureMap[item.data.apiID].name">
<div id="lawsuit" class="title mb-4">{{ featureMap[item.data.apiID].name }}</div>
<component :is="featureMap[item.data.apiID].component" :data="item.data.data"
:params="reportParams">
</component>
<LRemark v-if="featureMap[item.data.apiID]?.remark"
:content="featureMap[item.data.apiID]?.remark" />
<LRemark v-if="featureMap[item.data.apiID].remark"
:content="featureMap[item.data.apiID].remark" />
</van-tab>
<div class="card">
<div>

View File

@ -86,12 +86,7 @@ const featureMap = {
CAR061: {
name: '名下车辆',
component: defineAsyncComponent(() => import('@/ui/CCAR061.vue')),
},
IDV044: {
name: '婚姻状态',
component: defineAsyncComponent(() => import('@/ui/CIDV044.vue')),
remark: '查询结果为"未婚或尚未登记结婚"时,表示婚姻登记处暂无相关的登记记录。婚姻状态信息由婚姻登记处逐级上报,可能存在数据遗漏或更新滞后。当前可查询的婚姻状态包括:未婚或尚未登记结婚、已婚、离异、离异冷静期。如您对查询结果有疑问,请联系客服反馈。'
},
}
};
@ -101,7 +96,7 @@ import LTitle from "@/components/LTitle.vue";
const route = useRoute();
const productId = ref(null);
const isDone = ref(false);
const isDone = ref(true);
const active = ref(null)
const reportData = ref([])
const reportParams = ref({})
@ -111,8 +106,7 @@ const orderId = ref(null);
const orderNo = ref("")
const isEmpty = ref(false)
const isPending = ref(false)
const reportScore = ref(0)
onBeforeMount(() => {
onMounted(() => {
const query = new URLSearchParams(window.location.search);
orderNo.value = query.get("out_trade_no");
orderId.value = query.get("order_id");
@ -127,12 +121,12 @@ onBeforeMount(() => {
//
const calculateScore = (reportData) => {
// 00
// 0
let score = 0;
// 9090
// 90
const maxScore = 90;
//
//
const relativeWeights = {
//
'G34BJ03': 250, //
@ -163,7 +157,7 @@ const calculateScore = (reportData) => {
const availableAPIs = reportData.map(item => item.data.apiID).filter(id => relativeWeights[id]);
//
if (availableAPIs.length === 0) return 30; // 30
if (availableAPIs.length === 0) return 60; // 60
//
let totalWeight = 0;
@ -181,7 +175,7 @@ const calculateScore = (reportData) => {
actualWeights[apiID] = relativeWeights[apiID] * pointValue;
});
// -
//
reportData.forEach(item => {
const apiID = item.data.apiID;
const data = item.data.data;
@ -189,7 +183,7 @@ const calculateScore = (reportData) => {
//
if (!actualWeights[apiID]) return;
// API ID
// API ID
switch (apiID) {
case 'G09SC02': //
//
@ -197,58 +191,61 @@ const calculateScore = (reportData) => {
case 'G27BJ05': //
if (data) {
//
let hasRisk = false;
// 0
let noRisk = true;
for (const key in data) {
if (data[key] !== 0 && data[key] !== '0' &&
key.indexOf('allnum') > -1 &&
!isNaN(parseInt(data[key])) &&
parseInt(data[key]) > 0) {
hasRisk = true;
if (data[key] !== 0 && data[key] !== '0') {
noRisk = false;
break;
}
}
if (hasRisk) {
if (noRisk || !Object.keys(data).length) {
score += actualWeights[apiID];
}
} else {
//
score += actualWeights[apiID];
}
break;
case 'G28BJ05': //
if (data) {
//
let hasRisk = false;
// 0
let noRisk = true;
for (const key in data) {
if (data[key] !== 0 && data[key] !== '0' &&
(key.indexOf('lendamt') > -1 || key.indexOf('num') > -1) &&
!isNaN(parseInt(data[key])) &&
parseInt(data[key]) > 0) {
hasRisk = true;
if (data[key] !== 0 && data[key] !== '0') {
noRisk = false;
break;
}
}
if (hasRisk) {
if (noRisk || !Object.keys(data).length) {
score += actualWeights[apiID];
}
} else {
//
score += actualWeights[apiID];
}
break;
case 'G26BJ05': //
if (data) {
//
// 0
const excludeFields = ['swift_number', 'code', 'flag_specialList_c'];
let hasRisk = false;
let noRisk = true;
for (const key in data) {
if (!excludeFields.includes(key) && data[key] !== 0 && data[key] !== '0') {
hasRisk = true;
noRisk = false;
break;
}
}
if (hasRisk) {
if (noRisk || !Object.keys(data).length) {
score += actualWeights[apiID];
}
} else {
//
score += actualWeights[apiID];
}
break;
@ -257,20 +254,23 @@ const calculateScore = (reportData) => {
//
switch (data.risk_level) {
case 'A': //
//
score += actualWeights[apiID];
break;
case 'F': //
score += actualWeights[apiID] * 0.3;
score += actualWeights[apiID] * 0.7;
break;
case 'C': //
case 'D': //
score += actualWeights[apiID] * 0.7;
score += actualWeights[apiID] * 0.3;
break;
case 'B': //
case 'E': //
score += actualWeights[apiID];
//
break;
}
} else {
//
score += actualWeights[apiID];
}
break;
@ -305,9 +305,12 @@ const calculateScore = (reportData) => {
hasRisk = true;
}
if (hasRisk) {
if (!hasRisk) {
score += actualWeights[apiID];
}
} else {
//
score += actualWeights[apiID];
}
break;
@ -316,29 +319,38 @@ const calculateScore = (reportData) => {
// filterType
switch (data.filterType) {
case '0': //
//
break;
case '3': //
score += actualWeights[apiID] * 0.3;
break;
case '2': //
score += actualWeights[apiID] * 0.7;
break;
case '1': //
score += actualWeights[apiID];
break;
case '3': //
score += actualWeights[apiID] * 0.7;
break;
case '2': //
score += actualWeights[apiID] * 0.3;
break;
case '1': //
//
break;
}
} else {
//
score += actualWeights[apiID];
}
break;
case 'G19BJ02': //
if (data && data.is_second_card === true) {
if (data && data.is_second_card === false) {
score += actualWeights[apiID];
} else if (!data) {
//
score += actualWeights[apiID];
}
break;
case 'G02BJ02': //
if (data && data.online_months < 6) {
if (data && data.online_months >= 6) {
score += actualWeights[apiID];
} else if (!data) {
//
score += actualWeights[apiID];
}
break;
@ -347,13 +359,19 @@ const calculateScore = (reportData) => {
case 'G17BJ02': //
case 'KZEYS': //
case 'G20GZ01': //
if (data && data.is_consistent === false) {
if (data && data.is_consistent) {
score += actualWeights[apiID];
} else if (!data) {
//
score += actualWeights[apiID];
}
break;
case 'FIN019': //
if (data && data.is_blacklisted === true) {
if (data && data.is_blacklisted === false) {
score += actualWeights[apiID];
} else if (!data) {
//
score += actualWeights[apiID];
}
break;
@ -399,8 +417,6 @@ const getReport = async () => {
} else if (data.value.code === 200002) {
isPending.value = true
}
isDone.value = true
}
}
//
@ -605,14 +621,13 @@ const maskValue = computed(() => {
</van-tab>
</template>
<LPendding v-if="isPending" />
<van-tab v-for="(item, index) in reportData" :key="index"
:title="featureMap[item.data.apiID]?.name">
<div id="lawsuit" class="title mb-4">{{ featureMap[item.data.apiID]?.name }}</div>
<component :is="featureMap[item.data.apiID]?.component" :data="item.data.data"
<van-tab v-for="(item, index) in reportData" :key="index" :title="featureMap[item.data.apiID].name">
<div id="lawsuit" class="title mb-4">{{ featureMap[item.data.apiID].name }}</div>
<component :is="featureMap[item.data.apiID].component" :data="item.data.data"
:params="reportParams" :isMerriageProduct="item.data.apiID === 'G09SC02'">
</component>
<LRemark v-if="featureMap[item.data.apiID]?.remark"
:content="featureMap[item.data.apiID]?.remark" />
<LRemark v-if="featureMap[item.data.apiID].remark"
:content="featureMap[item.data.apiID].remark" />
</van-tab>
<div class="card">
<div>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long