diff --git a/index.html b/index.html index 7587bb0..812efa2 100644 --- a/index.html +++ b/index.html @@ -1,71 +1,123 @@ + + + + + 全能查 - 婚恋评估、司法涉诉查询、婚姻状态、判决书查询工具 + + + + + + + - 100% { - transform: rotate(360deg); - } - } - - - - -
-
-
加载中
-
-
- - - - \ No newline at end of file + +
+
+
加载中
+
+
+ + + + + + diff --git a/src/App.vue b/src/App.vue index 4c0d9a7..1aed36a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,6 +1,8 @@ diff --git a/src/components/Payment.vue b/src/components/Payment.vue index 3611338..4083835 100644 --- a/src/components/Payment.vue +++ b/src/components/Payment.vue @@ -84,6 +84,7 @@ async function getPayment() { .json() if (data.value && !error.value) { + console.log("useApiFetch", data.value) orderId.value = data.value.data.order_id const prepayUrl = data.value.data.prepay_id; const paymentForm = document.createElement('form'); @@ -94,6 +95,8 @@ async function getPayment() { paymentForm.submit(); } show.value = false + + } diff --git a/src/components/QrcodePop.vue b/src/components/QrcodePop.vue new file mode 100644 index 0000000..8f2c53e --- /dev/null +++ b/src/components/QrcodePop.vue @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file diff --git a/src/components/WechatOverlay.vue b/src/components/WechatOverlay.vue index 5a6c6c5..29f3f41 100644 --- a/src/components/WechatOverlay.vue +++ b/src/components/WechatOverlay.vue @@ -17,8 +17,8 @@ const isWeChat = ref(false); // 检查是否为微信环境 const checkIfWeChat = () => { - const userAgent = navigator.userAgent.toLowerCase(); - isWeChat.value = /micromessenger/.test(userAgent); + // const userAgent = navigator.userAgent.toLowerCase(); + // isWeChat.value = /micromessenger/.test(userAgent); }; // 在组件挂载后检查环境 diff --git a/src/composables/useApiFetch.js b/src/composables/useApiFetch.js index 96f61e1..80b54c7 100644 --- a/src/composables/useApiFetch.js +++ b/src/composables/useApiFetch.js @@ -16,15 +16,21 @@ const useApiFetch = createFetch({ }) // 获取平台信息 - const brand = "qnc"; // 固定的品牌信息 - + let platform = "h5" // 在请求前添加通用的 Header,例如 Authorization const token = localStorage.getItem('token') + const webviewEnv = localStorage.getItem('webview_env') + if (webviewEnv) { + platform = webviewEnv + } + options.headers = { + ...options.headers, + 'X-Platform': platform, // 添加平台信息 + 'X-Brand': "qnc", // 添加品牌信息 + } if (token) { options.headers = { ...options.headers, - 'X-Platform': 'h5', // 添加平台信息 - 'X-Brand': brand, // 添加品牌信息 Authorization: `${token}`, } } diff --git a/src/composables/useHttp.js b/src/composables/useHttp.js index 78f455f..074f88b 100644 --- a/src/composables/useHttp.js +++ b/src/composables/useHttp.js @@ -5,7 +5,6 @@ export function useHttp(url, options = {}, token) { baseUrl: '/api/v1', options: { async beforeFetch({ url, options, cancel }) { - console.log("asdasd", options) options.headers = { ...options.headers, Authorization: `${token}`, diff --git a/src/composables/useMenuItems.js b/src/composables/useMenuItems.js new file mode 100644 index 0000000..0ddc2b3 --- /dev/null +++ b/src/composables/useMenuItems.js @@ -0,0 +1,212 @@ +// src/composables/useMenuItems.js +import { ref, computed, watch } from "vue"; +import yhkhmdIcon from "@/assets/images/yhkhmd_icon.svg"; +import sjsysIcon from "@/assets/images/sjsys_icon.svg"; // 手机三要素 +import sfzeysIcon from "@/assets/images/sfzeys_icon.svg"; // 身份证二要素 +import sjeysIcon from "@/assets/images/sjeys_icon.svg"; // 手机二要素 +import sjzwscIcon from "@/assets/images/sjzwsc_icon.svg"; // 在网时长 +import sjeckIcon from "@/assets/images/sjeck_icon.svg"; // 手机二次卡 +import sjhmfxIcon from "@/assets/images/sjhmfx_icon.svg"; // 手机号码风险 +import yhk4ysIcon from "@/assets/images/yhk4ys_icon.svg"; // 银行卡四要素 +import yhksysIcon from "@/assets/images/yhksys_icon.svg"; // 银行卡三要素 +import zrrscztIcon from "@/assets/images/zrrsczt_icon.svg"; // 自然人生存状态 +import xlhyIcon from "@/assets/images/xlhy_icon.svg"; // 学历核验 +import rchyIcon from "@/assets/images/rchy_icon.svg"; // 人车核验 +import mxclIcon from "@/assets/images/mxcl_icon.svg"; // 名下车辆 +import srhyIcon from "@/assets/images/srhy_icon.svg"; // 双人婚姻 +import grblIcon from "@/assets/images/grbl_icon.svg"; +import gdrqgxIcon from "@/assets/images/gdrqgx_icon.svg"; + +import carClgzIcon from "@/assets/images/car_cheliangguzhi.png"; +import carClghIcon from "@/assets/images/car_cheliangguohu.png"; +import carCxxxIcon from "@/assets/images/car_chexian.png"; +import carCxsxIcon from "@/assets/images/car_cheliangshangxian.png"; +import carCjhccIcon from "@/assets/images/car_vinchache.png"; +import carWbxxIcon from "@/assets/images/car_weibao.png"; + +// 定义所有菜单项 +const allMenuItems = [ + { + title: "手机三要素", + icon: sjsysIcon, + product: "toc_PhoneThreeElements", + description: "查询个人与手机号码是否匹配,确保手机号码的真实性。", + }, + { + title: "银行卡黑名单", + icon: yhkhmdIcon, + product: "toc_BankCardBlacklist", + description: "查询银行卡是否被列入黑名单,帮助您识别潜在的金融风险。", + }, + { + title: "身份证二要素", + icon: sfzeysIcon, + product: "toc_IDCardTwoElements", + description: "验证姓名与身份证号码的匹配情况,确保身份真实性。", + }, + { + title: "手机二要素", + icon: sjeysIcon, + product: "toc_PhoneTwoElements", + description: "查询手机号码和身份证的匹配情况,用于验证身份的真实性。", + }, + { + title: "手机在网时长", + icon: sjzwscIcon, + product: "toc_NetworkDuration", + description: "查询手机号码的在网时长,帮助评估号码的稳定性与历史。", + }, + { + title: "手机二次卡", + icon: sjeckIcon, + product: "toc_PhoneSecondaryCard", + description: "检查手机是否有二次卡,防止诈骗等风险。", + }, + { + title: "手机号码风险", + icon: sjhmfxIcon, + product: "toc_PhoneNumberRisk", + description: "评估手机号码的潜在风险,包括是否与违法行为关联。", + }, + { + title: "银行卡四要素", + icon: yhk4ysIcon, + product: "toc_BankCardFourElements", + description: + "通过四要素核验银行卡与个人是否匹配,进一步验证银行账户的真实性。", + }, + { + title: "自然人生存状态", + icon: zrrscztIcon, + product: "toc_NaturalLifeStatus", + description: "查询个人的生存状态,帮助验证其是否真实存在。", + }, + { + title: "银行卡三要素", + icon: yhksysIcon, + product: "toc_BankCardThreeElements", + description: "查询银行卡的三要素,验证账户信息的安全性。", + }, + { + title: "学历核验", + icon: xlhyIcon, + product: "toc_EducationVerification", + description: "验证学历信息的真实性,确保所提供的学历符合实际。", + }, + { + title: "人车核验", + icon: rchyIcon, + product: "toc_PersonVehicleVerification", + description: "查询个人与车辆的关联情况,帮助识别车辆的所有权和风险。", + }, + { + title: "名下车辆", + icon: mxclIcon, + product: "toc_VehiclesUnderName", + description: "查询个人名下拥有车辆的数量,了解其车辆资产。", + }, + { + title: "车辆出险信息", + icon: carCxxxIcon, + product: "toc_vehicleInsuranceSummary", + description: + "车辆出险综合信息查询功能可以帮助用户全面了解车辆的出险记录和历史,提供详尽的事故和保险信息,帮助用户做出更明智的决策。", + }, + { + title: "车辆维保记录", + icon: carWbxxIcon, + product: "toc_vehicleMaintenanceRecord", + description: + "车辆维修保养记录查询功能可以帮助用户查看车辆的所有维修和保养历史,确保车辆的状态和性能得到全面了解。", + }, + // { + // title: "车辆上险信息", + // icon: "sxInfoIcon", + // product: "toc_vehicleInsuranceInfo", + // description: + // "车辆上险信息查询功能可以帮助用户了解车辆的保险情况,包括是否已投保、保险公司及保单详情,确保车辆的风险得到保障。", + // }, + { + title: "车架号查车", + icon: carCjhccIcon, + product: "toc_chassisNumberCheck", + description: + "车架号查车功能帮助用户通过车辆的车架号查询车辆的详细信息,包括品牌、型号、生产年份等,有助于验证车辆的真实情况。", + }, + { + title: "车辆过户次数", + icon: carClghIcon, + product: "toc_vehicleTransferCount", + description: + "车辆过户次数查询功能可以帮助用户了解车辆的过户历史,提供车辆的转手记录和所有权变更情况,帮助用户判断车辆的历史背景。", + }, + { + title: "车辆估值", + icon: carClgzIcon, + product: "toc_vehicleValuation", + description: + "车辆估值功能帮助用户评估车辆的市场价值,提供基于车型、年限、车况等因素的估值报告,帮助用户做出购买或出售决策。", + }, + { + title: "双人婚姻", + icon: srhyIcon, + product: "toc_DualMarriage", + description: "查询双人婚姻状况,帮助评估婚姻的法律状态和风险。", + }, + { + title: "个人不良", + icon: grblIcon, + product: "toc_PersonalBadRecord", + description: + "通过查询个人的不良记录,评估其风险等级(低、中、高风险)。帮助您识别潜在的信用和法律风险,确保合作方的合法合规。", + }, + { + title: "人企关系", + icon: gdrqgxIcon, + product: "toc_ShareholderBusinessRelation", + description: + "通过个人关联的企业,了解其可能涉及的风险,帮助您判断该个人的风险水平,特别是与高风险企业有联系的个人。", + }, +]; + +// 定义 Composable,返回过滤后的菜单项 +export function useMenuItems() { + const availableProducts = ref([]); + const requestUrl = ref(`/product/render_list/`); + const { data, error, execute, isFetching, onFetchResponse } = useApiFetch( + requestUrl, + { immediate: false, refetch: true } + ) + .get() + .json(); + + onFetchResponse((response) => { + if (data.value && !error.value) { + if (data.value.code === 200) { + availableProducts.value = data.value.data.Product.map( + (product) => product.product_en + ); + console.log("allMenuItems"); + } + } + }); + + // fetchRenderData 支持外部传入 verify 参数 + const fetchRenderData = async (verifyParam) => { + requestUrl.value = `/product/render_list/${verifyParam}`; + // execute() + }; + + // 返回过滤后的菜单项 + const availableMenuItems = computed(() => { + return allMenuItems.filter((item) => + availableProducts.value.includes(item.product) + ); + }); + + return { + fetchRenderData, + availableMenuItems, + isFetching, + }; +} diff --git a/src/composables/useWebView.js b/src/composables/useWebView.js index 318791f..ece9196 100644 --- a/src/composables/useWebView.js +++ b/src/composables/useWebView.js @@ -12,15 +12,21 @@ export function useWebView() { }; - // 获取 Token(从 URL 中解析) - const getTokenFromUrl = () => { + const getFromUrl = () => { const urlParams = new URLSearchParams(window.location.search); const tokenFromUrl = urlParams.get("token"); token.value = tokenFromUrl || ""; // 如果 URL 没有 token,返回空字符串 if (token.value) { localStorage.setItem("token", token.value); } - return tokenFromUrl; + + const env = urlParams.get("env"); + // 是在webview模式下 + if (env) { + document.title = "全能查" + platform.value = env + localStorage.setItem("webview_env", env) + } }; // 封装 postMessage 方法 @@ -100,17 +106,17 @@ export function useWebView() { }); }; - onMounted(async () => { - try { - const envValue = await getEnv(); - console.log("当前环境", envValue) - // 将返回的键名(如 'h5', 'mp-weixin')存储到 platform - handleBridgeReady(); - } catch (error) { - console.error(error); - } - // 获取 Token - getTokenFromUrl(); + onMounted(() => { + // try { + // const envValue = await getEnv(); + // console.log("当前环境", envValue) + // // 将返回的键名(如 'h5', 'mp-weixin')存储到 platform + // handleBridgeReady(); + // } catch (error) { + // console.error(error); + // } + // 获取 Token等 + getFromUrl(); }); return { diff --git a/src/layouts/HomeLayout.vue b/src/layouts/HomeLayout.vue index f00c265..fb0825d 100644 --- a/src/layouts/HomeLayout.vue +++ b/src/layouts/HomeLayout.vue @@ -1,54 +1,59 @@ + + \ No newline at end of file diff --git a/src/ui/CCAR061.vue b/src/ui/CAR061.vue similarity index 100% rename from src/ui/CCAR061.vue rename to src/ui/CAR061.vue diff --git a/src/ui/CAR066.vue b/src/ui/CAR066.vue new file mode 100644 index 0000000..85e9561 --- /dev/null +++ b/src/ui/CAR066.vue @@ -0,0 +1,76 @@ + + + + + diff --git a/src/ui/CAR074.vue b/src/ui/CAR074.vue new file mode 100644 index 0000000..0232e35 --- /dev/null +++ b/src/ui/CAR074.vue @@ -0,0 +1,310 @@ + + + + + diff --git a/src/ui/CAR079.vue b/src/ui/CAR079.vue new file mode 100644 index 0000000..87d2f17 --- /dev/null +++ b/src/ui/CAR079.vue @@ -0,0 +1,222 @@ + + + + + \ No newline at end of file diff --git a/src/ui/CAR100.vue b/src/ui/CAR100.vue new file mode 100644 index 0000000..3dabb4d --- /dev/null +++ b/src/ui/CAR100.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/src/views/Ai.vue b/src/views/Ai.vue index f5d1427..2f39c59 100644 --- a/src/views/Ai.vue +++ b/src/views/Ai.vue @@ -1,19 +1,31 @@ diff --git a/src/views/Example.vue b/src/views/Example.vue index e03b518..69dc3c1 100644 --- a/src/views/Example.vue +++ b/src/views/Example.vue @@ -80,8 +80,28 @@ const featureMap = { }, CAR061: { name: '名下车辆', - component: defineAsyncComponent(() => import('@/ui/CCAR061.vue')), - } + component: defineAsyncComponent(() => import('@/ui/CAR061.vue')), + }, + CAR074: { + name: "车辆出险信息", + component: defineAsyncComponent(() => import("@/ui/CAR074.vue")), + }, + CAR058: { + name: "车辆维保记录", + component: defineAsyncComponent(() => import("@/ui/CAR058.vue")), + }, + CAR079: { + name: "车架号查车", + component: defineAsyncComponent(() => import("@/ui/CAR079.vue")), + }, + CAR066: { + name: "车辆过户次数", + component: defineAsyncComponent(() => import("@/ui/CAR066.vue")), + }, + CAR100: { + name: "车辆估值", + component: defineAsyncComponent(() => import("@/ui/CAR100.vue")), + }, }; @@ -97,6 +117,8 @@ const reportName = ref("") const reportDateTime = ref(null) const feature = ref("") const isEmpty = ref(false) +const webviewEnv = localStorage.getItem('webview_env') + onMounted(() => { const query = new URLSearchParams(window.location.search); feature.value = query.get("feature"); @@ -181,8 +203,8 @@ const maskValue = computed(() => {