diff --git a/src/api/upload-api.js b/src/api/upload-api.js index 2971c5b..7f7ebd0 100644 --- a/src/api/upload-api.js +++ b/src/api/upload-api.js @@ -4,6 +4,8 @@ const qs = require('qs') export default { // 上传 simpleUploadURL: process.env.VUE_APP_BASE_API + '/upload', + // 上传头像 + simpleUploadAvatarURL: process.env.VUE_APP_BASE_API + '/upload', // 合并 mergeSimpleUpload: function(params) { return request({ diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index a69b077..6cbf83f 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -7,23 +7,25 @@
- +
- + - Home + 个人信息 - - Github - - - Docs - + + + + + + + + - Log Out + 退出登录
diff --git a/src/router/index.js b/src/router/index.js index d4f2a7e..7e31dfc 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -86,6 +86,18 @@ export const constantRoutes = [ ] }, + { + path: '/userinfo', + component: Layout, + children: [ + { + path: '', + name: 'userInfo', + component: () => import('@/views/userInfo/index'), + } + ] + }, + { path: '/share', component: Layout, @@ -156,7 +168,7 @@ export const constantRoutes = [ children: [ { path: '', - name: 'share', + name: 's', component: () => import('@/views/public/share/shareList'), } ] diff --git a/src/views/form/index.vue b/src/views/form/index.vue index 5028bd8..e68301f 100644 --- a/src/views/form/index.vue +++ b/src/views/form/index.vue @@ -1,17 +1,84 @@ + + diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 25b163d..e0cf275 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -60,14 +60,14 @@ export default { data() { const validateUsername = (rule, value, callback) => { if (!this.validUsername(value)) { - callback(new Error('Please enter the correct user name')) + callback(new Error('请输入正确的用户名')) } else { callback() } } const validatePassword = (rule, value, callback) => { if (value.length < 6) { - callback(new Error('The password can not be less than 6 digits')) + callback(new Error('密码不能少于6位数字')) } else { callback() } diff --git a/src/views/userInfo/index.vue b/src/views/userInfo/index.vue new file mode 100644 index 0000000..1e059ee --- /dev/null +++ b/src/views/userInfo/index.vue @@ -0,0 +1,141 @@ + + + + +