Compare commits

...

3 Commits

Author SHA1 Message Date
52d8f2874f temp 2025-04-10 16:05:16 +08:00
bbeb97db21 Merge branch 'main' of http://1.117.67.95:3000/team/qnc-webview-tob 2025-04-02 12:38:05 +08:00
a0887fd543 temp 2025-04-02 12:34:57 +08:00
7 changed files with 352 additions and 155 deletions

View File

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

87
src/ui/CIDV044.vue Normal file
View File

@ -0,0 +1,87 @@
<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,7 +50,9 @@ 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,6 +43,10 @@ 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')),
@ -86,7 +90,12 @@ 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: '查询结果为"未婚或尚未登记结婚"时,表示婚姻登记处暂无相关的登记记录。婚姻状态信息由婚姻登记处逐级上报,可能存在数据遗漏或更新滞后。当前可查询的婚姻状态包括:未婚或尚未登记结婚、已婚、离异、离异冷静期。如您对查询结果有疑问,请联系客服反馈。'
},
}; };
@ -95,7 +104,7 @@ import LRemark from "@/components/LRemark.vue";
const productId = ref(null); const productId = ref(null);
const isDone = ref(true); const isDone = ref(false);
const active = ref(null) const active = ref(null)
const reportData = ref([]) const reportData = ref([])
@ -104,9 +113,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(75); // const reportScore = ref(0); //
onMounted(() => { onBeforeMount(() => {
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)
@ -137,6 +146,7 @@ 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(() => {
@ -191,12 +201,12 @@ const maskValue = computed(() => {
// //
const calculateScore = (reportData) => { const calculateScore = (reportData) => {
// 0 // 00
let score = 0; let score = 0;
// 90 // 9090
const maxScore = 90; const maxScore = 90;
// //
const relativeWeights = { const relativeWeights = {
// //
'G34BJ03': 250, // 'G34BJ03': 250, //
@ -227,7 +237,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 60; // 60 if (availableAPIs.length === 0) return 30; // 30
// //
let totalWeight = 0; let totalWeight = 0;
@ -245,7 +255,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;
@ -253,7 +263,7 @@ const calculateScore = (reportData) => {
// //
if (!actualWeights[apiID]) return; if (!actualWeights[apiID]) return;
// API ID // API ID
switch (apiID) { switch (apiID) {
case 'G09SC02': // case 'G09SC02': //
// //
@ -261,61 +271,58 @@ const calculateScore = (reportData) => {
case 'G27BJ05': // case 'G27BJ05': //
if (data) { if (data) {
// 0 //
let noRisk = true; let hasRisk = false;
for (const key in data) { for (const key in data) {
if (data[key] !== 0 && data[key] !== '0') { if (data[key] !== 0 && data[key] !== '0' &&
noRisk = false; key.indexOf('allnum') > -1 &&
!isNaN(parseInt(data[key])) &&
parseInt(data[key]) > 0) {
hasRisk = true;
break; break;
} }
} }
if (noRisk || !Object.keys(data).length) { if (hasRisk) {
score += actualWeights[apiID]; score += actualWeights[apiID];
} }
} else {
//
score += actualWeights[apiID];
} }
break; break;
case 'G28BJ05': // case 'G28BJ05': //
if (data) { if (data) {
// 0 //
let noRisk = true; let hasRisk = false;
for (const key in data) { for (const key in data) {
if (data[key] !== 0 && data[key] !== '0') { if (data[key] !== 0 && data[key] !== '0' &&
noRisk = false; (key.indexOf('lendamt') > -1 || key.indexOf('num') > -1) &&
!isNaN(parseInt(data[key])) &&
parseInt(data[key]) > 0) {
hasRisk = true;
break; break;
} }
} }
if (noRisk || !Object.keys(data).length) { if (hasRisk) {
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 noRisk = true; let hasRisk = false;
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') {
noRisk = false; hasRisk = true;
break; break;
} }
} }
if (noRisk || !Object.keys(data).length) { if (hasRisk) {
score += actualWeights[apiID]; score += actualWeights[apiID];
} }
} else {
//
score += actualWeights[apiID];
} }
break; break;
@ -324,23 +331,20 @@ 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.7; score += actualWeights[apiID] * 0.3;
break; break;
case 'C': // case 'C': //
case 'D': // case 'D': //
score += actualWeights[apiID] * 0.3; score += actualWeights[apiID] * 0.7;
break; break;
case 'B': // case 'B': //
case 'E': // case 'E': //
// score += actualWeights[apiID];
break; break;
} }
} else {
//
score += actualWeights[apiID];
} }
break; break;
@ -375,12 +379,9 @@ const calculateScore = (reportData) => {
hasRisk = true; hasRisk = true;
} }
if (!hasRisk) { if (hasRisk) {
score += actualWeights[apiID]; score += actualWeights[apiID];
} }
} else {
//
score += actualWeights[apiID];
} }
break; break;
@ -389,38 +390,29 @@ const calculateScore = (reportData) => {
// filterType // filterType
switch (data.filterType) { switch (data.filterType) {
case '0': // case '0': //
score += actualWeights[apiID];
break;
case '3': //
score += actualWeights[apiID] * 0.7;
break;
case '2': //
score += actualWeights[apiID] * 0.3;
break;
case '1': //
// //
break; break;
case '3': //
score += actualWeights[apiID] * 0.3;
break;
case '2': //
score += actualWeights[apiID] * 0.7;
break;
case '1': //
score += actualWeights[apiID];
break;
} }
} else {
//
score += actualWeights[apiID];
} }
break; break;
case 'G19BJ02': // case 'G19BJ02': //
if (data && data.is_second_card === false) { if (data && data.is_second_card === true) {
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;
@ -429,19 +421,13 @@ const calculateScore = (reportData) => {
case 'G17BJ02': // case 'G17BJ02': //
case 'KZEYS': // case 'KZEYS': //
case 'G20GZ01': // case 'G20GZ01': //
if (data && data.is_consistent) { if (data && data.is_consistent === false) {
score += actualWeights[apiID];
} else if (!data) {
//
score += actualWeights[apiID]; score += actualWeights[apiID];
} }
break; break;
case 'FIN019': // case 'FIN019': //
if (data && data.is_blacklisted === false) { if (data && data.is_blacklisted === true) {
score += actualWeights[apiID];
} else if (!data) {
//
score += actualWeights[apiID]; score += actualWeights[apiID];
} }
break; break;
@ -595,13 +581,14 @@ const calculateScore = (reportData) => {
</div> </div>
<LRemark content="如查询的姓名/身份证与运营商提供的不一致,可能会存在报告内容不匹配的情况" /> <LRemark content="如查询的姓名/身份证与运营商提供的不一致,可能会存在报告内容不匹配的情况" />
</van-tab> </van-tab>
<van-tab v-for="(item, index) in reportData" :key="index" :title="featureMap[item.data.apiID].name"> <van-tab v-for="(item, index) in reportData" :key="index"
<div id="lawsuit" class="title mb-4">{{ featureMap[item.data.apiID].name }}</div> :title="featureMap[item.data.apiID]?.name">
<component :is="featureMap[item.data.apiID].component" :data="item.data.data" <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"> :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,7 +86,12 @@ 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: '查询结果为"未婚或尚未登记结婚"时,表示婚姻登记处暂无相关的登记记录。婚姻状态信息由婚姻登记处逐级上报,可能存在数据遗漏或更新滞后。当前可查询的婚姻状态包括:未婚或尚未登记结婚、已婚、离异、离异冷静期。如您对查询结果有疑问,请联系客服反馈。'
},
}; };
@ -96,7 +101,7 @@ import LTitle from "@/components/LTitle.vue";
const route = useRoute(); const route = useRoute();
const productId = ref(null); const productId = ref(null);
const isDone = ref(true); const isDone = ref(false);
const active = ref(null) const active = ref(null)
const reportData = ref([]) const reportData = ref([])
const reportParams = ref({}) const reportParams = ref({})
@ -106,7 +111,8 @@ 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)
onMounted(() => { const reportScore = ref(0)
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");
@ -121,12 +127,12 @@ onMounted(() => {
// //
const calculateScore = (reportData) => { const calculateScore = (reportData) => {
// 0 // 00
let score = 0; let score = 0;
// 90 // 9090
const maxScore = 90; const maxScore = 90;
// //
const relativeWeights = { const relativeWeights = {
// //
'G34BJ03': 250, // 'G34BJ03': 250, //
@ -157,7 +163,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 60; // 60 if (availableAPIs.length === 0) return 30; // 30
// //
let totalWeight = 0; let totalWeight = 0;
@ -175,7 +181,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;
@ -183,7 +189,7 @@ const calculateScore = (reportData) => {
// //
if (!actualWeights[apiID]) return; if (!actualWeights[apiID]) return;
// API ID // API ID
switch (apiID) { switch (apiID) {
case 'G09SC02': // case 'G09SC02': //
// //
@ -191,61 +197,58 @@ const calculateScore = (reportData) => {
case 'G27BJ05': // case 'G27BJ05': //
if (data) { if (data) {
// 0 //
let noRisk = true; let hasRisk = false;
for (const key in data) { for (const key in data) {
if (data[key] !== 0 && data[key] !== '0') { if (data[key] !== 0 && data[key] !== '0' &&
noRisk = false; key.indexOf('allnum') > -1 &&
!isNaN(parseInt(data[key])) &&
parseInt(data[key]) > 0) {
hasRisk = true;
break; break;
} }
} }
if (noRisk || !Object.keys(data).length) { if (hasRisk) {
score += actualWeights[apiID]; score += actualWeights[apiID];
} }
} else {
//
score += actualWeights[apiID];
} }
break; break;
case 'G28BJ05': // case 'G28BJ05': //
if (data) { if (data) {
// 0 //
let noRisk = true; let hasRisk = false;
for (const key in data) { for (const key in data) {
if (data[key] !== 0 && data[key] !== '0') { if (data[key] !== 0 && data[key] !== '0' &&
noRisk = false; (key.indexOf('lendamt') > -1 || key.indexOf('num') > -1) &&
!isNaN(parseInt(data[key])) &&
parseInt(data[key]) > 0) {
hasRisk = true;
break; break;
} }
} }
if (noRisk || !Object.keys(data).length) { if (hasRisk) {
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 noRisk = true; let hasRisk = false;
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') {
noRisk = false; hasRisk = true;
break; break;
} }
} }
if (noRisk || !Object.keys(data).length) { if (hasRisk) {
score += actualWeights[apiID]; score += actualWeights[apiID];
} }
} else {
//
score += actualWeights[apiID];
} }
break; break;
@ -254,23 +257,20 @@ 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.7; score += actualWeights[apiID] * 0.3;
break; break;
case 'C': // case 'C': //
case 'D': // case 'D': //
score += actualWeights[apiID] * 0.3; score += actualWeights[apiID] * 0.7;
break; break;
case 'B': // case 'B': //
case 'E': // case 'E': //
// score += actualWeights[apiID];
break; break;
} }
} else {
//
score += actualWeights[apiID];
} }
break; break;
@ -305,12 +305,9 @@ const calculateScore = (reportData) => {
hasRisk = true; hasRisk = true;
} }
if (!hasRisk) { if (hasRisk) {
score += actualWeights[apiID]; score += actualWeights[apiID];
} }
} else {
//
score += actualWeights[apiID];
} }
break; break;
@ -319,38 +316,29 @@ const calculateScore = (reportData) => {
// filterType // filterType
switch (data.filterType) { switch (data.filterType) {
case '0': // case '0': //
score += actualWeights[apiID];
break;
case '3': //
score += actualWeights[apiID] * 0.7;
break;
case '2': //
score += actualWeights[apiID] * 0.3;
break;
case '1': //
// //
break; break;
case '3': //
score += actualWeights[apiID] * 0.3;
break;
case '2': //
score += actualWeights[apiID] * 0.7;
break;
case '1': //
score += actualWeights[apiID];
break;
} }
} else {
//
score += actualWeights[apiID];
} }
break; break;
case 'G19BJ02': // case 'G19BJ02': //
if (data && data.is_second_card === false) { if (data && data.is_second_card === true) {
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;
@ -359,19 +347,13 @@ const calculateScore = (reportData) => {
case 'G17BJ02': // case 'G17BJ02': //
case 'KZEYS': // case 'KZEYS': //
case 'G20GZ01': // case 'G20GZ01': //
if (data && data.is_consistent) { if (data && data.is_consistent === false) {
score += actualWeights[apiID];
} else if (!data) {
//
score += actualWeights[apiID]; score += actualWeights[apiID];
} }
break; break;
case 'FIN019': // case 'FIN019': //
if (data && data.is_blacklisted === false) { if (data && data.is_blacklisted === true) {
score += actualWeights[apiID];
} else if (!data) {
//
score += actualWeights[apiID]; score += actualWeights[apiID];
} }
break; break;
@ -417,6 +399,8 @@ const getReport = async () => {
} else if (data.value.code === 200002) { } else if (data.value.code === 200002) {
isPending.value = true isPending.value = true
} }
isDone.value = true
} }
} }
// //
@ -621,13 +605,14 @@ 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" :title="featureMap[item.data.apiID].name"> <van-tab v-for="(item, index) in reportData" :key="index"
<div id="lawsuit" class="title mb-4">{{ featureMap[item.data.apiID].name }}</div> :title="featureMap[item.data.apiID]?.name">
<component :is="featureMap[item.data.apiID].component" :data="item.data.data" <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'"> :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