diff --git a/.env b/.env index 55182d9..4b877b2 100644 --- a/.env +++ b/.env @@ -7,6 +7,12 @@ VITE_INQUIRE_AES_KEY=ff83609b2b24fc73196aac3d3dfb874f VITE_WECHAT_APP_ID=wx442ee1ac1ee75917 +# 阿里云滑块验证码配置 +# 从阿里云验证码控制台获取 SceneId +VITE_ALIYUN_CAPTCHA_SCENE_ID=wynt39to +# 是否启用加密模式(true/false),需要在阿里云控制台开启加密模式 +# 注意:根据代码逻辑,设置为 true 表示禁用加密,设置为 false 表示启用加密 +VITE_ALIYUN_CAPTCHA_ENCRYPTED=true VITE_CHAT_AES_KEY=qw5w6SFE2D1jmxyd VITE_CHAT_AES_IV=345GDFED433223DF diff --git a/index.html b/index.html index 43615a0..57a5b19 100644 --- a/index.html +++ b/index.html @@ -109,6 +109,12 @@ delete window.wx; + + + + @@ -207,6 +213,8 @@
加载中
+ +
diff --git a/lEbH141J7d.txt b/lEbH141J7d.txt new file mode 100644 index 0000000..a5c3c78 --- /dev/null +++ b/lEbH141J7d.txt @@ -0,0 +1 @@ +f07fc7c629885231180fb79885dba876 \ No newline at end of file diff --git a/src/auto-imports.d.ts b/src/auto-imports.d.ts index e49c706..f0f911a 100644 --- a/src/auto-imports.d.ts +++ b/src/auto-imports.d.ts @@ -119,6 +119,7 @@ declare global { const useActiveElement: typeof import('@vueuse/core')['useActiveElement'] const useAgent: typeof import('./composables/useAgent.js')['useAgent'] const useAgentStore: typeof import('./stores/agentStore.js')['useAgentStore'] + const useAliyunCaptcha: typeof import('./composables/useAliyunCaptcha.js')['default'] const useAnimate: typeof import('@vueuse/core')['useAnimate'] const useApiFetch: typeof import('./composables/useApiFetch.js')['default'] const useAppStore: typeof import('./stores/appStore.js')['useAppStore'] diff --git a/src/components/AgentApplicationForm.vue b/src/components/AgentApplicationForm.vue index 96b1d4f..54c0dfc 100644 --- a/src/components/AgentApplicationForm.vue +++ b/src/components/AgentApplicationForm.vue @@ -126,7 +126,9 @@ const router = useRouter(); const show = defineModel("show"); import { useCascaderAreaData } from "@vant/area-data"; -import { showToast } from "vant"; // 引入 showToast 方法 +import { showToast } from "vant"; +import useApiFetch from "@/composables/useApiFetch"; +import { useAliyunCaptcha } from "@/composables/useAliyunCaptcha"; const emit = defineEmits(); // 确保 emit 可以正确使用 const props = defineProps({ isSelf: { @@ -148,6 +150,7 @@ const form = ref({ const showCascader = ref(false); const cascaderValue = ref(""); const options = useCascaderAreaData(); +const { runWithCaptcha } = useAliyunCaptcha(); const loadingSms = ref(false); // 控制验证码按钮的loading状态 const isCountingDown = ref(false); const isAgreed = ref(false); @@ -172,21 +175,20 @@ const getSmsCode = async () => { } loadingSms.value = true; - - const { data, error } = await useApiFetch("auth/sendSms") - .post({ mobile: form.value.mobile, actionType: "agentApply" }) - .json(); - - loadingSms.value = false; - - if (data.value && !error.value) { - if (data.value.code === 200) { - showToast({ message: "获取成功" }); - startCountdown(); // 启动倒计时 - } else { - showToast(data.value.msg); + runWithCaptcha( + (captchaVerifyParam) => useApiFetch("auth/sendSms") + .post({ mobile: form.value.mobile, actionType: "agentApply", captchaVerifyParam }) + .json(), + (result) => { + loadingSms.value = false; + if (result && result.code === 200) { + showToast({ message: "获取成功" }); + startCountdown(); + } else if (result) { + showToast(result.msg || "发送失败"); + } } - } + ); }; let timer = null; diff --git a/src/components/BaseReport.vue b/src/components/BaseReport.vue index bddd454..cf4e73e 100644 --- a/src/components/BaseReport.vue +++ b/src/components/BaseReport.vue @@ -703,6 +703,7 @@ const featureMap = { name: "谛听多维报告", component: defineAsyncComponent(() => import("@/ui/CDWBG8B4D/index.vue")), }, + // 谛听多维报告拆分模块 DWBG8B4D_Overview: { name: "报告概览", @@ -724,10 +725,10 @@ const featureMap = { name: "逾期风险综述", component: defineAsyncComponent(() => import("@/ui/CDWBG8B4D/components/OverdueRiskSection.vue")), }, - // DWBG8B4D_CourtInfo: { - // name: "法院曝光台信息", - // component: defineAsyncComponent(() => import("@/ui/CDWBG8B4D/components/MultCourtInfoSection.vue")), - // }, + DWBG8B4D_CourtInfo: { + name: "法院曝光台信息", + component: defineAsyncComponent(() => import("@/ui/CDWBG8B4D/components/MultCourtInfoSection.vue")), + }, DWBG8B4D_LoanEvaluation: { name: "借贷评估", component: defineAsyncComponent(() => import("@/ui/CDWBG8B4D/components/LoanEvaluationSection.vue")), @@ -813,10 +814,10 @@ const featureMap = { name: "关联风险监督", component: defineAsyncComponent(() => import("@/ui/DWBG6A2C/components/RiskSupervisionSection.vue")), }, - // DWBG6A2C_CourtRiskInfo: { - // name: "法院风险信息", - // component: defineAsyncComponent(() => import("@/ui/DWBG6A2C/components/CourtRiskInfoSection.vue")), - // }, + DWBG6A2C_CourtRiskInfo: { + name: "法院风险信息", + component: defineAsyncComponent(() => import("@/ui/DWBG6A2C/components/CourtRiskInfoSection.vue")), + }, // 贷款风险报告 JRZQ5E9F: { name: "贷款风险评估", @@ -1039,6 +1040,7 @@ const featureRiskLevels = { 'DWBG8B4D_LeasingRisk': 18, 'DWBG8B4D_RiskSupervision': 25, 'DWBG8B4D_RiskWarningTab': 30, + 'DWBG8B4D_CourtInfo':33, // 司南报告子模块 'DWBG6A2C_StandLiveInfo': 10, @@ -1053,6 +1055,7 @@ const featureRiskLevels = { 'DWBG6A2C_CreditDetail': 15, 'DWBG6A2C_RentalBehavior': 15, 'DWBG6A2C_RiskSupervision': 25, + 'DWBG6A2C_CourtRiskInfo':39, // 贷款风险评估子模块 'CJRZQ5E9F_RiskOverview': 25, diff --git a/src/components/BindPhoneDialog.vue b/src/components/BindPhoneDialog.vue index e80dad7..eca52e2 100644 --- a/src/components/BindPhoneDialog.vue +++ b/src/components/BindPhoneDialog.vue @@ -6,6 +6,7 @@ import { useAgentStore } from "@/stores/agentStore"; import { useUserStore } from "@/stores/userStore"; import { showToast } from "vant"; import useApiFetch from "@/composables/useApiFetch"; +import { useAliyunCaptcha } from "@/composables/useAliyunCaptcha"; import { registerByInviteCode } from "@/api/agent"; const emit = defineEmits(['register-success']) @@ -14,6 +15,7 @@ const route = useRoute(); const dialogStore = useDialogStore(); const agentStore = useAgentStore(); const userStore = useUserStore(); +const { runWithCaptcha } = useAliyunCaptcha(); const phoneNumber = ref(""); const verificationCode = ref(""); const inviteCode = ref(""); @@ -80,25 +82,25 @@ async function sendVerificationCode() { return; } const actionType = hasAccount.value ? "bindMobile" : "agentApply"; - const { data, error } = await useApiFetch("auth/sendSms") - .post({ mobile: phoneNumber.value, actionType }) - .json(); - - if (data.value && !error.value) { - if (data.value.code === 200) { - showToast({ message: "获取成功" }); - startCountdown(); - // 聚焦到验证码输入框 - nextTick(() => { - const verificationCodeInput = document.getElementById('registerVerificationCode'); - if (verificationCodeInput) { - verificationCodeInput.focus(); - } - }); - } else { - showToast(data.value.msg); + runWithCaptcha( + (captchaVerifyParam) => useApiFetch("auth/sendSms") + .post({ mobile: phoneNumber.value, actionType, captchaVerifyParam }) + .json(), + (result) => { + if (result && result.code === 200) { + showToast({ message: "获取成功" }); + startCountdown(); + nextTick(() => { + const verificationCodeInput = document.getElementById('registerVerificationCode'); + if (verificationCodeInput) { + verificationCodeInput.focus(); + } + }); + } else if (result) { + showToast(result.msg || "发送失败"); + } } - } + ); } function startCountdown() { diff --git a/src/components/BindPhoneOnlyDialog.vue b/src/components/BindPhoneOnlyDialog.vue index 6cd93d9..a9fd1a0 100644 --- a/src/components/BindPhoneOnlyDialog.vue +++ b/src/components/BindPhoneOnlyDialog.vue @@ -1,12 +1,16 @@