diff --git a/src/apis/login.js b/src/apis/login.js new file mode 100644 index 0000000..b97cee8 --- /dev/null +++ b/src/apis/login.js @@ -0,0 +1,10 @@ +import request from "@/request/index.js"; + +// 登录 +export const login = (data) => { + return request({ + url: 'login', + method: 'post', + data, + }) +}; \ No newline at end of file diff --git a/src/assets/bg.jpg b/src/assets/bg.jpg new file mode 100644 index 0000000..2f9e997 Binary files /dev/null and b/src/assets/bg.jpg differ diff --git a/src/i18n/language/en.js b/src/i18n/language/en.js index 831850b..7d5b0bc 100644 --- a/src/i18n/language/en.js +++ b/src/i18n/language/en.js @@ -3,4 +3,13 @@ export default { personnalCenter: "Personal Center", login: "Login", logout: "Exit", + form: { + username: "Username", + usernameHolder: "Please enter your username.", + usernameError: + "Username can only start with an alphabet and contains 4~32 characters with alphabet, _ and -.", + password: "Password", + passwordHolder: "Please enter your password.", + passwordError: "Please enter a password of at least 4 characters", + }, } \ No newline at end of file diff --git a/src/i18n/language/zh-cn.js b/src/i18n/language/zh-cn.js index d038bf2..637f1df 100644 --- a/src/i18n/language/zh-cn.js +++ b/src/i18n/language/zh-cn.js @@ -1,6 +1,14 @@ export default { sitename: "权限管理系统", - personnalCenter: "个人中心", + personalCenter: "个人中心", login: "登录", logout: "退出", + form:{ + username: "用户名", + usernameHolder: "请输入用户名", + usernameError: "用户名由英文字母开头的长度4-32位字母、_和-组成", + password: "密码", + passwordHolder: "请输入密码", + passwordError: "至少输入4个字符的密码", + } } \ No newline at end of file diff --git a/src/layout/components/PageHeader.vue b/src/layout/components/PageHeader.vue index 9d54e93..746ec72 100644 --- a/src/layout/components/PageHeader.vue +++ b/src/layout/components/PageHeader.vue @@ -38,7 +38,7 @@ - {{ t('personnalCenter') }} + {{ t('personalCenter') }} {{ t('logout') }} diff --git a/src/views/login/index.vue b/src/views/login/index.vue index caaefb8..de35ef7 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -1,19 +1,70 @@ - 这是登录页面 - 测试 + + + + {{ t('login') }} + + + + + + + + + {{ t('login') }} + + + + + +