f
This commit is contained in:
@@ -127,6 +127,7 @@ const router = useRouter();
|
||||
const show = defineModel("show");
|
||||
import { useCascaderAreaData } from "@vant/area-data";
|
||||
import { showToast } from "vant"; // 引入 showToast 方法
|
||||
import { useAliyunCaptcha } from "@/composables/useAliyunCaptcha";
|
||||
const emit = defineEmits(); // 确保 emit 可以正确使用
|
||||
const props = defineProps({
|
||||
isSelf: {
|
||||
@@ -139,6 +140,7 @@ const props = defineProps({
|
||||
},
|
||||
});
|
||||
const { isSelf, userName } = toRefs(props);
|
||||
const { runWithCaptcha } = useAliyunCaptcha();
|
||||
const form = ref({
|
||||
referrer: "",
|
||||
region: "",
|
||||
@@ -173,20 +175,22 @@ 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(),
|
||||
(res) => {
|
||||
loadingSms.value = false;
|
||||
if (res.code === 200) {
|
||||
showToast({ message: "获取成功" });
|
||||
startCountdown(); // 启动倒计时
|
||||
} else {
|
||||
showToast(res.msg || "获取验证码失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
let timer = null;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import { useUserStore } from "@/stores/userStore";
|
||||
import { showToast } from "vant";
|
||||
import useApiFetch from "@/composables/useApiFetch";
|
||||
import { registerByInviteCode } from "@/api/agent";
|
||||
import { useAliyunCaptcha } from "@/composables/useAliyunCaptcha";
|
||||
|
||||
const emit = defineEmits(['register-success'])
|
||||
const router = useRouter();
|
||||
@@ -14,6 +15,7 @@ const route = useRoute();
|
||||
const dialogStore = useDialogStore();
|
||||
const agentStore = useAgentStore();
|
||||
const userStore = useUserStore();
|
||||
const { runWithCaptcha } = useAliyunCaptcha();
|
||||
const appName = import.meta.env.VITE_APP_NAME || '全能查';
|
||||
const phoneNumber = ref("");
|
||||
const verificationCode = ref("");
|
||||
@@ -80,26 +82,31 @@ async function sendVerificationCode() {
|
||||
showToast({ message: "请先输入邀请码" });
|
||||
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);
|
||||
const actionType = hasAccount.value ? "bindMobile" : "agentApply";
|
||||
|
||||
// 使用滑块验证码保护发送短信接口
|
||||
runWithCaptcha(
|
||||
(captchaVerifyParam) =>
|
||||
useApiFetch("auth/sendSms")
|
||||
.post({ mobile: phoneNumber.value, actionType, captchaVerifyParam })
|
||||
.json(),
|
||||
(res) => {
|
||||
if (res.code === 200) {
|
||||
showToast({ message: "获取成功" });
|
||||
startCountdown();
|
||||
// 聚焦到验证码输入框
|
||||
nextTick(() => {
|
||||
const verificationCodeInput = document.getElementById('registerVerificationCode');
|
||||
if (verificationCodeInput) {
|
||||
verificationCodeInput.focus();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
showToast(res.msg || "获取验证码失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function startCountdown() {
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
<script setup>
|
||||
import { ref, computed, nextTick } from "vue";
|
||||
import { useDialogStore } from "@/stores/dialogStore";
|
||||
import { useAliyunCaptcha } from "@/composables/useAliyunCaptcha";
|
||||
|
||||
const emit = defineEmits(['bind-success'])
|
||||
const router = useRouter();
|
||||
const dialogStore = useDialogStore();
|
||||
const agentStore = useAgentStore();
|
||||
const userStore = useUserStore();
|
||||
const { runWithCaptcha } = useAliyunCaptcha();
|
||||
const appName = import.meta.env.VITE_APP_NAME || '全能查';
|
||||
const phoneNumber = ref("");
|
||||
const verificationCode = ref("");
|
||||
@@ -37,25 +39,29 @@ async function sendVerificationCode() {
|
||||
showToast({ message: "请输入有效的手机号" });
|
||||
return;
|
||||
}
|
||||
const { data, error } = await useApiFetch("auth/sendSms")
|
||||
.post({ mobile: phoneNumber.value, actionType: "bindMobile" })
|
||||
.json();
|
||||
|
||||
if (data.value && !error.value) {
|
||||
if (data.value.code === 200) {
|
||||
showToast({ message: "获取成功" });
|
||||
startCountdown();
|
||||
// 聚焦到验证码输入框
|
||||
nextTick(() => {
|
||||
const verificationCodeInput = document.getElementById('bindPhoneVerificationCode');
|
||||
if (verificationCodeInput) {
|
||||
verificationCodeInput.focus();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
showToast(data.value.msg);
|
||||
// 使用滑块验证码保护发送短信接口
|
||||
runWithCaptcha(
|
||||
(captchaVerifyParam) =>
|
||||
useApiFetch("auth/sendSms")
|
||||
.post({ mobile: phoneNumber.value, actionType: "bindMobile", captchaVerifyParam })
|
||||
.json(),
|
||||
(res) => {
|
||||
if (res.code === 200) {
|
||||
showToast({ message: "获取成功" });
|
||||
startCountdown();
|
||||
// 聚焦到验证码输入框
|
||||
nextTick(() => {
|
||||
const verificationCodeInput = document.getElementById('bindPhoneVerificationCode');
|
||||
if (verificationCodeInput) {
|
||||
verificationCodeInput.focus();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
showToast(res.msg || "获取验证码失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function startCountdown() {
|
||||
|
||||
@@ -6,11 +6,14 @@ import { useAgentStore } from "@/stores/agentStore";
|
||||
import { useUserStore } from "@/stores/userStore";
|
||||
import { showToast } from "vant";
|
||||
import { realNameAuth } from "@/api/agent";
|
||||
import useApiFetch from "@/composables/useApiFetch";
|
||||
import { useAliyunCaptcha } from "@/composables/useAliyunCaptcha";
|
||||
|
||||
const router = useRouter();
|
||||
const dialogStore = useDialogStore();
|
||||
const agentStore = useAgentStore();
|
||||
const userStore = useUserStore();
|
||||
const { runWithCaptcha } = useAliyunCaptcha();
|
||||
// 表单数据
|
||||
const realName = ref("");
|
||||
const idCard = ref("");
|
||||
@@ -59,18 +62,22 @@ async function sendVerificationCode() {
|
||||
showToast({ message: "请输入有效的手机号" });
|
||||
return;
|
||||
}
|
||||
const { data, error } = await useApiFetch("auth/sendSms")
|
||||
.post({ mobile: phoneNumber.value, actionType: "realName" })
|
||||
.json();
|
||||
|
||||
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: phoneNumber.value, actionType: "realName", captchaVerifyParam })
|
||||
.json(),
|
||||
(res) => {
|
||||
if (res.code === 200) {
|
||||
showToast({ message: "获取成功" });
|
||||
startCountdown();
|
||||
} else {
|
||||
showToast(res.msg || "获取验证码失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function startCountdown() {
|
||||
|
||||
@@ -11,7 +11,7 @@ export function useSEO() {
|
||||
"全能查是您的掌上风控工具箱。平台基于合规数据,提供个人婚姻状态分析、职场背调及黑名单筛查服务。无需繁琐流程,客观中立,一键生成包含婚姻涉诉历史与家庭风险的综合报告,助您快速识别潜在隐患。",
|
||||
keywords:
|
||||
"全能查,婚姻状态核实,风险排查工具,个人风险预警,第三方背调,商业信用评估",
|
||||
url: "https://www.zhinengcha.cn",
|
||||
url: "https://www.quannengcha.com",
|
||||
};
|
||||
|
||||
// 页面SEO配置
|
||||
@@ -137,7 +137,7 @@ export function useSEO() {
|
||||
mainEntity: {
|
||||
"@type": "Organization",
|
||||
name: "全能查",
|
||||
url: "https://www.zhinengcha.cn/",
|
||||
url: "https://www.quannengcha.com/",
|
||||
description:
|
||||
"专业大数据风险报告查询与代理平台,支持个人和企业多场景风控应用",
|
||||
},
|
||||
@@ -251,7 +251,7 @@ export function useSEO() {
|
||||
|
||||
updateSEO({
|
||||
...config,
|
||||
url: `https://www.zhinengcha.cn${currentPath}`,
|
||||
url: `https://www.quannengcha.com${currentPath}`,
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -509,7 +509,7 @@ router.afterEach((to) => {
|
||||
const seoConfig = {
|
||||
title: `${to.meta.title} - 全能查`,
|
||||
description: `全能查${to.meta.title}页面,提供专业的大数据风险管控服务。`,
|
||||
url: `https://www.zhinengcha.cn${to.path}`,
|
||||
url: `https://www.quannengcha.com${to.path}`,
|
||||
};
|
||||
updateSEO(seoConfig);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ onMounted(() => {
|
||||
title: '404 - 页面未找到 | 全能查',
|
||||
description: '抱歉,您访问的页面不存在。全能查专业大数据风险管控平台,提供大数据风险报告查询、婚姻状况查询、个人信用评估等服务。',
|
||||
keywords: '404, 页面未找到, 全能查, 大数据风险管控',
|
||||
url: 'https://www.zhinengcha.cn/404'
|
||||
url: 'https://www.quannengcha.com/404'
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user