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

View File

@ -43,10 +43,6 @@ const featureMap = {
name: '企业涉诉', name: '企业涉诉',
component: defineAsyncComponent(() => import('@/ui/CLawsuit.vue')), component: defineAsyncComponent(() => import('@/ui/CLawsuit.vue')),
}, },
G22SC01: {
name: '司法涉诉',
component: defineAsyncComponent(() => import('@/ui/CLawsuitPP.vue')),
},
G15BJ02: { G15BJ02: {
name: '手机三要素', name: '手机三要素',
component: defineAsyncComponent(() => import('@/ui/CPhoneThreeElements.vue')), component: defineAsyncComponent(() => import('@/ui/CPhoneThreeElements.vue')),
@ -90,12 +86,7 @@ const featureMap = {
CAR061: { CAR061: {
name: '名下车辆', name: '名下车辆',
component: defineAsyncComponent(() => import('@/ui/CCAR061.vue')), 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 productId = ref(null);
const isDone = ref(false); const isDone = ref(true);
const active = ref(null) const active = ref(null)
const reportData = ref([]) const reportData = ref([])
@ -113,9 +104,9 @@ const reportName = ref("")
const reportDateTime = ref(null) const reportDateTime = ref(null)
const feature = ref("") const feature = ref("")
const isEmpty = ref(false) const isEmpty = ref(false)
const reportScore = ref(0); // const reportScore = ref(75); //
onBeforeMount(() => { onMounted(() => {
const query = new URLSearchParams(window.location.search); const query = new URLSearchParams(window.location.search);
feature.value = query.get("feature"); feature.value = query.get("feature");
console.log("feature", feature.value) console.log("feature", feature.value)
@ -146,7 +137,6 @@ const getReport = async () => {
} else if (data.value.code === 200003) { } else if (data.value.code === 200003) {
isEmpty.value = true isEmpty.value = true
} }
isDone.value = true
} }
} }
const maskValue = computed(() => { const maskValue = computed(() => {
@ -201,12 +191,12 @@ const maskValue = computed(() => {
// //
const calculateScore = (reportData) => { const calculateScore = (reportData) => {
// 00 // 0
let score = 0; let score = 0;
// 9090 // 90
const maxScore = 90; const maxScore = 90;
// //
const relativeWeights = { const relativeWeights = {
// //
'G34BJ03': 250, // 'G34BJ03': 250, //
@ -237,7 +227,7 @@ const calculateScore = (reportData) => {
const availableAPIs = reportData.map(item => item.data.apiID).filter(id => relativeWeights[id]); 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; let totalWeight = 0;
@ -255,7 +245,7 @@ const calculateScore = (reportData) => {
actualWeights[apiID] = relativeWeights[apiID] * pointValue; actualWeights[apiID] = relativeWeights[apiID] * pointValue;
}); });
// - //
reportData.forEach(item => { reportData.forEach(item => {
const apiID = item.data.apiID; const apiID = item.data.apiID;
const data = item.data.data; const data = item.data.data;
@ -263,7 +253,7 @@ const calculateScore = (reportData) => {
// //
if (!actualWeights[apiID]) return; if (!actualWeights[apiID]) return;
// API ID // API ID
switch (apiID) { switch (apiID) {
case 'G09SC02': // case 'G09SC02': //
// //
@ -271,58 +261,61 @@ const calculateScore = (reportData) => {
case 'G27BJ05': // case 'G27BJ05': //
if (data) { if (data) {
// // 0
let hasRisk = false; let noRisk = true;
for (const key in data) { for (const key in data) {
if (data[key] !== 0 && data[key] !== '0' && if (data[key] !== 0 && data[key] !== '0') {
key.indexOf('allnum') > -1 && noRisk = false;
!isNaN(parseInt(data[key])) &&
parseInt(data[key]) > 0) {
hasRisk = true;
break; break;
} }
} }
if (hasRisk) { if (noRisk || !Object.keys(data).length) {
score += actualWeights[apiID]; score += actualWeights[apiID];
} }
} else {
//
score += actualWeights[apiID];
} }
break; break;
case 'G28BJ05': // case 'G28BJ05': //
if (data) { if (data) {
// // 0
let hasRisk = false; let noRisk = true;
for (const key in data) { for (const key in data) {
if (data[key] !== 0 && data[key] !== '0' && if (data[key] !== 0 && data[key] !== '0') {
(key.indexOf('lendamt') > -1 || key.indexOf('num') > -1) && noRisk = false;
!isNaN(parseInt(data[key])) &&
parseInt(data[key]) > 0) {
hasRisk = true;
break; break;
} }
} }
if (hasRisk) { if (noRisk || !Object.keys(data).length) {
score += actualWeights[apiID]; score += actualWeights[apiID];
} }
} else {
//
score += actualWeights[apiID];
} }
break; break;
case 'G26BJ05': // case 'G26BJ05': //
if (data) { if (data) {
// // 0
const excludeFields = ['swift_number', 'code', 'flag_specialList_c']; const excludeFields = ['swift_number', 'code', 'flag_specialList_c'];
let hasRisk = false; let noRisk = true;
for (const key in data) { for (const key in data) {
if (!excludeFields.includes(key) && data[key] !== 0 && data[key] !== '0') { if (!excludeFields.includes(key) && data[key] !== 0 && data[key] !== '0') {
hasRisk = true; noRisk = false;
break; break;
} }
} }
if (hasRisk) { if (noRisk || !Object.keys(data).length) {
score += actualWeights[apiID]; score += actualWeights[apiID];
} }
} else {
//
score += actualWeights[apiID];
} }
break; break;
@ -331,20 +324,23 @@ const calculateScore = (reportData) => {
// //
switch (data.risk_level) { switch (data.risk_level) {
case 'A': // case 'A': //
// score += actualWeights[apiID];
break; break;
case 'F': // case 'F': //
score += actualWeights[apiID] * 0.3; score += actualWeights[apiID] * 0.7;
break; break;
case 'C': // case 'C': //
case 'D': // case 'D': //
score += actualWeights[apiID] * 0.7; score += actualWeights[apiID] * 0.3;
break; break;
case 'B': // case 'B': //
case 'E': // case 'E': //
score += actualWeights[apiID]; //
break; break;
} }
} else {
//
score += actualWeights[apiID];
} }
break; break;
@ -379,9 +375,12 @@ const calculateScore = (reportData) => {
hasRisk = true; hasRisk = true;
} }
if (hasRisk) { if (!hasRisk) {
score += actualWeights[apiID]; score += actualWeights[apiID];
} }
} else {
//
score += actualWeights[apiID];
} }
break; break;
@ -390,29 +389,38 @@ const calculateScore = (reportData) => {
// filterType // filterType
switch (data.filterType) { switch (data.filterType) {
case '0': // case '0': //
//
break;
case '3': //
score += actualWeights[apiID] * 0.3;
break;
case '2': //
score += actualWeights[apiID] * 0.7;
break;
case '1': //
score += actualWeights[apiID]; score += actualWeights[apiID];
break; 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; break;
case 'G19BJ02': // 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]; score += actualWeights[apiID];
} }
break; break;
case 'G02BJ02': // case 'G02BJ02': //
if (data && data.online_months < 6) { if (data && data.online_months >= 6) {
score += actualWeights[apiID];
} else if (!data) {
//
score += actualWeights[apiID]; score += actualWeights[apiID];
} }
break; break;
@ -421,13 +429,19 @@ const calculateScore = (reportData) => {
case 'G17BJ02': // case 'G17BJ02': //
case 'KZEYS': // case 'KZEYS': //
case 'G20GZ01': // case 'G20GZ01': //
if (data && data.is_consistent === false) { if (data && data.is_consistent) {
score += actualWeights[apiID];
} else if (!data) {
//
score += actualWeights[apiID]; score += actualWeights[apiID];
} }
break; break;
case 'FIN019': // case 'FIN019': //
if (data && data.is_blacklisted === true) { if (data && data.is_blacklisted === false) {
score += actualWeights[apiID];
} else if (!data) {
//
score += actualWeights[apiID]; score += actualWeights[apiID];
} }
break; break;
@ -581,14 +595,13 @@ const calculateScore = (reportData) => {
</div> </div>
<LRemark content="如查询的姓名/身份证与运营商提供的不一致,可能会存在报告内容不匹配的情况" /> <LRemark content="如查询的姓名/身份证与运营商提供的不一致,可能会存在报告内容不匹配的情况" />
</van-tab> </van-tab>
<van-tab v-for="(item, index) in reportData" :key="index" <van-tab v-for="(item, index) in reportData" :key="index" :title="featureMap[item.data.apiID].name">
:title="featureMap[item.data.apiID]?.name"> <div id="lawsuit" class="title mb-4">{{ featureMap[item.data.apiID].name }}</div>
<div id="lawsuit" class="title mb-4">{{ featureMap[item.data.apiID]?.name }}</div> <component :is="featureMap[item.data.apiID].component" :data="item.data.data"
<component :is="featureMap[item.data.apiID]?.component" :data="item.data.data"
:params="reportParams"> :params="reportParams">
</component> </component>
<LRemark v-if="featureMap[item.data.apiID]?.remark" <LRemark v-if="featureMap[item.data.apiID].remark"
:content="featureMap[item.data.apiID]?.remark" /> :content="featureMap[item.data.apiID].remark" />
</van-tab> </van-tab>
<div class="card"> <div class="card">
<div> <div>

View File

@ -86,12 +86,7 @@ const featureMap = {
CAR061: { CAR061: {
name: '名下车辆', name: '名下车辆',
component: defineAsyncComponent(() => import('@/ui/CCAR061.vue')), 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 route = useRoute();
const productId = ref(null); const productId = ref(null);
const isDone = ref(false); const isDone = ref(true);
const active = ref(null) const active = ref(null)
const reportData = ref([]) const reportData = ref([])
const reportParams = ref({}) const reportParams = ref({})
@ -111,8 +106,7 @@ const orderId = ref(null);
const orderNo = ref("") const orderNo = ref("")
const isEmpty = ref(false) const isEmpty = ref(false)
const isPending = ref(false) const isPending = ref(false)
const reportScore = ref(0) onMounted(() => {
onBeforeMount(() => {
const query = new URLSearchParams(window.location.search); const query = new URLSearchParams(window.location.search);
orderNo.value = query.get("out_trade_no"); orderNo.value = query.get("out_trade_no");
orderId.value = query.get("order_id"); orderId.value = query.get("order_id");
@ -127,12 +121,12 @@ onBeforeMount(() => {
// //
const calculateScore = (reportData) => { const calculateScore = (reportData) => {
// 00 // 0
let score = 0; let score = 0;
// 9090 // 90
const maxScore = 90; const maxScore = 90;
// //
const relativeWeights = { const relativeWeights = {
// //
'G34BJ03': 250, // 'G34BJ03': 250, //
@ -163,7 +157,7 @@ const calculateScore = (reportData) => {
const availableAPIs = reportData.map(item => item.data.apiID).filter(id => relativeWeights[id]); 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; let totalWeight = 0;
@ -181,7 +175,7 @@ const calculateScore = (reportData) => {
actualWeights[apiID] = relativeWeights[apiID] * pointValue; actualWeights[apiID] = relativeWeights[apiID] * pointValue;
}); });
// - //
reportData.forEach(item => { reportData.forEach(item => {
const apiID = item.data.apiID; const apiID = item.data.apiID;
const data = item.data.data; const data = item.data.data;
@ -189,7 +183,7 @@ const calculateScore = (reportData) => {
// //
if (!actualWeights[apiID]) return; if (!actualWeights[apiID]) return;
// API ID // API ID
switch (apiID) { switch (apiID) {
case 'G09SC02': // case 'G09SC02': //
// //
@ -197,58 +191,61 @@ const calculateScore = (reportData) => {
case 'G27BJ05': // case 'G27BJ05': //
if (data) { if (data) {
// // 0
let hasRisk = false; let noRisk = true;
for (const key in data) { for (const key in data) {
if (data[key] !== 0 && data[key] !== '0' && if (data[key] !== 0 && data[key] !== '0') {
key.indexOf('allnum') > -1 && noRisk = false;
!isNaN(parseInt(data[key])) &&
parseInt(data[key]) > 0) {
hasRisk = true;
break; break;
} }
} }
if (hasRisk) { if (noRisk || !Object.keys(data).length) {
score += actualWeights[apiID]; score += actualWeights[apiID];
} }
} else {
//
score += actualWeights[apiID];
} }
break; break;
case 'G28BJ05': // case 'G28BJ05': //
if (data) { if (data) {
// // 0
let hasRisk = false; let noRisk = true;
for (const key in data) { for (const key in data) {
if (data[key] !== 0 && data[key] !== '0' && if (data[key] !== 0 && data[key] !== '0') {
(key.indexOf('lendamt') > -1 || key.indexOf('num') > -1) && noRisk = false;
!isNaN(parseInt(data[key])) &&
parseInt(data[key]) > 0) {
hasRisk = true;
break; break;
} }
} }
if (hasRisk) { if (noRisk || !Object.keys(data).length) {
score += actualWeights[apiID]; score += actualWeights[apiID];
} }
} else {
//
score += actualWeights[apiID];
} }
break; break;
case 'G26BJ05': // case 'G26BJ05': //
if (data) { if (data) {
// // 0
const excludeFields = ['swift_number', 'code', 'flag_specialList_c']; const excludeFields = ['swift_number', 'code', 'flag_specialList_c'];
let hasRisk = false; let noRisk = true;
for (const key in data) { for (const key in data) {
if (!excludeFields.includes(key) && data[key] !== 0 && data[key] !== '0') { if (!excludeFields.includes(key) && data[key] !== 0 && data[key] !== '0') {
hasRisk = true; noRisk = false;
break; break;
} }
} }
if (hasRisk) { if (noRisk || !Object.keys(data).length) {
score += actualWeights[apiID]; score += actualWeights[apiID];
} }
} else {
//
score += actualWeights[apiID];
} }
break; break;
@ -257,20 +254,23 @@ const calculateScore = (reportData) => {
// //
switch (data.risk_level) { switch (data.risk_level) {
case 'A': // case 'A': //
// score += actualWeights[apiID];
break; break;
case 'F': // case 'F': //
score += actualWeights[apiID] * 0.3; score += actualWeights[apiID] * 0.7;
break; break;
case 'C': // case 'C': //
case 'D': // case 'D': //
score += actualWeights[apiID] * 0.7; score += actualWeights[apiID] * 0.3;
break; break;
case 'B': // case 'B': //
case 'E': // case 'E': //
score += actualWeights[apiID]; //
break; break;
} }
} else {
//
score += actualWeights[apiID];
} }
break; break;
@ -305,9 +305,12 @@ const calculateScore = (reportData) => {
hasRisk = true; hasRisk = true;
} }
if (hasRisk) { if (!hasRisk) {
score += actualWeights[apiID]; score += actualWeights[apiID];
} }
} else {
//
score += actualWeights[apiID];
} }
break; break;
@ -316,29 +319,38 @@ const calculateScore = (reportData) => {
// filterType // filterType
switch (data.filterType) { switch (data.filterType) {
case '0': // case '0': //
//
break;
case '3': //
score += actualWeights[apiID] * 0.3;
break;
case '2': //
score += actualWeights[apiID] * 0.7;
break;
case '1': //
score += actualWeights[apiID]; score += actualWeights[apiID];
break; 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; break;
case 'G19BJ02': // 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]; score += actualWeights[apiID];
} }
break; break;
case 'G02BJ02': // case 'G02BJ02': //
if (data && data.online_months < 6) { if (data && data.online_months >= 6) {
score += actualWeights[apiID];
} else if (!data) {
//
score += actualWeights[apiID]; score += actualWeights[apiID];
} }
break; break;
@ -347,13 +359,19 @@ const calculateScore = (reportData) => {
case 'G17BJ02': // case 'G17BJ02': //
case 'KZEYS': // case 'KZEYS': //
case 'G20GZ01': // case 'G20GZ01': //
if (data && data.is_consistent === false) { if (data && data.is_consistent) {
score += actualWeights[apiID];
} else if (!data) {
//
score += actualWeights[apiID]; score += actualWeights[apiID];
} }
break; break;
case 'FIN019': // case 'FIN019': //
if (data && data.is_blacklisted === true) { if (data && data.is_blacklisted === false) {
score += actualWeights[apiID];
} else if (!data) {
//
score += actualWeights[apiID]; score += actualWeights[apiID];
} }
break; break;
@ -399,8 +417,6 @@ const getReport = async () => {
} else if (data.value.code === 200002) { } else if (data.value.code === 200002) {
isPending.value = true isPending.value = true
} }
isDone.value = true
} }
} }
// //
@ -605,14 +621,13 @@ const maskValue = computed(() => {
</van-tab> </van-tab>
</template> </template>
<LPendding v-if="isPending" /> <LPendding v-if="isPending" />
<van-tab v-for="(item, index) in reportData" :key="index" <van-tab v-for="(item, index) in reportData" :key="index" :title="featureMap[item.data.apiID].name">
:title="featureMap[item.data.apiID]?.name"> <div id="lawsuit" class="title mb-4">{{ featureMap[item.data.apiID].name }}</div>
<div id="lawsuit" class="title mb-4">{{ featureMap[item.data.apiID]?.name }}</div> <component :is="featureMap[item.data.apiID].component" :data="item.data.data"
<component :is="featureMap[item.data.apiID]?.component" :data="item.data.data"
:params="reportParams" :isMerriageProduct="item.data.apiID === 'G09SC02'"> :params="reportParams" :isMerriageProduct="item.data.apiID === 'G09SC02'">
</component> </component>
<LRemark v-if="featureMap[item.data.apiID]?.remark" <LRemark v-if="featureMap[item.data.apiID].remark"
:content="featureMap[item.data.apiID]?.remark" /> :content="featureMap[item.data.apiID].remark" />
</van-tab> </van-tab>
<div class="card"> <div class="card">
<div> <div>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long