version temp
This commit is contained in:
@@ -2,12 +2,15 @@
|
||||
import { ref, reactive, computed, onMounted, onUnmounted, nextTick } from "vue";
|
||||
import { aesEncrypt } from "@/utils/crypto";
|
||||
import { useRoute } from "vue-router";
|
||||
import { useUserStore } from "@/stores/userStore";
|
||||
import { showConfirmDialog } from "vant";
|
||||
|
||||
import Payment from "@/components/Payment.vue";
|
||||
import CarNumberInput from "@/components/CarNumberInput.vue";
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const userStore = useUserStore();
|
||||
const showPayment = ref(false);
|
||||
const queryId = ref(null);
|
||||
const name = ref("");
|
||||
@@ -57,7 +60,35 @@ const isPhoneNumberValid = computed(() => {
|
||||
return /^1[3-9]\d{9}$/.test(mobile.value);
|
||||
});
|
||||
const isIdCardValid = computed(() => /^\d{17}[\dX]$/i.test(idCard.value));
|
||||
|
||||
// 检查登录状态
|
||||
const isLoggedIn = computed(() => userStore.isLoggedIn);
|
||||
|
||||
// 处理输入框点击事件
|
||||
const handleInputClick = async () => {
|
||||
if (!isLoggedIn.value) {
|
||||
try {
|
||||
await showConfirmDialog({
|
||||
title: '提示',
|
||||
message: '您需要登录后才能进行查询,是否前往登录?',
|
||||
confirmButtonText: '前往登录',
|
||||
cancelButtonText: '取消',
|
||||
});
|
||||
// 用户点击确认,跳转到登录页面
|
||||
router.push('/login');
|
||||
} catch {
|
||||
// 用户点击取消,什么都不做
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function handleSubmit() {
|
||||
// 如果未登录,跳转到登录页面
|
||||
if (!isLoggedIn.value) {
|
||||
router.push('/login');
|
||||
return;
|
||||
}
|
||||
|
||||
// 基本协议验证
|
||||
if (!agreeToTerms.value) {
|
||||
showToast({ message: `请阅读并同意用户协议和隐私政策` });
|
||||
@@ -185,7 +216,7 @@ const getFeatureIcon = (apiId) => {
|
||||
FLXG0V4B: "/inquire_icons/sifasheyu.svg", // 司法涉诉
|
||||
JRZQ8203: "/inquire_icons/jiedaixingwei.svg", // 借贷行为记录
|
||||
JRZQ09J8: "/inquire_icons/beijianguanrenyuan.svg", // 收入评估
|
||||
JRZQ4B6C: "/inquire_icons/fengxianxingwei.svg", // 信贷表现
|
||||
JRZQ4B6C: "/inquire_icons/fengxianxingwei.svg", // 探针C风险评估
|
||||
};
|
||||
return iconMap[apiId] || "/inquire_icons/default.svg";
|
||||
};
|
||||
@@ -200,10 +231,10 @@ const handleIconError = (event) => {
|
||||
const getCardClass = (index) => {
|
||||
const colorIndex = index % 4;
|
||||
const colorClasses = [
|
||||
'bg-gradient-to-br from-blue-50 via-blue-25 to-white border-2 border-blue-200',
|
||||
'bg-gradient-to-br from-green-50 via-green-25 to-white border-2 border-green-200',
|
||||
'bg-gradient-to-br from-purple-50 via-purple-25 to-white border-2 border-purple-200',
|
||||
'bg-gradient-to-br from-orange-50 via-orange-25 to-white border-2 border-orange-200'
|
||||
'bg-gradient-to-br from-blue-50 via-blue-25 to-white ',
|
||||
'bg-gradient-to-br from-green-50 via-green-25 to-white ',
|
||||
'bg-gradient-to-br from-purple-50 via-purple-25 to-white ',
|
||||
'bg-gradient-to-br from-orange-50 via-orange-25 to-white '
|
||||
];
|
||||
return colorClasses[colorIndex];
|
||||
};
|
||||
@@ -224,21 +255,24 @@ onUnmounted(() => {
|
||||
<div class="mb-4 text-lg font-semibold" style="color: var(--van-text-color);">基本信息</div>
|
||||
<div class="mb-4">
|
||||
<label for="name" class="form-label block mb-2">姓名</label>
|
||||
<input v-model="name" id="name" type="text" placeholder="请输入姓名" class="form-input" />
|
||||
<input v-model="name" id="name" type="text" placeholder="请输入姓名" class="form-input"
|
||||
@click="handleInputClick" />
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<label for="idCard" class="form-label block mb-2">身份证号</label>
|
||||
<input v-model="idCard" id="idCard" type="text" placeholder="请输入身份证号" class="form-input" />
|
||||
<input v-model="idCard" id="idCard" type="text" placeholder="请输入身份证号" class="form-input"
|
||||
@click="handleInputClick" />
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<label for="mobile" class="form-label block mb-2">手机号</label>
|
||||
<input v-model="mobile" id="mobile" type="tel" placeholder="请输入手机号" class="form-input" />
|
||||
<input v-model="mobile" id="mobile" type="tel" placeholder="请输入手机号" class="form-input"
|
||||
@click="handleInputClick" />
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<label for="verificationCode" class="form-label block mb-2">验证码</label>
|
||||
<div class="flex items-center gap-2">
|
||||
<input v-model="verificationCode" id="verificationCode" placeholder="请输入验证码" maxlength="6"
|
||||
class="form-input flex-1 min-w-0" />
|
||||
class="form-input flex-1 min-w-0" @click="handleInputClick" />
|
||||
<button
|
||||
class="px-4 py-2 text-sm whitespace-nowrap flex-shrink-0 rounded-lg border transition-colors"
|
||||
:class="isCountingDown || !isPhoneNumberValid
|
||||
@@ -278,7 +312,7 @@ onUnmounted(() => {
|
||||
<button
|
||||
class="flex-1 rounded-xl sm:rounded-l-none sm:rounded-r-xl py-3 text-white text-base transition-colors"
|
||||
style="background-color: var(--van-theme-primary);" @click="handleSubmit">
|
||||
立即查询
|
||||
{{ isLoggedIn ? '立即查询' : '前往登录' }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -303,8 +337,7 @@ onUnmounted(() => {
|
||||
{ name: '执行案件', icon: 'zhixinganjian.svg' },
|
||||
{ name: '限高被执行', icon: 'xianzhigaoxiaofei.svg' },
|
||||
]" :key="`${feature.id}-${caseIndex}`"
|
||||
class="aspect-square rounded-xl text-center text-sm text-gray-700 font-medium flex flex-col items-center justify-center p-2 shadow-lg"
|
||||
:class="getCardClass(index + caseIndex)">
|
||||
class="aspect-square text-center text-sm text-gray-700 font-medium flex flex-col items-center justify-center">
|
||||
<div class="mb-1">
|
||||
<img :src="`/inquire_icons/${caseType.icon}`" :alt="caseType.name"
|
||||
class="w-6 h-6 drop-shadow-sm mx-auto" @error="handleIconError" />
|
||||
@@ -322,20 +355,19 @@ onUnmounted(() => {
|
||||
{ name: '要素核查', icon: 'beijianguanrenyuan.svg' },
|
||||
{ name: '运营商核验', icon: 'mingxiacheliang.svg' },
|
||||
{ name: '公安重点人员检验', icon: 'xingshi.svg' },
|
||||
{ name: '逾期风险产品', icon: 'huankuanyali.svg' },
|
||||
{ name: '法院曝光台信息', icon: 'sifasheyu.svg' },
|
||||
{ name: '逾期风险综述', icon: 'huankuanyali.svg' },
|
||||
// { name: '法院曝光台信息', icon: 'sifasheyu.svg' },
|
||||
{ name: '借贷评估', icon: 'jiedaishenqing.svg' },
|
||||
{ name: '租赁风险评估', icon: 'jiedaixingwei.svg' },
|
||||
{ name: '关联风险监督', icon: 'renqiguanxi.svg' },
|
||||
{ name: '规则风险提示', icon: 'fengxianxingwei.svg' },
|
||||
]" :key="`${feature.id}-${moduleIndex}`"
|
||||
class="aspect-square rounded-xl text-center text-sm text-gray-700 font-medium flex flex-col items-center justify-center p-2 shadow-lg"
|
||||
:class="getCardClass(index + moduleIndex)">
|
||||
class="aspect-squaretext-center text-sm text-gray-700 font-medium flex flex-col items-center justify-center">
|
||||
<div class="text-xl mb-1 flex items-center justify-center">
|
||||
<img :src="`/inquire_icons/${module.icon}`" :alt="module.name"
|
||||
class="w-6 h-6 drop-shadow-sm" @error="handleIconError" />
|
||||
</div>
|
||||
<div class="text-xs leading-tight px-1 font-medium"
|
||||
<div class="text-xs leading-tight px-1 font-medium text-center"
|
||||
style="word-break: break-all; line-height: 1.2">
|
||||
{{ module.name }}
|
||||
</div>
|
||||
@@ -352,13 +384,12 @@ onUnmounted(() => {
|
||||
{ name: '风险指标详情', icon: 'fengxianxingwei.svg' },
|
||||
{ name: '专业建议', icon: 'yuepeichang.svg' },
|
||||
]" :key="`${feature.id}-${moduleIndex}`"
|
||||
class="aspect-square rounded-xl text-center text-sm text-gray-700 font-medium flex flex-col items-center justify-center p-2 shadow-lg"
|
||||
:class="getCardClass(index + moduleIndex)">
|
||||
class="aspect-square text-center text-sm text-gray-700 font-medium flex flex-col items-center justify-center">
|
||||
<div class="text-xl mb-1 flex items-center justify-center">
|
||||
<img :src="`/inquire_icons/${module.icon}`" :alt="module.name"
|
||||
class="w-6 h-6 drop-shadow-sm" @error="handleIconError" />
|
||||
</div>
|
||||
<div class="text-xs leading-tight px-1 font-medium"
|
||||
<div class="text-xs leading-tight px-1 font-medium text-center"
|
||||
style="word-break: break-all; line-height: 1.2">
|
||||
{{ module.name }}
|
||||
</div>
|
||||
@@ -376,13 +407,12 @@ onUnmounted(() => {
|
||||
{ name: '行政处罚', icon: 'xingzhengfuwu.svg' },
|
||||
{ name: '经营异常', icon: 'fengxianxingwei.svg' },
|
||||
]" :key="`${feature.id}-${moduleIndex}`"
|
||||
class="aspect-square rounded-xl text-center text-sm text-gray-700 font-medium flex flex-col items-center justify-center p-2 shadow-lg"
|
||||
:class="getCardClass(index + moduleIndex)">
|
||||
class="aspect-square text-center text-sm text-gray-700 font-medium flex flex-col items-center justify-center">
|
||||
<div class="text-xl mb-1 flex items-center justify-center">
|
||||
<img :src="`/inquire_icons/${module.icon}`" :alt="module.name"
|
||||
class="w-6 h-6 drop-shadow-sm" @error="handleIconError" />
|
||||
</div>
|
||||
<div class="text-xs leading-tight px-1 font-medium"
|
||||
<div class="text-xs leading-tight px-1 font-medium text-center"
|
||||
style="word-break: break-all; line-height: 1.2">
|
||||
{{ module.name }}
|
||||
</div>
|
||||
@@ -403,15 +433,14 @@ onUnmounted(() => {
|
||||
{ name: '授信详情', icon: 'huankuanyali.svg' },
|
||||
{ name: '租赁行为', icon: 'mingxiacheliang.svg' },
|
||||
{ name: '关联风险监督', icon: 'renqiguanxi.svg' },
|
||||
{ name: '法院风险信息', icon: 'sifasheyu.svg' },
|
||||
// { name: '法院风险信息', icon: 'sifasheyu.svg' },
|
||||
]" :key="`${feature.id}-${moduleIndex}`"
|
||||
class="aspect-square rounded-xl text-center text-sm text-gray-700 font-medium flex flex-col items-center justify-center p-2 shadow-lg"
|
||||
:class="getCardClass(index + moduleIndex)">
|
||||
class="aspect-square text-center text-sm text-gray-700 font-medium flex flex-col items-center justify-center">
|
||||
<div class="text-xl mb-1 flex items-center justify-center">
|
||||
<img :src="`/inquire_icons/${module.icon}`" :alt="module.name"
|
||||
class="w-6 h-6 drop-shadow-sm" @error="handleIconError" />
|
||||
</div>
|
||||
<div class="text-xs leading-tight px-1 font-medium"
|
||||
<div class="text-xs leading-tight px-1 font-medium text-center"
|
||||
style="word-break: break-all; line-height: 1.2">
|
||||
{{ module.name }}
|
||||
</div>
|
||||
@@ -420,13 +449,12 @@ onUnmounted(() => {
|
||||
|
||||
<!-- 其他功能正常显示 -->
|
||||
<div v-else
|
||||
class="aspect-square rounded-xl text-center text-sm text-gray-700 font-medium flex flex-col items-center justify-between p-2 shadow-lg"
|
||||
:class="getCardClass(index)">
|
||||
class="aspect-square text-center text-sm text-gray-700 font-medium flex flex-col items-center justify-between">
|
||||
<div class="flex items-center justify-center flex-1">
|
||||
<img :src="getFeatureIcon(feature.api_id)" :alt="feature.name"
|
||||
class="w-6 h-6 drop-shadow-sm" @error="handleIconError" />
|
||||
</div>
|
||||
<div class="text-xs leading-tight font-medium h-8 flex items-center justify-center"
|
||||
<div class="text-xs leading-tight font-medium h-8 flex items-center justify-center text-center"
|
||||
style="word-break: break-all; line-height: 1.1">
|
||||
{{ feature.name }}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user