first commit
This commit is contained in:
664
unpackage/dist/dev/app-plus/app-service.js
vendored
Normal file
664
unpackage/dist/dev/app-plus/app-service.js
vendored
Normal file
@@ -0,0 +1,664 @@
|
||||
if (typeof Promise !== "undefined" && !Promise.prototype.finally) {
|
||||
Promise.prototype.finally = function(callback) {
|
||||
const promise = this.constructor;
|
||||
return this.then(
|
||||
(value) => promise.resolve(callback()).then(() => value),
|
||||
(reason) => promise.resolve(callback()).then(() => {
|
||||
throw reason;
|
||||
})
|
||||
);
|
||||
};
|
||||
}
|
||||
;
|
||||
if (typeof uni !== "undefined" && uni && uni.requireGlobal) {
|
||||
const global = uni.requireGlobal();
|
||||
ArrayBuffer = global.ArrayBuffer;
|
||||
Int8Array = global.Int8Array;
|
||||
Uint8Array = global.Uint8Array;
|
||||
Uint8ClampedArray = global.Uint8ClampedArray;
|
||||
Int16Array = global.Int16Array;
|
||||
Uint16Array = global.Uint16Array;
|
||||
Int32Array = global.Int32Array;
|
||||
Uint32Array = global.Uint32Array;
|
||||
Float32Array = global.Float32Array;
|
||||
Float64Array = global.Float64Array;
|
||||
BigInt64Array = global.BigInt64Array;
|
||||
BigUint64Array = global.BigUint64Array;
|
||||
}
|
||||
;
|
||||
if (uni.restoreGlobal) {
|
||||
uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval);
|
||||
}
|
||||
(function(vue) {
|
||||
"use strict";
|
||||
function formatAppLog(type, filename, ...args) {
|
||||
if (uni.__log__) {
|
||||
uni.__log__(type, filename, ...args);
|
||||
} else {
|
||||
console[type].apply(console, [...args, filename]);
|
||||
}
|
||||
}
|
||||
const _imports_0 = "/static/logo.png";
|
||||
const _export_sfc = (sfc, props) => {
|
||||
const target = sfc.__vccOpts || sfc;
|
||||
for (const [key, val] of props) {
|
||||
target[key] = val;
|
||||
}
|
||||
return target;
|
||||
};
|
||||
const _sfc_main$3 = {
|
||||
__name: "light-theme",
|
||||
setup(__props, { expose: __expose }) {
|
||||
__expose();
|
||||
const username = vue.ref("");
|
||||
const password = vue.ref("");
|
||||
const rememberMe = vue.ref(false);
|
||||
const showPassword = vue.ref(false);
|
||||
const isLoggingIn = vue.ref(false);
|
||||
const redirectUrl = vue.ref("");
|
||||
const copySuccess = vue.ref(false);
|
||||
const usernameError = vue.ref("");
|
||||
const passwordError = vue.ref("");
|
||||
const loginError = vue.ref("");
|
||||
const toggleRememberMe = () => {
|
||||
rememberMe.value = !rememberMe.value;
|
||||
formatAppLog("log", "at pages/light-theme/light-theme.vue:109", "111");
|
||||
};
|
||||
const mockLoginApi = (user, pwd) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
setTimeout(() => {
|
||||
if (user && pwd) {
|
||||
resolve({
|
||||
success: true,
|
||||
redirectUrl: "https://ws.yuxindazhineng.com",
|
||||
userInfo: {
|
||||
username: user,
|
||||
name: "用户" + user.substring(0, 3)
|
||||
}
|
||||
});
|
||||
} else {
|
||||
reject({
|
||||
success: false,
|
||||
message: "账号或密码错误"
|
||||
});
|
||||
}
|
||||
}, 1500);
|
||||
});
|
||||
};
|
||||
const validateForm = () => {
|
||||
let isValid = true;
|
||||
usernameError.value = "";
|
||||
passwordError.value = "";
|
||||
if (!username.value.trim()) {
|
||||
usernameError.value = "请输入账号";
|
||||
isValid = false;
|
||||
}
|
||||
if (!password.value) {
|
||||
passwordError.value = "请输入密码";
|
||||
isValid = false;
|
||||
} else if (password.value.length < 6) {
|
||||
passwordError.value = "密码至少6位字符";
|
||||
isValid = false;
|
||||
}
|
||||
return isValid;
|
||||
};
|
||||
const clearError = (field) => {
|
||||
if (field === "username") {
|
||||
usernameError.value = "";
|
||||
} else if (field === "password") {
|
||||
passwordError.value = "";
|
||||
}
|
||||
loginError.value = "";
|
||||
};
|
||||
const handleLogin = async () => {
|
||||
if (!validateForm()) {
|
||||
return;
|
||||
}
|
||||
isLoggingIn.value = true;
|
||||
loginError.value = "";
|
||||
try {
|
||||
const res = await uni.request({
|
||||
url: "http://cloud_test.yuxindazhineng.com/cloud_api/app/verify_domain",
|
||||
method: "POST",
|
||||
header: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
data: {
|
||||
username: username.value,
|
||||
password: password.value
|
||||
}
|
||||
});
|
||||
if (res.statusCode !== 200) {
|
||||
throw new Error(`接口请求失败,状态码:${res.statusCode}`);
|
||||
}
|
||||
const responseData = res.data;
|
||||
if (responseData.success) {
|
||||
if (rememberMe.value) {
|
||||
uni.setStorageSync("yxd_username", username.value);
|
||||
} else {
|
||||
uni.removeStorageSync("yxd_username");
|
||||
}
|
||||
const domainData = responseData.data;
|
||||
formatAppLog("log", "at pages/light-theme/light-theme.vue:212", "完整域名:", domainData.full_domain);
|
||||
formatAppLog("log", "at pages/light-theme/light-theme.vue:213", "域名前缀:", domainData.domain_prefix);
|
||||
redirectUrl.value = `https://${domainData.full_domain}`;
|
||||
setTimeout(() => {
|
||||
openExternalLink();
|
||||
}, 2e3);
|
||||
} else {
|
||||
throw new Error(responseData.message || "登录失败,请检查账号密码");
|
||||
}
|
||||
} catch (error) {
|
||||
loginError.value = error.message || "登录失败,请检查账号密码";
|
||||
} finally {
|
||||
isLoggingIn.value = false;
|
||||
}
|
||||
};
|
||||
function openExternalLink() {
|
||||
if (!redirectUrl.value)
|
||||
return;
|
||||
plus.runtime.openURL(redirectUrl.value);
|
||||
}
|
||||
const copyToClipboard = () => {
|
||||
if (!redirectUrl.value)
|
||||
return;
|
||||
uni.setClipboardData({
|
||||
data: redirectUrl.value,
|
||||
success: () => {
|
||||
copySuccess.value = true;
|
||||
setTimeout(() => {
|
||||
copySuccess.value = false;
|
||||
}, 2e3);
|
||||
}
|
||||
});
|
||||
};
|
||||
vue.onMounted(() => {
|
||||
const savedUsername = uni.getStorageSync("yxd_username");
|
||||
if (savedUsername) {
|
||||
username.value = savedUsername;
|
||||
rememberMe.value = true;
|
||||
}
|
||||
formatAppLog("log", "at pages/light-theme/light-theme.vue:292", "登录组件已挂载");
|
||||
});
|
||||
const __returned__ = { username, password, rememberMe, showPassword, isLoggingIn, redirectUrl, copySuccess, usernameError, passwordError, loginError, toggleRememberMe, mockLoginApi, validateForm, clearError, handleLogin, openExternalLink, copyToClipboard, ref: vue.ref, onMounted: vue.onMounted };
|
||||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||||
return __returned__;
|
||||
}
|
||||
};
|
||||
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return vue.openBlock(), vue.createElementBlock("div", { class: "main-view" }, [
|
||||
vue.createElementVNode("div", { class: "container" }, [
|
||||
vue.createElementVNode("div", { class: "logo" }, [
|
||||
vue.createElementVNode("image", {
|
||||
src: _imports_0,
|
||||
alt: "YXD"
|
||||
})
|
||||
]),
|
||||
vue.createElementVNode("h1", null, "登录 YXD 智能应用"),
|
||||
vue.createElementVNode("div", { class: "login-form" }, [
|
||||
vue.createElementVNode("div", { class: "form-group" }, [
|
||||
vue.createElementVNode("label", { for: "username" }, "账号"),
|
||||
vue.withDirectives(vue.createElementVNode(
|
||||
"input",
|
||||
{
|
||||
id: "username",
|
||||
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.username = $event),
|
||||
type: "text",
|
||||
placeholder: "请输入账号/邮箱/手机号",
|
||||
class: vue.normalizeClass({ "error": $setup.usernameError }),
|
||||
onInput: _cache[1] || (_cache[1] = ($event) => $setup.clearError("username"))
|
||||
},
|
||||
null,
|
||||
34
|
||||
/* CLASS, NEED_HYDRATION */
|
||||
), [
|
||||
[vue.vModelText, $setup.username]
|
||||
]),
|
||||
$setup.usernameError ? (vue.openBlock(), vue.createElementBlock(
|
||||
"div",
|
||||
{
|
||||
key: 0,
|
||||
class: "error-message"
|
||||
},
|
||||
vue.toDisplayString($setup.usernameError),
|
||||
1
|
||||
/* TEXT */
|
||||
)) : vue.createCommentVNode("v-if", true)
|
||||
]),
|
||||
vue.createElementVNode("div", { class: "form-group" }, [
|
||||
vue.createElementVNode("label", { for: "password" }, "密码"),
|
||||
vue.createElementVNode("div", { class: "password-input" }, [
|
||||
vue.withDirectives(vue.createElementVNode("input", {
|
||||
id: "password",
|
||||
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.password = $event),
|
||||
type: $setup.showPassword ? "text" : "password",
|
||||
placeholder: "请输入密码",
|
||||
class: vue.normalizeClass({ "error": $setup.passwordError }),
|
||||
onInput: _cache[3] || (_cache[3] = ($event) => $setup.clearError("password")),
|
||||
onKeyup: vue.withKeys($setup.handleLogin, ["enter"])
|
||||
}, null, 42, ["type"]), [
|
||||
[vue.vModelDynamic, $setup.password]
|
||||
]),
|
||||
vue.createElementVNode("button", {
|
||||
type: "button",
|
||||
class: "toggle-password",
|
||||
onClick: _cache[4] || (_cache[4] = ($event) => $setup.showPassword = !$setup.showPassword)
|
||||
}, [
|
||||
$setup.showPassword ? (vue.openBlock(), vue.createElementBlock("span", { key: 0 }, "🙈")) : (vue.openBlock(), vue.createElementBlock("span", { key: 1 }, "👁️"))
|
||||
])
|
||||
]),
|
||||
$setup.passwordError ? (vue.openBlock(), vue.createElementBlock(
|
||||
"div",
|
||||
{
|
||||
key: 0,
|
||||
class: "error-message"
|
||||
},
|
||||
vue.toDisplayString($setup.passwordError),
|
||||
1
|
||||
/* TEXT */
|
||||
)) : vue.createCommentVNode("v-if", true)
|
||||
]),
|
||||
vue.createElementVNode("div", { class: "form-options" }, [
|
||||
vue.createElementVNode("label", {
|
||||
class: "remember-me",
|
||||
onClick: $setup.toggleRememberMe
|
||||
}, [
|
||||
vue.createElementVNode("div", { class: "custom-checkbox-wrapper" }, [
|
||||
vue.createElementVNode(
|
||||
"div",
|
||||
{
|
||||
class: vue.normalizeClass(["custom-checkbox", { "checked": $setup.rememberMe }])
|
||||
},
|
||||
[
|
||||
$setup.rememberMe ? (vue.openBlock(), vue.createElementBlock("span", { key: 0 }, "✓")) : vue.createCommentVNode("v-if", true)
|
||||
],
|
||||
2
|
||||
/* CLASS */
|
||||
)
|
||||
]),
|
||||
vue.createElementVNode("span", null, "记住账号")
|
||||
])
|
||||
]),
|
||||
vue.createElementVNode("button", {
|
||||
class: "login-btn",
|
||||
onClick: $setup.handleLogin,
|
||||
disabled: $setup.isLoggingIn
|
||||
}, [
|
||||
$setup.isLoggingIn ? (vue.openBlock(), vue.createElementBlock("span", { key: 0 }, "⏳")) : (vue.openBlock(), vue.createElementBlock("span", { key: 1 }, "🔑")),
|
||||
vue.createTextVNode(
|
||||
" " + vue.toDisplayString($setup.isLoggingIn ? "登录中..." : "立即登录"),
|
||||
1
|
||||
/* TEXT */
|
||||
)
|
||||
], 8, ["disabled"]),
|
||||
$setup.loginError ? (vue.openBlock(), vue.createElementBlock("div", {
|
||||
key: 0,
|
||||
class: "login-error"
|
||||
}, [
|
||||
vue.createElementVNode("span", { class: "error-icon" }, "⚠"),
|
||||
vue.createTextVNode(
|
||||
" " + vue.toDisplayString($setup.loginError),
|
||||
1
|
||||
/* TEXT */
|
||||
)
|
||||
])) : vue.createCommentVNode("v-if", true),
|
||||
$setup.redirectUrl ? (vue.openBlock(), vue.createElementBlock("div", {
|
||||
key: 1,
|
||||
class: "redirect-section"
|
||||
}, [
|
||||
vue.createElementVNode("div", { class: "success-message" }, [
|
||||
vue.createElementVNode("span", { class: "success-icon" }, "✅"),
|
||||
vue.createTextVNode(" 登录成功!正在为您跳转... ")
|
||||
])
|
||||
])) : vue.createCommentVNode("v-if", true)
|
||||
])
|
||||
])
|
||||
]);
|
||||
}
|
||||
const PagesLightThemeLightTheme = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__scopeId", "data-v-68542e3f"], ["__file", "D:/Projects/uniapp/app-test/fronted-phone/pages/light-theme/light-theme.vue"]]);
|
||||
const _sfc_main$2 = {
|
||||
__name: "index",
|
||||
setup(__props, { expose: __expose }) {
|
||||
__expose();
|
||||
const url = vue.ref("https://ws.yuxindazhineng.com");
|
||||
function openExternalLink() {
|
||||
plus.runtime.openURL(url.value);
|
||||
}
|
||||
const handleAccessClick = () => {
|
||||
setTimeout(() => {
|
||||
window.location.href = url.value;
|
||||
}, 1e3);
|
||||
};
|
||||
const handleDirectLinkClick = (e) => {
|
||||
e.preventDefault();
|
||||
if (loadingElement.value) {
|
||||
loadingElement.value.style.display = "block";
|
||||
}
|
||||
setTimeout(() => {
|
||||
window.location.href = url.value;
|
||||
}, 500);
|
||||
};
|
||||
vue.onMounted(() => {
|
||||
formatAppLog("log", "at pages/index/index.vue:79", "组件已挂载,DOM元素可用");
|
||||
});
|
||||
const __returned__ = { url, openExternalLink, handleAccessClick, handleDirectLinkClick, ref: vue.ref, onMounted: vue.onMounted };
|
||||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||||
return __returned__;
|
||||
}
|
||||
};
|
||||
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return vue.openBlock(), vue.createElementBlock("div", { class: "main-view" }, [
|
||||
vue.createElementVNode("div", { class: "container" }, [
|
||||
vue.createElementVNode("div", { class: "logo" }, [
|
||||
vue.createElementVNode("image", {
|
||||
src: _imports_0,
|
||||
alt: "YXD"
|
||||
})
|
||||
]),
|
||||
vue.createElementVNode("h1", null, "访问 YXD 智能应用"),
|
||||
vue.createElementVNode("p", { class: "description" }, "点击下方按钮跳转至浏览器访问 YXD 智能应用平台,体验智能服务。"),
|
||||
vue.createElementVNode("div", { class: "url-display" }, [
|
||||
vue.createElementVNode("input", {
|
||||
placeholder: "请输入网址",
|
||||
value: $setup.url
|
||||
}, null, 8, ["value"])
|
||||
]),
|
||||
vue.createElementVNode(
|
||||
"button",
|
||||
{
|
||||
class: "access-btn",
|
||||
ref: "accessButton",
|
||||
onClick: $setup.openExternalLink
|
||||
},
|
||||
[
|
||||
vue.createElementVNode("i", { class: "fas fa-external-link-alt" }),
|
||||
vue.createTextVNode(" 立即访问 ")
|
||||
],
|
||||
512
|
||||
/* NEED_PATCH */
|
||||
)
|
||||
])
|
||||
]);
|
||||
}
|
||||
const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__scopeId", "data-v-1cf27b2a"], ["__file", "D:/Projects/uniapp/app-test/fronted-phone/pages/index/index.vue"]]);
|
||||
const _sfc_main$1 = {
|
||||
__name: "night-theme",
|
||||
setup(__props, { expose: __expose }) {
|
||||
__expose();
|
||||
const username = vue.ref("");
|
||||
const password = vue.ref("");
|
||||
const rememberMe = vue.ref(false);
|
||||
const showPassword = vue.ref(false);
|
||||
const isLoggingIn = vue.ref(false);
|
||||
const redirectUrl = vue.ref("");
|
||||
const copySuccess = vue.ref(false);
|
||||
const usernameError = vue.ref("");
|
||||
const passwordError = vue.ref("");
|
||||
const loginError = vue.ref("");
|
||||
const toggleRememberMe = () => {
|
||||
rememberMe.value = !rememberMe.value;
|
||||
formatAppLog("log", "at pages/night-theme/night-theme.vue:109", "触发toggleRememberMe");
|
||||
};
|
||||
const mockLoginApi = (user, pwd) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
setTimeout(() => {
|
||||
if (user && pwd) {
|
||||
resolve({
|
||||
success: true,
|
||||
redirectUrl: "https://ws.yuxindazhineng.com/",
|
||||
userInfo: {
|
||||
username: user,
|
||||
name: "用户" + user.substring(0, 3)
|
||||
}
|
||||
});
|
||||
} else {
|
||||
reject({
|
||||
success: false,
|
||||
message: "账号或密码错误"
|
||||
});
|
||||
}
|
||||
}, 1500);
|
||||
});
|
||||
};
|
||||
const validateForm = () => {
|
||||
let isValid = true;
|
||||
usernameError.value = "";
|
||||
passwordError.value = "";
|
||||
if (!username.value.trim()) {
|
||||
usernameError.value = "请输入账号";
|
||||
isValid = false;
|
||||
}
|
||||
if (!password.value) {
|
||||
passwordError.value = "请输入密码";
|
||||
isValid = false;
|
||||
} else if (password.value.length < 6) {
|
||||
passwordError.value = "密码至少6位字符";
|
||||
isValid = false;
|
||||
}
|
||||
return isValid;
|
||||
};
|
||||
const clearError = (field) => {
|
||||
if (field === "username") {
|
||||
usernameError.value = "";
|
||||
} else if (field === "password") {
|
||||
passwordError.value = "";
|
||||
}
|
||||
loginError.value = "";
|
||||
};
|
||||
const handleLogin = async () => {
|
||||
if (!validateForm()) {
|
||||
return;
|
||||
}
|
||||
isLoggingIn.value = true;
|
||||
loginError.value = "";
|
||||
try {
|
||||
const response = await mockLoginApi(username.value, password.value);
|
||||
if (response.success) {
|
||||
if (rememberMe.value) {
|
||||
uni.setStorageSync("yxd_username", username.value);
|
||||
} else {
|
||||
uni.removeStorageSync("yxd_username");
|
||||
}
|
||||
redirectUrl.value = response.redirectUrl;
|
||||
setTimeout(() => {
|
||||
openExternalLink();
|
||||
}, 2e3);
|
||||
}
|
||||
} catch (error) {
|
||||
loginError.value = error.message || "登录失败,请检查账号密码";
|
||||
} finally {
|
||||
isLoggingIn.value = false;
|
||||
}
|
||||
};
|
||||
function openExternalLink() {
|
||||
if (!redirectUrl.value)
|
||||
return;
|
||||
plus.runtime.openURL(redirectUrl.value);
|
||||
}
|
||||
const copyToClipboard = () => {
|
||||
if (!redirectUrl.value)
|
||||
return;
|
||||
uni.setClipboardData({
|
||||
data: redirectUrl.value,
|
||||
success: () => {
|
||||
copySuccess.value = true;
|
||||
setTimeout(() => {
|
||||
copySuccess.value = false;
|
||||
}, 2e3);
|
||||
}
|
||||
});
|
||||
};
|
||||
vue.onMounted(() => {
|
||||
const savedUsername = uni.getStorageSync("yxd_username");
|
||||
if (savedUsername) {
|
||||
username.value = savedUsername;
|
||||
rememberMe.value = true;
|
||||
}
|
||||
formatAppLog("log", "at pages/night-theme/night-theme.vue:267", "登录组件已挂载");
|
||||
});
|
||||
const __returned__ = { username, password, rememberMe, showPassword, isLoggingIn, redirectUrl, copySuccess, usernameError, passwordError, loginError, toggleRememberMe, mockLoginApi, validateForm, clearError, handleLogin, openExternalLink, copyToClipboard, ref: vue.ref, onMounted: vue.onMounted };
|
||||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||||
return __returned__;
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return vue.openBlock(), vue.createElementBlock("div", { class: "main-view" }, [
|
||||
vue.createElementVNode("div", { class: "container" }, [
|
||||
vue.createElementVNode("div", { class: "logo" }, [
|
||||
vue.createElementVNode("image", {
|
||||
src: _imports_0,
|
||||
alt: "YXD"
|
||||
})
|
||||
]),
|
||||
vue.createElementVNode("h1", null, "登录 YXD 智能应用"),
|
||||
vue.createElementVNode("div", { class: "login-form" }, [
|
||||
vue.createElementVNode("div", { class: "form-group" }, [
|
||||
vue.createElementVNode("label", { for: "username" }, "账号"),
|
||||
vue.withDirectives(vue.createElementVNode(
|
||||
"input",
|
||||
{
|
||||
id: "username",
|
||||
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.username = $event),
|
||||
type: "text",
|
||||
placeholder: "请输入账号/邮箱/手机号",
|
||||
class: vue.normalizeClass({ "error": $setup.usernameError }),
|
||||
onInput: _cache[1] || (_cache[1] = ($event) => $setup.clearError("username"))
|
||||
},
|
||||
null,
|
||||
34
|
||||
/* CLASS, NEED_HYDRATION */
|
||||
), [
|
||||
[vue.vModelText, $setup.username]
|
||||
]),
|
||||
$setup.usernameError ? (vue.openBlock(), vue.createElementBlock(
|
||||
"div",
|
||||
{
|
||||
key: 0,
|
||||
class: "error-message"
|
||||
},
|
||||
vue.toDisplayString($setup.usernameError),
|
||||
1
|
||||
/* TEXT */
|
||||
)) : vue.createCommentVNode("v-if", true)
|
||||
]),
|
||||
vue.createElementVNode("div", { class: "form-group" }, [
|
||||
vue.createElementVNode("label", { for: "password" }, "密码"),
|
||||
vue.createElementVNode("div", { class: "password-input" }, [
|
||||
vue.withDirectives(vue.createElementVNode("input", {
|
||||
id: "password",
|
||||
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.password = $event),
|
||||
type: $setup.showPassword ? "text" : "password",
|
||||
placeholder: "请输入密码",
|
||||
class: vue.normalizeClass({ "error": $setup.passwordError }),
|
||||
onInput: _cache[3] || (_cache[3] = ($event) => $setup.clearError("password")),
|
||||
onKeyup: vue.withKeys($setup.handleLogin, ["enter"])
|
||||
}, null, 42, ["type"]), [
|
||||
[vue.vModelDynamic, $setup.password]
|
||||
]),
|
||||
vue.createElementVNode("button", {
|
||||
type: "button",
|
||||
class: "toggle-password",
|
||||
onClick: _cache[4] || (_cache[4] = ($event) => $setup.showPassword = !$setup.showPassword)
|
||||
}, [
|
||||
$setup.showPassword ? (vue.openBlock(), vue.createElementBlock("span", { key: 0 }, "🙈")) : (vue.openBlock(), vue.createElementBlock("span", { key: 1 }, "👁️"))
|
||||
])
|
||||
]),
|
||||
$setup.passwordError ? (vue.openBlock(), vue.createElementBlock(
|
||||
"div",
|
||||
{
|
||||
key: 0,
|
||||
class: "error-message"
|
||||
},
|
||||
vue.toDisplayString($setup.passwordError),
|
||||
1
|
||||
/* TEXT */
|
||||
)) : vue.createCommentVNode("v-if", true)
|
||||
]),
|
||||
vue.createElementVNode("div", { class: "form-options" }, [
|
||||
vue.createElementVNode("label", {
|
||||
class: "remember-me",
|
||||
onClick: $setup.toggleRememberMe
|
||||
}, [
|
||||
vue.createElementVNode("div", { class: "custom-checkbox-wrapper" }, [
|
||||
vue.createElementVNode(
|
||||
"div",
|
||||
{
|
||||
class: vue.normalizeClass(["custom-checkbox", { "checked": $setup.rememberMe }])
|
||||
},
|
||||
[
|
||||
$setup.rememberMe ? (vue.openBlock(), vue.createElementBlock("span", { key: 0 }, "✓")) : vue.createCommentVNode("v-if", true)
|
||||
],
|
||||
2
|
||||
/* CLASS */
|
||||
)
|
||||
]),
|
||||
vue.createElementVNode("span", null, "记住账号")
|
||||
])
|
||||
]),
|
||||
vue.createElementVNode("button", {
|
||||
class: "login-btn",
|
||||
onClick: $setup.handleLogin,
|
||||
disabled: $setup.isLoggingIn
|
||||
}, [
|
||||
$setup.isLoggingIn ? (vue.openBlock(), vue.createElementBlock("span", { key: 0 }, "⏳")) : (vue.openBlock(), vue.createElementBlock("span", { key: 1 }, "🔑")),
|
||||
vue.createTextVNode(
|
||||
" " + vue.toDisplayString($setup.isLoggingIn ? "登录中..." : "立即登录"),
|
||||
1
|
||||
/* TEXT */
|
||||
)
|
||||
], 8, ["disabled"]),
|
||||
$setup.loginError ? (vue.openBlock(), vue.createElementBlock("div", {
|
||||
key: 0,
|
||||
class: "login-error"
|
||||
}, [
|
||||
vue.createElementVNode("span", null, "⚠️"),
|
||||
vue.createTextVNode(
|
||||
" " + vue.toDisplayString($setup.loginError),
|
||||
1
|
||||
/* TEXT */
|
||||
)
|
||||
])) : vue.createCommentVNode("v-if", true),
|
||||
$setup.redirectUrl ? (vue.openBlock(), vue.createElementBlock("div", {
|
||||
key: 1,
|
||||
class: "redirect-section"
|
||||
}, [
|
||||
vue.createElementVNode("div", { class: "success-message" }, [
|
||||
vue.createElementVNode("span", null, "✅"),
|
||||
vue.createTextVNode(" 登录成功!正在为您跳转... ")
|
||||
])
|
||||
])) : vue.createCommentVNode("v-if", true)
|
||||
])
|
||||
])
|
||||
]);
|
||||
}
|
||||
const PagesNightThemeNightTheme = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__scopeId", "data-v-197fbf56"], ["__file", "D:/Projects/uniapp/app-test/fronted-phone/pages/night-theme/night-theme.vue"]]);
|
||||
__definePage("pages/light-theme/light-theme", PagesLightThemeLightTheme);
|
||||
__definePage("pages/index/index", PagesIndexIndex);
|
||||
__definePage("pages/night-theme/night-theme", PagesNightThemeNightTheme);
|
||||
const _sfc_main = {
|
||||
onLaunch: function() {
|
||||
formatAppLog("log", "at App.vue:4", "App Launch");
|
||||
},
|
||||
onShow: function() {
|
||||
formatAppLog("log", "at App.vue:7", "App Show");
|
||||
},
|
||||
onHide: function() {
|
||||
formatAppLog("log", "at App.vue:10", "App Hide");
|
||||
}
|
||||
};
|
||||
const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:/Projects/uniapp/app-test/fronted-phone/App.vue"]]);
|
||||
function createApp() {
|
||||
const app = vue.createVueApp(App);
|
||||
return {
|
||||
app
|
||||
};
|
||||
}
|
||||
const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
|
||||
uni.Vuex = __Vuex__;
|
||||
uni.Pinia = __Pinia__;
|
||||
__app__.provide("__globalStyles", __uniConfig.styles);
|
||||
__app__._component.mpType = "app";
|
||||
__app__._component.render = () => {
|
||||
};
|
||||
__app__.mount("#app");
|
||||
})(Vue);
|
||||
Reference in New Issue
Block a user