first commit

This commit is contained in:
2026-01-15 14:46:42 +08:00
parent 3ccc482933
commit 4a0308a5a5
4 changed files with 19 additions and 63 deletions

View File

@@ -108,30 +108,6 @@
rememberMe.value = !rememberMe.value;
};
// 模拟登录API - 实际项目中替换为真实API
const mockLoginApi = (user, pwd) => {
return new Promise((resolve, reject) => {
setTimeout(() => {
// 模拟登录验证
if (user && pwd) {
// 模拟返回的跳转URL
resolve({
success: true,
redirectUrl: 'https://ws.yuxindazhineng.com',
userInfo: {
username: user,
name: '用户' + user.substring(0, 3)
}
});
} else {
reject({
success: false,
message: '账号或密码错误'
});
}
}, 1500);
});
};
// 表单验证
const validateForm = () => {
@@ -173,12 +149,12 @@
}
isLoggingIn.value = true;
loginError.value = '';s
loginError.value = '';
try {
// 发起实际API请求
const res = await uni.request({
url: 'http://cloud_test.yuxindazhineng.com/cloud_api/app/verify_domain',
url: 'http://cloud.yuxindazhineng.com/cloud_api/app/verify_domain',
method: 'POST',
header: {
'Content-Type': 'application/json'
@@ -196,6 +172,7 @@
// 解析接口响应数据
const responseData = res.data;
console.log(responseData);
// 业务层面的成功判断
if (responseData.success) {
@@ -212,7 +189,7 @@
console.log('域名前缀:', domainData.domain_prefix);
// 构建跳转URL
redirectUrl.value = `https://${domainData.full_domain}`;
redirectUrl.value = `http://${domainData.full_domain}`;
// 自动跳转
setTimeout(() => {