diff --git a/.env.development b/.env.development index 994bb5f..45fa738 100644 --- a/.env.development +++ b/.env.development @@ -10,9 +10,9 @@ VITE_APP_PHONE = 18056811878 VITE_APP_ENV = 'development' # 寻驾/开发环境 -VITE_APP_BASE_API = 'https://cloud.ahduima.com/' +# VITE_APP_BASE_API = 'https://cloud.ahduima.com/' # VITE_APP_BASE_API = 'https://xj.ahduima.com/' -# VITE_APP_BASE_API = 'http://localhost:8889/' +VITE_APP_BASE_API = 'http://localhost:48080' # VITE_WEB_BASE_URL = 'https://xj.ahduima.com' # VITE_WEB_BASE_URL = 'https://xj.ahduima.com' diff --git a/src/api/login.js b/src/api/login.js index 6ce7e7c..0ec1ff4 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -1,21 +1,19 @@ -import request from '@/utils/request' +import request from '@/utils/request'; // 登录方法 -export function login(username, password, code, uuid) { +export function login(username, password) { const data = { username, - password, - code, - uuid - } + password + }; return request({ - 'url': '/login', + url: '/system/auth/login', headers: { isToken: false }, - 'method': 'post', - 'data': data - }) + method: 'post', + data: data + }); } // 注册方法 @@ -27,33 +25,33 @@ export function register(data) { }, method: 'post', data: data - }) + }); } // 获取用户详细信息 export function getInfo() { return request({ - 'url': '/getInfo', - 'method': 'get' - }) + url: '/system/auth/get-permission-info', + method: 'get' + }); } // 退出方法 export function logout() { return request({ - 'url': '/logout', - 'method': 'post' - }) + url: '/logout', + method: 'post' + }); } // 获取验证码 export function getCodeImg() { return request({ - 'url': '/captchaImage', + url: '/captchaImage', headers: { isToken: false }, method: 'get', timeout: 20000 - }) + }); } diff --git a/src/config.js b/src/config.js index 4643cd8..408f148 100644 --- a/src/config.js +++ b/src/config.js @@ -1,26 +1,13 @@ // 应用全局配置 export default { - baseUrl: 'https://vue.ruoyi.vip/prod-api', - // baseUrl: 'http://localhost:8080', + baseUrl: import.meta.env.VITE_APP_BASE_API + '/admin-api', // 应用信息 appInfo: { // 应用名称 name: '小程序管理后台', // 应用版本 - version: '1.2.0', + version: '1.0.0', // 应用logo - logo: '/static/logo.png', - // 官方网站 - // 政策协议 - agreements: [ - { - title: '隐私政策', - url: 'https://ruoyi.vip/protocol.html' - }, - { - title: '用户服务协议', - url: 'https://ruoyi.vip/protocol.html' - } - ] + logo: '/static/logo.png' } }; diff --git a/src/pages/login.vue b/src/pages/login.vue index a7c342e..481c14c 100644 --- a/src/pages/login.vue +++ b/src/pages/login.vue @@ -1,213 +1,582 @@ + + /* 登录卡片 */ + .login-card { + width: 100%; + max-width: 700rpx; + min-height: 1200rpx; + background-color: #ffffff; + border-radius: 24rpx; + box-shadow: 0 12rpx 48rpx rgba(0, 0, 0, 0.1); + padding: 80rpx 50rpx; + position: relative; + z-index: 1; + animation: slideUp 0.6s ease-out; + } + + @keyframes slideUp { + from { + opacity: 0; + transform: translateY(40rpx); + } + to { + opacity: 1; + transform: translateY(0); + } + } + + /* Logo部分 */ + .logo-section { + display: flex; + flex-direction: column; + align-items: center; + margin-bottom: 60rpx; + } + + .logo-wrapper { + width: 120rpx; + height: 120rpx; + border-radius: 24rpx; + background-color: #ecf5ff; + display: flex; + align-items: center; + justify-content: center; + margin-bottom: 32rpx; + box-shadow: 0 8rpx 24rpx rgba(64, 158, 255, 0.2); + } + + .car-icon { + font-size: 80rpx; + } + + .title-section { + text-align: center; + } + + .app-title { + display: block; + font-size: 36rpx; + font-weight: bold; + color: #303133; + margin-bottom: 12rpx; + } + + .app-subtitle { + display: block; + font-size: 24rpx; + color: #909399; + } + + /* 表单部分 */ + .form-section { + width: 100%; + } + + .form-group { + margin-bottom: 32rpx; + } + + .input-wrapper { + display: flex; + align-items: center; + background-color: #f9f9f9; + border: 2rpx solid #e0e0e0; + border-radius: 16rpx; + padding: 0 24rpx; + height: 90rpx; + transition: all 0.3s ease; + } + + .input-wrapper:focus-within { + border-color: #409eff; + background-color: #ffffff; + box-shadow: 0 0 0 8rpx rgba(64, 158, 255, 0.1); + } + + .input-icon { + width: 40rpx; + height: 40rpx; + display: flex; + align-items: center; + justify-content: center; + margin-right: 16rpx; + } + + .icon { + font-size: 32rpx; + } + + .form-input { + flex: 1; + height: 100%; + font-size: 28rpx; + color: #303133; + background-color: transparent; + } + + .input-placeholder { + color: #c0c4cc; + } + + .password-toggle { + width: 40rpx; + height: 40rpx; + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + } + + /* 表单选项 */ + .form-options { + display: flex; + align-items: center; + margin-bottom: 48rpx; + } + + .remember-password { + display: flex; + align-items: center; + } + + .checkbox { + margin-right: 16rpx; + } + + .checkbox-label { + font-size: 26rpx; + color: #606266; + } + + /* 操作部分 */ + .action-section { + margin-bottom: 32rpx; + } + + .login-btn { + width: 100%; + height: 88rpx; + line-height: 88rpx; + background-color: #409eff; + color: #ffffff; + font-size: 32rpx; + font-weight: 600; + border-radius: 16rpx; + border: none; + transition: all 0.3s ease; + } + + .login-btn:hover { + background-color: #66b1ff; + } + + .login-btn:active { + background-color: #3a8ee6; + transform: translateY(2rpx); + } + + .login-btn:disabled { + background-color: #a0cfff; + cursor: not-allowed; + } + + /* 注册部分 */ + .register-section { + text-align: center; + margin-bottom: 40rpx; + } + + .register-text { + font-size: 24rpx; + color: #606266; + } + + .register-link { + color: #409eff; + font-weight: 500; + margin-left: 8rpx; + } + + /* 协议部分 */ + .agreement-section { + text-align: center; + } + + .agreement-text { + font-size: 20rpx; + color: #909399; + line-height: 1.5; + } + + .agreement-link { + color: #409eff; + margin: 0 8rpx; + } + + /* 版权信息 */ + .copyright-section { + position: absolute; + bottom: 40rpx; + left: 0; + width: 100%; + text-align: center; + z-index: 1; + } + + .copyright-text { + font-size: 20rpx; + color: #c0c4cc; + } + + /* 响应式设计 */ + @media screen and (max-width: 375px) { + .login-card { + padding: 48rpx 32rpx; + } + + .app-title { + font-size: 32rpx; + } + + .app-subtitle { + font-size: 22rpx; + } + + .input-wrapper { + height: 84rpx; + } + + .login-btn { + height: 88rpx; + font-size: 28rpx; + } + } + + @media screen and (min-width: 768px) { + .login-card { + max-width: 700rpx; + padding: 160rpx 60rpx; + } + + .app-title { + font-size: 40rpx; + } + + .app-subtitle { + font-size: 26rpx; + } + + .input-wrapper { + height: 100rpx; + } + + .login-btn { + height: 104rpx; + font-size: 34rpx; + } + } + \ No newline at end of file diff --git a/src/pages/mine/index.vue b/src/pages/mine/index.vue index 8f0ea22..a92ca1a 100644 --- a/src/pages/mine/index.vue +++ b/src/pages/mine/index.vue @@ -161,6 +161,9 @@