Files

1578 lines
176 KiB
Plaintext
Raw Permalink Normal View History

2026-05-29 13:30:56 +08:00
import { createHotContext as __vite__createHotContext } from "/@vite/client";import.meta.hot = __vite__createHotContext("/src/views/AuthView.vue");/* unplugin-vue-components disabled */import { Modal as __unplugin_components_10 } from "/node_modules/.vite/deps/ant-design-vue_es.js?v=e2549d3d";import "/node_modules/.vite/deps/ant-design-vue_es_modal_style.js?v=e2549d3d";
import { Form as __unplugin_components_9 } from "/node_modules/.vite/deps/ant-design-vue_es.js?v=e2549d3d";import "/node_modules/.vite/deps/ant-design-vue_es_form_style.js?v=e2549d3d";
import { Checkbox as __unplugin_components_8 } from "/node_modules/.vite/deps/ant-design-vue_es.js?v=e2549d3d";import "/node_modules/.vite/deps/ant-design-vue_es_checkbox_style.js?v=e2549d3d";
import { InputPassword as __unplugin_components_7 } from "/node_modules/.vite/deps/ant-design-vue_es.js?v=e2549d3d";import "/node_modules/.vite/deps/ant-design-vue_es_input_style.js?v=e2549d3d";
import { Select as __unplugin_components_6 } from "/node_modules/.vite/deps/ant-design-vue_es.js?v=e2549d3d";import "/node_modules/.vite/deps/ant-design-vue_es_select_style.js?v=e2549d3d";
import { SelectOption as __unplugin_components_5 } from "/node_modules/.vite/deps/ant-design-vue_es.js?v=e2549d3d";import "/node_modules/.vite/deps/ant-design-vue_es_select_style.js?v=e2549d3d";
import { Button as __unplugin_components_4 } from "/node_modules/.vite/deps/ant-design-vue_es.js?v=e2549d3d";import "/node_modules/.vite/deps/ant-design-vue_es_button_style.js?v=e2549d3d";
import { FormItem as __unplugin_components_3 } from "/node_modules/.vite/deps/ant-design-vue_es.js?v=e2549d3d";import "/node_modules/.vite/deps/ant-design-vue_es_form_style.js?v=e2549d3d";
import { Input as __unplugin_components_2 } from "/node_modules/.vite/deps/ant-design-vue_es.js?v=e2549d3d";import "/node_modules/.vite/deps/ant-design-vue_es_input_style.js?v=e2549d3d";
import { RadioGroup as __unplugin_components_1 } from "/node_modules/.vite/deps/ant-design-vue_es.js?v=e2549d3d";import "/node_modules/.vite/deps/ant-design-vue_es_radio_style.js?v=e2549d3d";
import { RadioButton as __unplugin_components_0 } from "/node_modules/.vite/deps/ant-design-vue_es.js?v=e2549d3d";import "/node_modules/.vite/deps/ant-design-vue_es_radio_style.js?v=e2549d3d";
import { defineComponent as _defineComponent } from "/node_modules/.vite/deps/vue.js?v=e2549d3d";
import { computed, onBeforeUnmount, onMounted, reactive, ref, watch } from "/node_modules/.vite/deps/vue.js?v=e2549d3d";
import { useRouter } from "/node_modules/.vite/deps/vue-router.js?v=e2549d3d";
import { InfoCircleOutlined, LockOutlined, UserOutlined } from "/node_modules/.vite/deps/@ant-design_icons-vue.js?v=e2549d3d";
import { message } from "/node_modules/.vite/deps/ant-design-vue.js?v=e2549d3d";
import { authApi, legalAgreementApi } from "/src/api/auth.ts";
import { shopApi } from "/src/api/shop.ts";
import { ACCOUNT_REGEX, ACCOUNT_RULE_MESSAGE, sanitizeAccountInput } from "/src/utils/account.ts";
import { runWithGlobalLoading } from "/src/utils/action-loading.ts";
import { notifyShopThemeChanged } from "/src/utils/shop-theme.ts?t=1780018065535";
import { renderRichContent } from "/src/utils/rich-content.ts";
import {
userApi
} from "/src/api/user.ts";
const loginShopUnsupportedMessage = "可直接登录;如账号绑定多家门店,登录后可在个人中心切换当前门店。";
const _sfc_main = /* @__PURE__ */ _defineComponent({
__name: "AuthView",
setup(__props, { expose: __expose }) {
__expose();
const router = useRouter();
const activeTab = ref("login");
const loginType = ref("password");
const loading = ref(false);
const loadingShops = ref(false);
const shops = ref([]);
const loginShops = ref([]);
const countdown = ref(0);
const loginAccountStatus = ref(null);
const registerAccountStatus = ref(null);
const registerPhoneStatus = ref(null);
const loginShopMessage = ref("");
const allowLoginShopless = ref(false);
const forgotPasswordVisible = ref(false);
const forgotCountdown = ref(0);
const resettingPassword = ref(false);
const agreementAccepted = ref(false);
const agreements = ref([]);
const agreementModalOpen = ref(false);
const selectedAgreement = ref(null);
const agreementContentHtml = computed(() => renderRichContent(selectedAgreement.value?.content || "暂无协议内容"));
const forgotPasswordForm = reactive({
phone: "",
verificationCode: "",
newPassword: ""
});
const formData = reactive({
account: "",
password: "",
confirmPassword: "",
nickname: "",
shopId: void 0,
inviteCode: "",
phone: "",
verificationCode: "",
rememberMe: false
});
const agreementVersions = computed(() => {
return agreements.value.reduce((result, agreement) => {
result[agreement.agreementType] = agreement.version;
return result;
}, {});
});
const agreementPayload = () => ({
agreementAccepted: agreementAccepted.value,
agreementVersions: agreementVersions.value,
clientType: "WEB"
});
let loginAccountCheckTimer;
let loginPhoneShopCheckTimer;
const phoneRegex = /^1[3-9]\d{9}$/;
const verificationCodeRegex = /^\d{6}$/;
const loginShopPlaceholder = computed(() => {
if (loadingShops.value) {
return "正在加载可登录店铺";
}
if (loginShops.value.length) {
return allowLoginShopless.value ? "可选择本次登录店铺,留空直接登录" : "请选择登录店铺";
}
if (allowLoginShopless.value) {
return "当前无需选择店铺";
}
return "请先输入账号或手机号";
});
const validateLoginShopRequired = async () => {
if (allowLoginShopless.value || !loginShops.value.length || formData.shopId) {
return Promise.resolve();
}
return Promise.reject("请选择登录店铺");
};
const validatePassword = async (_rule, value) => {
if (!value || value.length < 6) {
return Promise.reject("密码长度不能少于 6 位");
}
let count = 0;
if (/\d/.test(value)) count++;
if (/[a-z]/.test(value)) count++;
if (/[A-Z]/.test(value)) count++;
if (/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>/?]/.test(value)) count++;
if (count < 3) {
return Promise.reject("密码需至少包含数字、小写字母、大写字母、符号中的 3 种");
}
return Promise.resolve();
};
const validateConfirmPassword = async (_rule, value) => {
if (!value) {
return Promise.reject("请确认密码");
}
if (value !== formData.password) {
return Promise.reject("两次输入的密码不一致");
}
return Promise.resolve();
};
const handleAccountInput = () => {
const normalized = sanitizeAccountInput(formData.account);
if (normalized !== formData.account) {
formData.account = normalized;
}
};
const registerRules = {
account: [
{ required: true, message: "请输入账号", trigger: "blur" },
{ pattern: ACCOUNT_REGEX, message: ACCOUNT_RULE_MESSAGE, trigger: "blur" }
],
phone: [
{ required: true, message: "请输入手机号", trigger: "blur" },
{ pattern: phoneRegex, message: "手机号格式不正确", trigger: "blur" }
],
verificationCode: [
{ required: true, message: "请输入验证码", trigger: "blur" },
{ pattern: verificationCodeRegex, message: "验证码必须为 6 位数字", trigger: "blur" }
],
password: [
{ required: true, message: "请输入密码", trigger: "blur" },
{ validator: validatePassword, trigger: "blur" }
],
confirmPassword: [
{ required: true, message: "请确认密码", trigger: "blur" },
{ validator: validateConfirmPassword, trigger: "blur" }
],
nickname: [
{ required: true, message: "请输入昵称", trigger: "blur" },
{ min: 2, max: 20, message: "昵称长度需为 2 到 20 个字符", trigger: "blur" },
{ pattern: /^[\u4e00-\u9fa5a-zA-Z0-9_]+$/, message: "昵称不能包含特殊符号", trigger: "blur" }
],
shopId: [
{ required: true, message: "请选择店铺", trigger: "change" }
]
};
const loginPasswordRules = {
account: [
{ required: true, message: "请输入账号", trigger: "blur" },
{ pattern: ACCOUNT_REGEX, message: ACCOUNT_RULE_MESSAGE, trigger: "blur" }
],
password: [
{ required: true, message: "请输入密码", trigger: "blur" }
],
shopId: [
{ validator: validateLoginShopRequired, trigger: "change" }
]
};
const loginPhoneRules = {
phone: [
{ required: true, message: "请输入手机号", trigger: "blur" },
{ pattern: phoneRegex, message: "手机号格式不正确", trigger: "blur" }
],
verificationCode: [
{ required: true, message: "请输入验证码", trigger: "blur" },
{ pattern: verificationCodeRegex, message: "验证码必须为 6 位数字", trigger: "blur" }
],
shopId: [
{ validator: validateLoginShopRequired, trigger: "change" }
]
};
const forgotPasswordRules = {
phone: [
{ required: true, message: "请输入手机号", trigger: "blur" },
{ pattern: phoneRegex, message: "手机号格式不正确", trigger: "blur" }
],
verificationCode: [
{ required: true, message: "请输入验证码", trigger: "blur" },
{ pattern: verificationCodeRegex, message: "验证码必须为 6 位数字", trigger: "blur" }
],
newPassword: [
{ required: true, message: "请输入新密码", trigger: "blur" }
]
};
const currentRules = computed(() => {
if (activeTab.value === "register") {
return registerRules;
}
return loginType.value === "phone" ? loginPhoneRules : loginPasswordRules;
});
const fetchShops = async () => {
loadingShops.value = true;
try {
const response = await shopApi.getShopsSimple();
shops.value = response || [];
} catch (error) {
console.error("获取店铺列表失败:", error);
message.warning("店铺列表加载失败,普通登录不受影响");
} finally {
loadingShops.value = false;
}
};
const resetLoginAccountStatus = () => {
if (loginAccountCheckTimer !== void 0) {
window.clearTimeout(loginAccountCheckTimer);
loginAccountCheckTimer = void 0;
}
loginAccountStatus.value = null;
};
const resetPhoneLoginShopCheck = () => {
if (loginPhoneShopCheckTimer !== void 0) {
window.clearTimeout(loginPhoneShopCheckTimer);
loginPhoneShopCheckTimer = void 0;
}
};
const resetLoginShopState = (clearSelectedShop = activeTab.value === "login") => {
resetPhoneLoginShopCheck();
loginShops.value = [];
loginShopMessage.value = "";
allowLoginShopless.value = false;
if (clearSelectedShop) {
formData.shopId = void 0;
}
};
const normalizeShopOptionValue = (shopId) => {
if (shopId === void 0 || shopId === null || shopId === "") {
return void 0;
}
return String(shopId);
};
const isLoginShopPrefetchUnsupported = (error) => {
const status = error?.response?.status;
return status === 404;
};
const applyLoginShopSelection = (selection) => {
loginShops.value = selection?.shops || [];
allowLoginShopless.value = Boolean(selection?.allowShoplessLogin);
loginShopMessage.value = selection?.message || "";
if (!loginShops.value.length) {
formData.shopId = void 0;
return;
}
const currentShopId = normalizeShopOptionValue(formData.shopId);
const matchedShop = loginShops.value.find((shop) => normalizeShopOptionValue(shop.id) === currentShopId);
if (matchedShop) {
formData.shopId = normalizeShopOptionValue(matchedShop.id);
return;
}
if (!allowLoginShopless.value && loginShops.value.length === 1) {
const [onlyShop] = loginShops.value;
if (onlyShop) {
formData.shopId = normalizeShopOptionValue(onlyShop.id);
return;
}
}
formData.shopId = void 0;
};
const loadLoginShopsByAccount = async (account = formData.account) => {
const trimmedAccount = account.trim();
if (activeTab.value !== "login" || loginType.value !== "password" || !trimmedAccount) {
resetLoginShopState();
return null;
}
try {
const selection = await userApi.getLoginShopsByAccount(trimmedAccount);
if (activeTab.value === "login" && loginType.value === "password" && formData.account.trim() === trimmedAccount) {
applyLoginShopSelection(selection);
}
return selection;
} catch (error) {
if (formData.account.trim() === trimmedAccount) {
if (isLoginShopPrefetchUnsupported(error)) {
applyLoginShopSelection({
allowShoplessLogin: true,
...{ message: loginShopUnsupportedMessage },
shops: []
});
} else {
resetLoginShopState();
}
}
if (!isLoginShopPrefetchUnsupported(error)) {
console.error("登录店铺查询失败:", error);
}
return null;
}
};
const loadLoginShopsByPhone = async (phone = formData.phone) => {
const trimmedPhone = phone.trim();
if (activeTab.value !== "login" || loginType.value !== "phone" || !phoneRegex.test(trimmedPhone)) {
resetLoginShopState();
return null;
}
try {
const selection = await userApi.getLoginShopsByPhone(trimmedPhone);
if (activeTab.value === "login" && loginType.value === "phone" && formData.phone.trim() === trimmedPhone) {
applyLoginShopSelection(selection);
}
return selection;
} catch (error) {
if (formData.phone.trim() === trimmedPhone) {
if (isLoginShopPrefetchUnsupported(error)) {
applyLoginShopSelection({
allowShoplessLogin: true,
...{ message: loginShopUnsupportedMessage },
shops: []
});
} else {
resetLoginShopState();
}
}
if (!isLoginShopPrefetchUnsupported(error)) {
console.error("手机号登录店铺查询失败:", error);
}
return null;
}
};
const checkLoginAccountAvailability = async (account = formData.account) => {
const trimmedAccount = account.trim();
if (activeTab.value !== "login" || loginType.value !== "password" || !trimmedAccount) {
loginAccountStatus.value = null;
return null;
}
try {
const response = await userApi.checkLoginAccountAvailability(trimmedAccount);
if (activeTab.value === "login" && loginType.value === "password" && formData.account.trim() === trimmedAccount) {
loginAccountStatus.value = response;
}
return response;
} catch (error) {
if (formData.account.trim() === trimmedAccount) {
loginAccountStatus.value = null;
}
console.error("登录账号检测失败:", error);
return null;
}
};
const checkRegisterAccountAvailability = async (showWarning = true) => {
const trimmedAccount = formData.account.trim();
if (activeTab.value !== "register" || !trimmedAccount) {
registerAccountStatus.value = null;
return false;
}
const response = await userApi.checkAccountAvailability(trimmedAccount);
registerAccountStatus.value = response;
if (showWarning && !response.available) {
message.warning(response.message);
}
return response.available;
};
const checkRegisterPhoneAvailability = async (showWarning = true) => {
const trimmedPhone = formData.phone.trim();
if (activeTab.value !== "register" || !trimmedPhone) {
registerPhoneStatus.value = null;
return false;
}
const response = await userApi.checkPhoneAvailability(trimmedPhone);
registerPhoneStatus.value = response;
if (showWarning && !response.available) {
message.warning(response.message);
}
return response.available;
};
const loadAgreements = async () => {
try {
agreements.value = await legalAgreementApi.listCurrent();
} catch (error) {
console.error("加载协议失败:", error);
message.warning("协议内容加载失败,请稍后重试");
}
};
const openAgreement = async (type) => {
const cached = agreements.value.find((item) => item.agreementType === type);
if (cached) {
selectedAgreement.value = cached;
agreementModalOpen.value = true;
return;
}
selectedAgreement.value = await legalAgreementApi.getCurrent(type);
agreementModalOpen.value = true;
};
const handleSubmit = async () => {
if (!agreementAccepted.value) {
message.warning("请先阅读并同意用户协议和隐私政策");
return;
}
if (!agreementVersions.value.USER_TERMS || !agreementVersions.value.PRIVACY_POLICY) {
message.warning("协议内容未加载完成,请稍后再试");
return;
}
loading.value = true;
try {
await runWithGlobalLoading(async () => {
if (activeTab.value === "login") {
let response;
if (loginType.value === "phone") {
response = await authApi.phoneLogin({
phone: formData.phone,
verificationCode: formData.verificationCode,
shopId: formData.shopId,
...agreementPayload()
});
} else {
response = await authApi.login({
account: formData.account,
password: formData.password,
rememberMe: formData.rememberMe,
shopId: formData.shopId,
...agreementPayload()
});
}
const loginData = response;
if (!loginData.accessToken || !loginData.refreshToken) {
console.error("登录响应缺少 token:", loginData);
message.error("登录失败:响应数据异常");
return;
}
localStorage.setItem("accessToken", loginData.accessToken);
localStorage.setItem("refreshToken", loginData.refreshToken);
localStorage.setItem("userInfo", JSON.stringify(loginData.userInfo));
sessionStorage.setItem("accessToken", loginData.accessToken);
sessionStorage.setItem("refreshToken", loginData.refreshToken);
notifyShopThemeChanged();
if (loginData.needSetPassword) {
localStorage.setItem("needSetPassword", "true");
} else {
localStorage.removeItem("needSetPassword");
}
message.success("登录成功");
router.push("/home").catch((err) => {
console.error("跳转首页失败:", err);
window.location.href = "/home";
});
return;
}
const accountAvailable = await checkRegisterAccountAvailability(false);
const phoneAvailable = await checkRegisterPhoneAvailability(false);
if (!accountAvailable || !phoneAvailable) {
message.error("请先处理注册信息中的占用问题");
return;
}
await authApi.register({
account: formData.account,
password: formData.password,
nickname: formData.nickname,
phone: formData.phone,
verificationCode: formData.verificationCode,
shopId: formData.shopId,
inviteCode: formData.inviteCode,
...agreementPayload()
});
message.success("注册成功,请登录");
activeTab.value = "login";
loginType.value = "password";
formData.password = "";
formData.confirmPassword = "";
formData.verificationCode = "";
resetLoginAccountStatus();
});
} catch (error) {
console.error(activeTab.value === "login" ? "登录失败:" : "注册失败:", error);
message.error(error.message || (activeTab.value === "login" ? "登录失败" : "注册失败"));
} finally {
loading.value = false;
}
};
const handleForgotPassword = () => {
forgotPasswordVisible.value = true;
};
const handleSendForgotCode = async () => {
if (!forgotPasswordForm.phone) {
message.error("请输入手机号");
return;
}
if (!phoneRegex.test(forgotPasswordForm.phone)) {
message.error("手机号格式不正确");
return;
}
try {
await runWithGlobalLoading(() => authApi.sendVerificationCode({
phone: forgotPasswordForm.phone,
sceneCode: "USER_RESET_PASSWORD_SMS_CODE"
}));
message.success("验证码已发送");
forgotCountdown.value = 60;
const timer = window.setInterval(() => {
forgotCountdown.value--;
if (forgotCountdown.value <= 0) {
window.clearInterval(timer);
}
}, 1e3);
} catch (error) {
message.error(error.response?.data?.message || "发送验证码失败");
}
};
const handleResetPassword = async () => {
resettingPassword.value = true;
try {
await runWithGlobalLoading(() => authApi.resetPasswordByPhone({
phone: forgotPasswordForm.phone,
verificationCode: forgotPasswordForm.verificationCode,
newPassword: forgotPasswordForm.newPassword
}));
message.success("密码重置成功,请使用新密码登录");
forgotPasswordVisible.value = false;
forgotPasswordForm.phone = "";
forgotPasswordForm.verificationCode = "";
forgotPasswordForm.newPassword = "";
} catch (error) {
message.error(error.response?.data?.message || "重置密码失败");
} finally {
resettingPassword.value = false;
}
};
const handleRegisterAccountBlur = async () => {
if (activeTab.value !== "register" || !formData.account.trim()) {
registerAccountStatus.value = null;
return;
}
try {
await checkRegisterAccountAvailability(false);
} catch (error) {
registerAccountStatus.value = null;
message.error(error.message || "账号校验失败");
}
};
const handleRegisterPhoneBlur = async () => {
if (activeTab.value !== "register" || !formData.phone.trim()) {
registerPhoneStatus.value = null;
return;
}
if (!phoneRegex.test(formData.phone)) {
registerPhoneStatus.value = null;
return;
}
try {
await checkRegisterPhoneAvailability(false);
} catch (error) {
registerPhoneStatus.value = null;
message.error(error.message || "手机号校验失败");
}
};
const handleSendVerificationCode = async () => {
if (!formData.phone) {
message.error("请输入手机号");
return;
}
if (!phoneRegex.test(formData.phone)) {
message.error("手机号格式不正确");
return;
}
try {
if (activeTab.value === "register") {
const phoneAvailable = await checkRegisterPhoneAvailability(false);
if (!phoneAvailable) {
message.warning(registerPhoneStatus.value?.message || "该手机号已被注册");
return;
}
}
await runWithGlobalLoading(() => userApi.sendVerificationCode({
phone: formData.phone,
sceneCode: activeTab.value === "register" ? "USER_REGISTER_SMS_CODE" : "USER_LOGIN_SMS_CODE"
}));
message.success("验证码已发送");
countdown.value = 60;
const timer = window.setInterval(() => {
countdown.value--;
if (countdown.value <= 0) {
window.clearInterval(timer);
}
}, 1e3);
} catch (error) {
message.error(error.message || "发送验证码失败");
}
};
const handleAdminLogin = () => {
localStorage.removeItem("accessToken");
localStorage.removeItem("refreshToken");
localStorage.removeItem("userInfo");
localStorage.removeItem("adminAccessToken");
localStorage.removeItem("adminRefreshToken");
localStorage.removeItem("adminUserInfo");
sessionStorage.removeItem("accessToken");
sessionStorage.removeItem("refreshToken");
sessionStorage.removeItem("adminAccessToken");
window.setTimeout(() => {
window.location.href = "/admin/login";
}, 100);
};
watch([activeTab, loginType], () => {
resetLoginAccountStatus();
resetLoginShopState(activeTab.value === "login");
if (activeTab.value !== "login") {
return;
}
if (loginType.value === "password" && formData.account.trim()) {
void Promise.all([
checkLoginAccountAvailability(formData.account.trim()),
loadLoginShopsByAccount(formData.account.trim())
]);
return;
}
if (loginType.value === "phone" && phoneRegex.test(formData.phone.trim())) {
void loadLoginShopsByPhone(formData.phone.trim());
}
});
watch(
() => formData.account,
(value) => {
if (activeTab.value !== "login" || loginType.value !== "password") {
return;
}
resetLoginAccountStatus();
const trimmedAccount = value.trim();
if (!trimmedAccount) {
return;
}
loginAccountCheckTimer = window.setTimeout(() => {
loginAccountCheckTimer = void 0;
void Promise.all([
checkLoginAccountAvailability(trimmedAccount),
loadLoginShopsByAccount(trimmedAccount)
]);
}, 400);
}
);
watch(
() => formData.phone,
(value) => {
if (activeTab.value !== "login" || loginType.value !== "phone") {
return;
}
resetPhoneLoginShopCheck();
const trimmedPhone = value.trim();
if (!phoneRegex.test(trimmedPhone)) {
resetLoginShopState();
return;
}
loginPhoneShopCheckTimer = window.setTimeout(() => {
loginPhoneShopCheckTimer = void 0;
void loadLoginShopsByPhone(trimmedPhone);
}, 400);
}
);
onMounted(() => {
fetchShops();
loadAgreements();
});
onBeforeUnmount(() => {
resetLoginAccountStatus();
resetPhoneLoginShopCheck();
});
const __returned__ = { router, activeTab, loginType, loading, loadingShops, shops, loginShops, countdown, loginAccountStatus, registerAccountStatus, registerPhoneStatus, loginShopMessage, allowLoginShopless, forgotPasswordVisible, forgotCountdown, resettingPassword, agreementAccepted, agreements, agreementModalOpen, selectedAgreement, agreementContentHtml, forgotPasswordForm, formData, agreementVersions, agreementPayload, get loginAccountCheckTimer() {
return loginAccountCheckTimer;
}, set loginAccountCheckTimer(v) {
loginAccountCheckTimer = v;
}, get loginPhoneShopCheckTimer() {
return loginPhoneShopCheckTimer;
}, set loginPhoneShopCheckTimer(v) {
loginPhoneShopCheckTimer = v;
}, phoneRegex, verificationCodeRegex, loginShopUnsupportedMessage, loginShopPlaceholder, validateLoginShopRequired, validatePassword, validateConfirmPassword, handleAccountInput, registerRules, loginPasswordRules, loginPhoneRules, forgotPasswordRules, currentRules, fetchShops, resetLoginAccountStatus, resetPhoneLoginShopCheck, resetLoginShopState, normalizeShopOptionValue, isLoginShopPrefetchUnsupported, applyLoginShopSelection, loadLoginShopsByAccount, loadLoginShopsByPhone, checkLoginAccountAvailability, checkRegisterAccountAvailability, checkRegisterPhoneAvailability, loadAgreements, openAgreement, handleSubmit, handleForgotPassword, handleSendForgotCode, handleResetPassword, handleRegisterAccountBlur, handleRegisterPhoneBlur, handleSendVerificationCode, handleAdminLogin, get InfoCircleOutlined() {
return InfoCircleOutlined;
}, get LockOutlined() {
return LockOutlined;
}, get UserOutlined() {
return UserOutlined;
} };
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
return __returned__;
}
});
import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createBlock as _createBlock, renderList as _renderList, Fragment as _Fragment, withModifiers as _withModifiers } from "/node_modules/.vite/deps/vue.js?v=e2549d3d";
const _hoisted_1 = { class: "mobile-container" };
const _hoisted_2 = { class: "auth-page" };
const _hoisted_3 = {
class: "brand-stage",
"aria-label": "YumiNail"
};
const _hoisted_4 = { class: "brand-title" };
const _hoisted_5 = { class: "brand-copy" };
const _hoisted_6 = {
class: "auth-container",
"aria-label": "账号登录注册"
};
const _hoisted_7 = { class: "auth-card-header" };
const _hoisted_8 = { class: "auth-card-kicker" };
const _hoisted_9 = { class: "tab-container" };
const _hoisted_10 = {
key: 0,
class: "login-type-toggle"
};
const _hoisted_11 = { class: "phone-login-tip" };
const _hoisted_12 = { class: "form-actions" };
const _hoisted_13 = { class: "social-login" };
const _hoisted_14 = { class: "agreement-content" };
const _hoisted_15 = { class: "agreement-version" };
const _hoisted_16 = ["innerHTML"];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
const _component_a_radio_button = __unplugin_components_0;
const _component_a_radio_group = __unplugin_components_1;
const _component_a_input = __unplugin_components_2;
const _component_a_form_item = __unplugin_components_3;
const _component_a_button = __unplugin_components_4;
const _component_a_select_option = __unplugin_components_5;
const _component_a_select = __unplugin_components_6;
const _component_a_input_password = __unplugin_components_7;
const _component_a_checkbox = __unplugin_components_8;
const _component_a_form = __unplugin_components_9;
const _component_a_modal = __unplugin_components_10;
return _openBlock(), _createElementBlock("div", _hoisted_1, [
_createElementVNode("main", _hoisted_2, [
_createElementVNode("section", _hoisted_3, [
_cache[26] || (_cache[26] = _createElementVNode(
"div",
{
class: "brand-mark",
"aria-hidden": "true"
},
[
_createElementVNode("span", null, "Y")
],
-1
/* CACHED */
)),
_cache[27] || (_cache[27] = _createElementVNode(
"p",
{ class: "brand-name" },
"YumiNail",
-1
/* CACHED */
)),
_createElementVNode(
"h1",
_hoisted_4,
_toDisplayString($setup.activeTab === "login" ? "艺术触手可及" : "开启你的预约账号"),
1
/* TEXT */
),
_createElementVNode(
"p",
_hoisted_5,
_toDisplayString($setup.activeTab === "login" ? "选择门店,继续你的美甲灵感旅程。" : "注册后即可收藏款式、预约服务并同步门店权益。"),
1
/* TEXT */
)
]),
_createElementVNode("section", _hoisted_6, [
_createElementVNode("div", _hoisted_7, [
_createElementVNode(
"span",
_hoisted_8,
_toDisplayString($setup.activeTab === "login" ? "Welcome back" : "Create account"),
1
/* TEXT */
),
_createElementVNode(
"h2",
null,
_toDisplayString($setup.activeTab === "login" ? "登录账号" : "注册账号"),
1
/* TEXT */
)
]),
_createElementVNode("div", _hoisted_9, [
_createElementVNode(
"div",
{
class: _normalizeClass(["tab-item", { active: $setup.activeTab === "login" }]),
onClick: _cache[0] || (_cache[0] = ($event) => $setup.activeTab = "login")
},
" 账号登录 ",
2
/* CLASS */
),
_createElementVNode(
"div",
{
class: _normalizeClass(["tab-item", { active: $setup.activeTab === "register" }]),
onClick: _cache[1] || (_cache[1] = ($event) => $setup.activeTab = "register")
},
" 注册账号 ",
2
/* CLASS */
)
]),
$setup.activeTab === "login" ? (_openBlock(), _createElementBlock("div", _hoisted_10, [
_createVNode(_component_a_radio_group, {
value: $setup.loginType,
"onUpdate:value": _cache[2] || (_cache[2] = ($event) => $setup.loginType = $event),
"button-style": "solid"
}, {
default: _withCtx(() => [
_createVNode(_component_a_radio_button, { value: "password" }, {
default: _withCtx(() => [..._cache[28] || (_cache[28] = [
_createTextVNode(
"账号密码登录",
-1
/* CACHED */
)
])]),
_: 1
/* STABLE */
}),
_createVNode(_component_a_radio_button, { value: "phone" }, {
default: _withCtx(() => [..._cache[29] || (_cache[29] = [
_createTextVNode(
"手机号验证码登录",
-1
/* CACHED */
)
])]),
_: 1
/* STABLE */
})
]),
_: 1
/* STABLE */
}, 8, ["value"])
])) : _createCommentVNode("v-if", true),
_createVNode(_component_a_form, {
model: $setup.formData,
rules: $setup.currentRules,
onFinish: $setup.handleSubmit,
layout: "vertical",
class: "auth-form"
}, {
default: _withCtx(() => [
$setup.activeTab === "register" ? (_openBlock(), _createBlock(_component_a_form_item, {
key: 0,
name: "nickname",
label: "昵称"
}, {
default: _withCtx(() => [
_createVNode(_component_a_input, {
value: $setup.formData.nickname,
"onUpdate:value": _cache[3] || (_cache[3] = ($event) => $setup.formData.nickname = $event),
placeholder: "请输入昵称",
size: "large"
}, {
prefix: _withCtx(() => [
_createVNode($setup["UserOutlined"], { style: { "color": "var(--text-secondary)" } })
]),
_: 1
/* STABLE */
}, 8, ["value"])
]),
_: 1
/* STABLE */
})) : _createCommentVNode("v-if", true),
$setup.activeTab === "register" ? (_openBlock(), _createBlock(_component_a_form_item, {
key: 1,
name: "account",
label: "账号"
}, {
default: _withCtx(() => [
_createVNode(_component_a_input, {
value: $setup.formData.account,
"onUpdate:value": _cache[4] || (_cache[4] = ($event) => $setup.formData.account = $event),
placeholder: "请输入账号",
size: "large",
onInput: $setup.handleAccountInput,
onBlur: $setup.handleRegisterAccountBlur
}, {
prefix: _withCtx(() => [
_createVNode($setup["UserOutlined"], { style: { "color": "var(--text-secondary)" } })
]),
_: 1
/* STABLE */
}, 8, ["value"]),
$setup.registerAccountStatus ? (_openBlock(), _createElementBlock(
"div",
{
key: 0,
class: _normalizeClass(["field-status", $setup.registerAccountStatus.available ? "success" : "error"])
},
_toDisplayString($setup.registerAccountStatus.message),
3
/* TEXT, CLASS */
)) : _createCommentVNode("v-if", true)
]),
_: 1
/* STABLE */
})) : _createCommentVNode("v-if", true),
$setup.activeTab === "register" ? (_openBlock(), _createBlock(_component_a_form_item, {
key: 2,
name: "phone",
label: "手机号"
}, {
default: _withCtx(() => [
_createVNode(_component_a_input, {
value: $setup.formData.phone,
"onUpdate:value": _cache[5] || (_cache[5] = ($event) => $setup.formData.phone = $event),
placeholder: "请输入手机号",
size: "large",
onBlur: $setup.handleRegisterPhoneBlur
}, {
prefix: _withCtx(() => [
_createVNode($setup["UserOutlined"], { style: { "color": "var(--text-secondary)" } })
]),
_: 1
/* STABLE */
}, 8, ["value"]),
$setup.registerPhoneStatus ? (_openBlock(), _createElementBlock(
"div",
{
key: 0,
class: _normalizeClass(["field-status", $setup.registerPhoneStatus.available ? "success" : "error"])
},
_toDisplayString($setup.registerPhoneStatus.message),
3
/* TEXT, CLASS */
)) : _createCommentVNode("v-if", true)
]),
_: 1
/* STABLE */
})) : _createCommentVNode("v-if", true),
$setup.activeTab === "register" ? (_openBlock(), _createBlock(_component_a_form_item, {
key: 3,
name: "verificationCode",
label: "验证码"
}, {
default: _withCtx(() => [
_createVNode(_component_a_input, {
value: $setup.formData.verificationCode,
"onUpdate:value": _cache[6] || (_cache[6] = ($event) => $setup.formData.verificationCode = $event),
placeholder: "请输入验证码",
size: "large"
}, {
prefix: _withCtx(() => [
_createVNode($setup["LockOutlined"], { style: { "color": "var(--text-secondary)" } })
]),
suffix: _withCtx(() => [
_createVNode(_component_a_button, {
type: "link",
disabled: $setup.countdown > 0 || !$setup.formData.phone,
onClick: $setup.handleSendVerificationCode
}, {
default: _withCtx(() => [
_createTextVNode(
_toDisplayString($setup.countdown > 0 ? `${$setup.countdown}秒后重发` : "发送验证码"),
1
/* TEXT */
)
]),
_: 1
/* STABLE */
}, 8, ["disabled"])
]),
_: 1
/* STABLE */
}, 8, ["value"])
]),
_: 1
/* STABLE */
})) : _createCommentVNode("v-if", true),
$setup.activeTab === "login" && $setup.loginType === "password" ? (_openBlock(), _createBlock(_component_a_form_item, {
key: 4,
name: "account",
label: "账号"
}, {
default: _withCtx(() => [
_createVNode(_component_a_input, {
value: $setup.formData.account,
"onUpdate:value": _cache[7] || (_cache[7] = ($event) => $setup.formData.account = $event),
placeholder: "请输入账号",
size: "large",
onInput: $setup.handleAccountInput
}, {
prefix: _withCtx(() => [
_createVNode($setup["UserOutlined"], { style: { "color": "var(--text-secondary)" } })
]),
_: 1
/* STABLE */
}, 8, ["value"]),
$setup.loginAccountStatus ? (_openBlock(), _createElementBlock(
"div",
{
key: 0,
class: _normalizeClass(["field-status", $setup.loginAccountStatus.exists ? "success" : "error"])
},
_toDisplayString($setup.loginAccountStatus.message),
3
/* TEXT, CLASS */
)) : _createCommentVNode("v-if", true)
]),
_: 1
/* STABLE */
})) : _createCommentVNode("v-if", true),
$setup.activeTab === "login" && $setup.loginType === "phone" ? (_openBlock(), _createBlock(_component_a_form_item, {
key: 5,
name: "phone",
label: "手机号"
}, {
default: _withCtx(() => [
_createVNode(_component_a_input, {
value: $setup.formData.phone,
"onUpdate:value": _cache[8] || (_cache[8] = ($event) => $setup.formData.phone = $event),
placeholder: "请输入手机号",
size: "large"
}, {
prefix: _withCtx(() => [
_createVNode($setup["UserOutlined"], { style: { "color": "var(--text-secondary)" } })
]),
_: 1
/* STABLE */
}, 8, ["value"]),
_createElementVNode("div", _hoisted_11, [
_createVNode($setup["InfoCircleOutlined"], { style: { "color": "var(--theme-primary)", "margin-right": "4px" } }),
_cache[30] || (_cache[30] = _createElementVNode(
"span",
null,
"新用户将自动注册",
-1
/* CACHED */
))
])
]),
_: 1
/* STABLE */
})) : _createCommentVNode("v-if", true),
$setup.activeTab === "login" && $setup.loginType === "phone" ? (_openBlock(), _createBlock(_component_a_form_item, {
key: 6,
name: "verificationCode",
label: "验证码"
}, {
default: _withCtx(() => [
_createVNode(_component_a_input, {
value: $setup.formData.verificationCode,
"onUpdate:value": _cache[9] || (_cache[9] = ($event) => $setup.formData.verificationCode = $event),
placeholder: "请输入验证码",
size: "large"
}, {
prefix: _withCtx(() => [
_createVNode($setup["LockOutlined"], { style: { "color": "var(--text-secondary)" } })
]),
suffix: _withCtx(() => [
_createVNode(_component_a_button, {
type: "link",
disabled: $setup.countdown > 0 || !$setup.formData.phone,
onClick: $setup.handleSendVerificationCode
}, {
default: _withCtx(() => [
_createTextVNode(
_toDisplayString($setup.countdown > 0 ? `${$setup.countdown}秒后重发` : "发送验证码"),
1
/* TEXT */
)
]),
_: 1
/* STABLE */
}, 8, ["disabled"])
]),
_: 1
/* STABLE */
}, 8, ["value"])
]),
_: 1
/* STABLE */
})) : _createCommentVNode("v-if", true),
$setup.activeTab === "login" ? (_openBlock(), _createBlock(_component_a_form_item, {
key: 7,
name: "shopId",
label: "选择登录店铺",
class: "shop-select-item"
}, {
default: _withCtx(() => [
_createVNode(_component_a_select, {
value: $setup.formData.shopId,
"onUpdate:value": _cache[10] || (_cache[10] = ($event) => $setup.formData.shopId = $event),
placeholder: $setup.loginShopPlaceholder,
size: "large",
loading: $setup.loadingShops,
disabled: !$setup.allowLoginShopless && !$setup.loginShops.length,
"allow-clear": ""
}, {
default: _withCtx(() => [
$setup.loginShops.length === 0 ? (_openBlock(), _createBlock(_component_a_select_option, {
key: 0,
disabled: "",
value: ""
}, {
default: _withCtx(() => [
_createTextVNode(
_toDisplayString($setup.allowLoginShopless ? "当前无需选择店铺" : "暂无可用店铺"),
1
/* TEXT */
)
]),
_: 1
/* STABLE */
})) : _createCommentVNode("v-if", true),
(_openBlock(true), _createElementBlock(
_Fragment,
null,
_renderList($setup.loginShops, (shop) => {
return _openBlock(), _createBlock(_component_a_select_option, {
key: shop.id,
value: $setup.normalizeShopOptionValue(shop.id)
}, {
default: _withCtx(() => [
_createTextVNode(
_toDisplayString(shop.shopName),
1
/* TEXT */
)
]),
_: 2
/* DYNAMIC */
}, 1032, ["value"]);
}),
128
/* KEYED_FRAGMENT */
))
]),
_: 1
/* STABLE */
}, 8, ["value", "placeholder", "loading", "disabled"]),
$setup.loginShopMessage ? (_openBlock(), _createElementBlock(
"div",
{
key: 0,
class: _normalizeClass(["field-status", $setup.loginShops.length || $setup.allowLoginShopless ? "success" : "error"])
},
_toDisplayString($setup.loginShopMessage),
3
/* TEXT, CLASS */
)) : _createCommentVNode("v-if", true)
]),
_: 1
/* STABLE */
})) : _createCommentVNode("v-if", true),
$setup.activeTab === "login" && $setup.loginType === "password" || $setup.activeTab === "register" ? (_openBlock(), _createBlock(_component_a_form_item, {
key: 8,
name: "password",
label: "密码"
}, {
default: _withCtx(() => [
_createVNode(_component_a_input_password, {
value: $setup.formData.password,
"onUpdate:value": _cache[11] || (_cache[11] = ($event) => $setup.formData.password = $event),
placeholder: "请输入密码",
size: "large"
}, {
prefix: _withCtx(() => [
_createVNode($setup["LockOutlined"], { style: { "color": "var(--text-secondary)" } })
]),
_: 1
/* STABLE */
}, 8, ["value"])
]),
_: 1
/* STABLE */
})) : _createCommentVNode("v-if", true),
$setup.activeTab === "register" ? (_openBlock(), _createBlock(_component_a_form_item, {
key: 9,
name: "confirmPassword",
label: "确认密码"
}, {
default: _withCtx(() => [
_createVNode(_component_a_input_password, {
value: $setup.formData.confirmPassword,
"onUpdate:value": _cache[12] || (_cache[12] = ($event) => $setup.formData.confirmPassword = $event),
placeholder: "请再次输入密码",
size: "large"
}, {
prefix: _withCtx(() => [
_createVNode($setup["LockOutlined"], { style: { "color": "var(--text-secondary)" } })
]),
_: 1
/* STABLE */
}, 8, ["value"])
]),
_: 1
/* STABLE */
})) : _createCommentVNode("v-if", true),
$setup.activeTab === "register" ? (_openBlock(), _createBlock(_component_a_form_item, {
key: 10,
name: "inviteCode",
label: "邀请码"
}, {
default: _withCtx(() => [
_createVNode(_component_a_input, {
value: $setup.formData.inviteCode,
"onUpdate:value": _cache[13] || (_cache[13] = ($event) => $setup.formData.inviteCode = $event),
placeholder: "可不填,不填默认归属所选店铺店长",
size: "large"
}, null, 8, ["value"])
]),
_: 1
/* STABLE */
})) : _createCommentVNode("v-if", true),
$setup.activeTab === "register" ? (_openBlock(), _createBlock(_component_a_form_item, {
key: 11,
name: "shopId",
label: "选择店铺",
class: "shop-select-item"
}, {
default: _withCtx(() => [
_createVNode(_component_a_select, {
value: $setup.formData.shopId,
"onUpdate:value": _cache[14] || (_cache[14] = ($event) => $setup.formData.shopId = $event),
placeholder: "请选择店铺",
size: "large",
loading: $setup.loadingShops
}, {
default: _withCtx(() => [
$setup.shops.length === 0 ? (_openBlock(), _createBlock(_component_a_select_option, {
key: 0,
disabled: "",
value: ""
}, {
default: _withCtx(() => [..._cache[31] || (_cache[31] = [
_createTextVNode(
" 暂无店铺数据 ",
-1
/* CACHED */
)
])]),
_: 1
/* STABLE */
})) : _createCommentVNode("v-if", true),
(_openBlock(true), _createElementBlock(
_Fragment,
null,
_renderList($setup.shops, (shop) => {
return _openBlock(), _createBlock(_component_a_select_option, {
key: shop.id,
value: $setup.normalizeShopOptionValue(shop.id)
}, {
default: _withCtx(() => [
_createTextVNode(
_toDisplayString(shop.shopName),
1
/* TEXT */
)
]),
_: 2
/* DYNAMIC */
}, 1032, ["value"]);
}),
128
/* KEYED_FRAGMENT */
))
]),
_: 1
/* STABLE */
}, 8, ["value", "loading"])
]),
_: 1
/* STABLE */
})) : _createCommentVNode("v-if", true),
$setup.activeTab === "login" ? (_openBlock(), _createBlock(_component_a_form_item, {
key: 12,
style: { "margin-bottom": "8px" }
}, {
default: _withCtx(() => [
_createElementVNode("div", _hoisted_12, [
_createVNode(_component_a_checkbox, {
checked: $setup.formData.rememberMe,
"onUpdate:checked": _cache[15] || (_cache[15] = ($event) => $setup.formData.rememberMe = $event)
}, {
default: _withCtx(() => [..._cache[32] || (_cache[32] = [
_createTextVNode(
"记住我",
-1
/* CACHED */
)
])]),
_: 1
/* STABLE */
}, 8, ["checked"]),
_createElementVNode("a", {
class: "forgot-password",
onClick: $setup.handleForgotPassword
}, "忘记密码?")
])
]),
_: 1
/* STABLE */
})) : _createCommentVNode("v-if", true),
_createVNode(_component_a_form_item, { style: { "margin-bottom": "12px" } }, {
default: _withCtx(() => [
_createVNode(_component_a_checkbox, {
checked: $setup.agreementAccepted,
"onUpdate:checked": _cache[18] || (_cache[18] = ($event) => $setup.agreementAccepted = $event)
}, {
default: _withCtx(() => [
_cache[33] || (_cache[33] = _createTextVNode(
" 我已阅读并同意 ",
-1
/* CACHED */
)),
_createElementVNode("a", {
onClick: _cache[16] || (_cache[16] = _withModifiers(($event) => $setup.openAgreement("USER_TERMS"), ["stop", "prevent"]))
}, "《用户协议》"),
_cache[34] || (_cache[34] = _createTextVNode(
" 和 ",
-1
/* CACHED */
)),
_createElementVNode("a", {
onClick: _cache[17] || (_cache[17] = _withModifiers(($event) => $setup.openAgreement("PRIVACY_POLICY"), ["stop", "prevent"]))
}, "《隐私政策》")
]),
_: 1
/* STABLE */
}, 8, ["checked"])
]),
_: 1
/* STABLE */
}),
_createVNode(_component_a_form_item, null, {
default: _withCtx(() => [
_createVNode(_component_a_button, {
type: "primary",
"html-type": "submit",
size: "large",
block: "",
class: "primary-action",
loading: $setup.loading,
disabled: !$setup.agreementAccepted
}, {
default: _withCtx(() => [
_createTextVNode(
_toDisplayString($setup.activeTab === "login" ? "登录" : "注册"),
1
/* TEXT */
)
]),
_: 1
/* STABLE */
}, 8, ["loading", "disabled"])
]),
_: 1
/* STABLE */
}),
_createElementVNode("div", _hoisted_13, [
_cache[35] || (_cache[35] = _createElementVNode(
"div",
{ class: "divider" },
[
_createElementVNode("span", null, "微信手机号登录")
],
-1
/* CACHED */
)),
_cache[36] || (_cache[36] = _createElementVNode(
"div",
{ class: "social-hint" },
" 微信手机号授权登录请在小程序中使用;网页端可使用账号密码或验证码登录。 ",
-1
/* CACHED */
)),
_createElementVNode("button", {
type: "button",
class: "guest-entry",
onClick: _cache[19] || (_cache[19] = ($event) => $setup.router.push("/home"))
}, " 游客浏览 ")
]),
_createElementVNode("div", { class: "admin-login" }, [
_createElementVNode("span", {
class: "admin-login-link",
onClick: $setup.handleAdminLogin
}, "管理后台登录")
])
]),
_: 1
/* STABLE */
}, 8, ["model", "rules"])
])
]),
_createVNode(_component_a_modal, {
open: $setup.forgotPasswordVisible,
"onUpdate:open": _cache[24] || (_cache[24] = ($event) => $setup.forgotPasswordVisible = $event),
title: "忘记密码",
footer: null,
width: "90%",
destroyOnClose: true
}, {
default: _withCtx(() => [
_createVNode(_component_a_form, {
model: $setup.forgotPasswordForm,
rules: $setup.forgotPasswordRules,
onFinish: $setup.handleResetPassword,
layout: "vertical"
}, {
default: _withCtx(() => [
_createVNode(_component_a_form_item, {
name: "phone",
label: "手机号"
}, {
default: _withCtx(() => [
_createVNode(_component_a_input, {
value: $setup.forgotPasswordForm.phone,
"onUpdate:value": _cache[20] || (_cache[20] = ($event) => $setup.forgotPasswordForm.phone = $event),
placeholder: "请输入绑定的手机号",
size: "large"
}, {
prefix: _withCtx(() => [
_createVNode($setup["UserOutlined"], { style: { "color": "var(--text-secondary)" } })
]),
_: 1
/* STABLE */
}, 8, ["value"])
]),
_: 1
/* STABLE */
}),
_createVNode(_component_a_form_item, {
name: "verificationCode",
label: "验证码"
}, {
default: _withCtx(() => [
_createVNode(_component_a_input, {
value: $setup.forgotPasswordForm.verificationCode,
"onUpdate:value": _cache[21] || (_cache[21] = ($event) => $setup.forgotPasswordForm.verificationCode = $event),
placeholder: "请输入验证码",
size: "large"
}, {
prefix: _withCtx(() => [
_createVNode($setup["LockOutlined"], { style: { "color": "var(--text-secondary)" } })
]),
suffix: _withCtx(() => [
_createVNode(_component_a_button, {
type: "link",
disabled: $setup.forgotCountdown > 0 || !$setup.forgotPasswordForm.phone,
onClick: $setup.handleSendForgotCode
}, {
default: _withCtx(() => [
_createTextVNode(
_toDisplayString($setup.forgotCountdown > 0 ? `${$setup.forgotCountdown}秒后重发` : "发送验证码"),
1
/* TEXT */
)
]),
_: 1
/* STABLE */
}, 8, ["disabled"])
]),
_: 1
/* STABLE */
}, 8, ["value"])
]),
_: 1
/* STABLE */
}),
_createVNode(_component_a_form_item, {
name: "newPassword",
label: "新密码"
}, {
default: _withCtx(() => [
_createVNode(_component_a_input_password, {
value: $setup.forgotPasswordForm.newPassword,
"onUpdate:value": _cache[22] || (_cache[22] = ($event) => $setup.forgotPasswordForm.newPassword = $event),
placeholder: "请输入新密码",
size: "large"
}, {
prefix: _withCtx(() => [
_createVNode($setup["LockOutlined"], { style: { "color": "var(--text-secondary)" } })
]),
_: 1
/* STABLE */
}, 8, ["value"])
]),
_: 1
/* STABLE */
}),
_createVNode(_component_a_form_item, null, {
default: _withCtx(() => [
_createVNode(_component_a_button, {
type: "primary",
"html-type": "submit",
size: "large",
block: "",
loading: $setup.resettingPassword
}, {
default: _withCtx(() => [..._cache[37] || (_cache[37] = [
_createTextVNode(
" 重置密码 ",
-1
/* CACHED */
)
])]),
_: 1
/* STABLE */
}, 8, ["loading"])
]),
_: 1
/* STABLE */
}),
_createVNode(_component_a_form_item, null, {
default: _withCtx(() => [
_createVNode(_component_a_button, {
size: "large",
block: "",
onClick: _cache[23] || (_cache[23] = ($event) => $setup.forgotPasswordVisible = false)
}, {
default: _withCtx(() => [..._cache[38] || (_cache[38] = [
_createTextVNode(
" 取消 ",
-1
/* CACHED */
)
])]),
_: 1
/* STABLE */
})
]),
_: 1
/* STABLE */
})
]),
_: 1
/* STABLE */
}, 8, ["model"])
]),
_: 1
/* STABLE */
}, 8, ["open"]),
_createVNode(_component_a_modal, {
open: $setup.agreementModalOpen,
"onUpdate:open": _cache[25] || (_cache[25] = ($event) => $setup.agreementModalOpen = $event),
title: $setup.selectedAgreement?.title || "协议内容",
footer: null,
width: "90%"
}, {
default: _withCtx(() => [
_createElementVNode("div", _hoisted_14, [
_createElementVNode(
"div",
_hoisted_15,
"版本:" + _toDisplayString($setup.selectedAgreement?.version || "--"),
1
/* TEXT */
),
_createElementVNode("div", {
class: "agreement-rich-content",
innerHTML: $setup.agreementContentHtml
}, null, 8, _hoisted_16)
])
]),
_: 1
/* STABLE */
}, 8, ["open", "title"])
]);
}
import "/src/views/AuthView.vue?t=1780022706943&vue&type=style&index=0&scoped=bd851895&lang.css";
_sfc_main.__hmrId = "bd851895";
typeof __VUE_HMR_RUNTIME__ !== "undefined" && __VUE_HMR_RUNTIME__.createRecord(_sfc_main.__hmrId, _sfc_main);
import.meta.hot.on("file-changed", ({ file }) => {
__VUE_HMR_RUNTIME__.CHANGED_FILE = file;
});
import.meta.hot.accept((mod) => {
if (!mod) return;
const { default: updated, _rerender_only } = mod;
if (_rerender_only) {
__VUE_HMR_RUNTIME__.rerender(updated.__hmrId, updated.render);
} else {
__VUE_HMR_RUNTIME__.reload(updated.__hmrId, updated);
}
});
import _export_sfc from "/@id/__x00__plugin-vue:export-helper";
export default /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-bd851895"], ["__file", "E:/code/xiaowang/YumiNail-Frontend/src/views/AuthView.vue"]]);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0FBd2JBLFNBQVMsVUFBVSxpQkFBaUIsV0FBVyxVQUFVLEtBQUssYUFBYTtBQUMzRSxTQUFTLGlCQUFpQjtBQUMxQixTQUFTLG9CQUFvQixjQUFjLG9CQUFvQjtBQUMvRCxTQUFTLGVBQWU7QUFNeEIsU0FBUyxTQUFTLHlCQUE4QztBQUNoRSxTQUFTLGVBQWU7QUFDeEIsU0FBUyxlQUFlLHNCQUFzQiw0QkFBNEI7QUFDMUUsU0FBUyw0QkFBNEI7QUFDckMsU0FBUyw4QkFBOEI7QUFDdkMsU0FBUyx5QkFBeUI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