diff --git a/src/App.vue b/src/App.vue
index 4393421..f199487 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,5 +1,5 @@
-
+
@@ -7,6 +7,7 @@
+
+
diff --git a/src/api/model/auth.ts b/src/api/model/auth.ts
index 226fd48..ed73e0d 100644
--- a/src/api/model/auth.ts
+++ b/src/api/model/auth.ts
@@ -6,5 +6,8 @@ export default {
},
menu: async function (data = {}) {
return await http.get("v1/menu", data)
- }
+ },
+ captcha: async function(data = {}){
+ return await http.get("v1/captcha", data);
+ },
}
diff --git a/src/locales/lang/en.ts b/src/locales/lang/en.ts
index 85e211a..6917bf1 100644
--- a/src/locales/lang/en.ts
+++ b/src/locales/lang/en.ts
@@ -2,5 +2,34 @@ export default {
system: {
webTitleDev: 'Property Management System (Testing)',
webTitle: 'Property Management System',
- }
-}
\ No newline at end of file
+ },
+ login: {
+ slogan: 'SpringCloud Alibaba Microservices Architecture',
+ describe: 'The community group',
+ signInTitle: 'Sign in',
+ accountLogin: 'Account sign in',
+ rememberMe: 'Remember me',
+ forgetPassword: 'Forget password',
+ signIn: 'Sign in',
+ signInOther: 'Sign in with',
+ userPlaceholder: 'user / phone / email',
+ userError: 'Please input a user name',
+ PWPlaceholder: 'Please input a password',
+ codePlaceholder: 'Please input a code',
+ PWError: 'Please input a password',
+ codeError: 'Please input a code',
+ wechatLoginTitle: 'QR code sign in',
+ wechatLoginMsg: 'Please use wechat to scan and log in | Auto scan after 3 seconds of simulation',
+ wechatLoginResult: 'Scanned | Please click authorize login in the device',
+ backLogin: 'Return to Login'
+ },
+ user: {
+ dynamic: 'Dynamic',
+ info: 'User Info',
+ settings: 'Settings',
+ nightmode: 'night mode',
+ nightmode_msg: 'Suitable for low light environment,The current night mode is beta',
+ language: 'language',
+ language_msg: 'Translation in progress,Temporarily translated the text of this view',
+ }
+}
diff --git a/src/locales/lang/zh-cn.ts b/src/locales/lang/zh-cn.ts
index 3a38335..9c61dfe 100644
--- a/src/locales/lang/zh-cn.ts
+++ b/src/locales/lang/zh-cn.ts
@@ -2,5 +2,34 @@ export default {
system: {
webTitleDev: '物业管理系统(测试)',
webTitle: '物业管理系统',
- }
+ },
+ login: {
+ slogan: 'SpringCloud Alibaba 微服务架构',
+ describe: '便民服务',
+ signInTitle: '用户登录',
+ accountLogin: '账号登录',
+ rememberMe: '记住密码',
+ forgetPassword: '忘记密码',
+ signIn: '登录',
+ signInOther: '其他登录方式',
+ userPlaceholder: '用户名 / 手机 / 邮箱',
+ userError: '请输入用户名',
+ PWPlaceholder: '请输入密码',
+ codePlaceholder: '请输入验证码',
+ PWError: '请输入密码',
+ codeError: '请输入验证码',
+ wechatLoginTitle: '二维码登录',
+ wechatLoginMsg: '请使用微信扫一扫登录 | 模拟3秒后自动扫描',
+ wechatLoginResult: '已扫描 | 请点击授权登录',
+ backLogin: '返回登录'
+ },
+ user: {
+ dynamic: '近期动态',
+ info: '个人信息',
+ settings: '设置',
+ nightmode: '黑夜模式',
+ nightmode_msg: '适合光线较弱的环境,当前黑暗模式为beta版本',
+ language: '语言',
+ language_msg: '翻译进行中,暂翻译了本视图的文本',
+ }
}
diff --git a/src/pi.ts b/src/pi.ts
index 082b13b..ec78539 100644
--- a/src/pi.ts
+++ b/src/pi.ts
@@ -1,19 +1,8 @@
-import config from "./config"
-import api from './api'
-import tools from './utils/tools'
-import http from "./utils/request"
-
import * as elIcons from '@element-plus/icons-vue'
import {App} from "vue";
export default {
install(app: App) {
- //挂载全局对象
- app.config.globalProperties.$CONFIG = config;
- app.config.globalProperties.$TOOLS = tools;
- app.config.globalProperties.$HTTP = http;
- app.config.globalProperties.$API = api;
-
//统一注册el-icon图标
for (let icon in elIcons) {
app.component(`ElIcon${icon}`, elIcons[icon])
diff --git a/src/style/dark.scss b/src/style/dark.scss
index fca73ef..1ffe791 100644
--- a/src/style/dark.scss
+++ b/src/style/dark.scss
@@ -1,4 +1,4 @@
-@import '~element-plus/theme-chalk/src/dark/css-vars.scss';
+@use 'element-plus/theme-chalk/src/dark/css-vars.scss';
html.dark {
//变量
diff --git a/src/style/style.scss b/src/style/style.scss
index 2ce45bb..9a3fc37 100644
--- a/src/style/style.scss
+++ b/src/style/style.scss
@@ -1,5 +1,5 @@
-@import 'app.scss';
-@import 'fix.scss';
-@import 'pages.scss';
-@import 'media.scss';
-@import 'dark.scss';
+@use 'app.scss';
+@use 'fix.scss';
+@use 'pages.scss';
+@use 'media.scss';
+@use 'dark.scss';
diff --git a/src/utils/request.ts b/src/utils/request.ts
index 46ae5ae..e716255 100644
--- a/src/utils/request.ts
+++ b/src/utils/request.ts
@@ -24,12 +24,12 @@ axios.interceptors.request.use((config) => {
//响应拦截
axios.interceptors.response.use((response) => {
let res = response.data
- if (res.code == 0) {
+ if (res.code == 200) {
return Promise.resolve(res)
- } else if (res.code == 1) { // 操作失败拦截
+ } else if (res.code == 400) { // 操作失败拦截
ElNotification.error({title: '操作失败', message: res.msg});
return Promise.reject(res)
- } else if (res.code == 2) { // 权限不足拦截
+ } else if (res.code == 500) { // 权限不足拦截
ElNotification.error({title: '权限不足', message: res.msg});
return Promise.reject(res)
} else { // 登录失效拦截
diff --git a/src/utils/tools.ts b/src/utils/tools.ts
index a481da9..88d510e 100644
--- a/src/utils/tools.ts
+++ b/src/utils/tools.ts
@@ -47,6 +47,12 @@ const tools = {
} catch (err) {
return [null, err]
}
+ },
+ crypto: {
+ //MD5加密
+ MD5(data){
+ return CryptoJS.MD5(data).toString()
+ },
}
}
diff --git a/src/views/system/login/components/commonPage.vue b/src/views/system/login/components/commonPage.vue
deleted file mode 100644
index 7ab2599..0000000
--- a/src/views/system/login/components/commonPage.vue
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/system/login/components/passwordForm.vue b/src/views/system/login/components/passwordForm.vue
deleted file mode 100644
index f39b9e8..0000000
--- a/src/views/system/login/components/passwordForm.vue
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('login.forgetPassword') }}?
-
-
-
- {{ $t('login.signIn') }}
-
-
-
-
-
-
-
-
-
diff --git a/src/views/system/login/components/wechatLogin.vue b/src/views/system/login/components/wechatLogin.vue
deleted file mode 100644
index 1850ea5..0000000
--- a/src/views/system/login/components/wechatLogin.vue
+++ /dev/null
@@ -1,151 +0,0 @@
-
-
-
-
-
{{wechatLoginMsg}}
-
-
-
-
- 重新获取
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/system/login/index.vue b/src/views/system/login/index.vue
index bc53ac5..fb3a274 100644
--- a/src/views/system/login/index.vue
+++ b/src/views/system/login/index.vue
@@ -4,14 +4,26 @@
-
+
-
+
- {{item.name}}
+ {{ item.name }}
+
@@ -19,127 +31,284 @@
-
-
diff --git a/vite-env.d.ts b/vite-env.d.ts
index 70300b5..9b22c86 100644
--- a/vite-env.d.ts
+++ b/vite-env.d.ts
@@ -1,5 +1,6 @@
// 如果使用 Vite 4+ 推荐官方类型
interface ImportMeta {
+ readonly env: ImportMetaEnv
readonly glob: (
pattern: string,
options?: { eager?: boolean; import?: string, query?: string }
@@ -11,10 +12,6 @@ interface ImportMetaEnv {
readonly VITE_APP_TITLE: string
}
-interface ImportMeta {
- readonly env: ImportMetaEnv
-}
-
declare module '*.vue' {
import type { DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
diff --git a/vite.config.ts b/vite.config.ts
index 63d9d9b..eec0b44 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -24,10 +24,10 @@ export default defineConfig(({mode, command}) => {
host: true,
// open: true,
proxy: {
- '/api': {
- target: 'https://mock.apipost.net/mock/2a749651c864000/',
+ '/dev-api': {
+ target: 'https://dev.api.leapy.cn/merchant/',
changeOrigin: true,
- rewrite: (p) => p.replace(/^\/api/, '')
+ rewrite: (p) => p.replace(/^\/dev-api/, '')
}
}
},