diff --git a/src/components/DynamicForm.vue b/src/components/DynamicForm.vue new file mode 100644 index 0000000..2ea8863 --- /dev/null +++ b/src/components/DynamicForm.vue @@ -0,0 +1,320 @@ + + + + + diff --git a/src/config/index.js b/src/config/index.js index 728b28b..ab4e9b0 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -1,26 +1,26 @@ export default { APP_NAME: 'vueadmin', - DASHBOARD_URL: '/home', + DASHBOARD_URL: '/dashboard', // 白名单路由(不需要登录即可访问) whiteList: ['/login', '/register', '/reset-password'], //版本号 - APP_VER: "1.6.6", + APP_VER: '1.6.6', //内核版本号 - CORE_VER: "1.6.6", + CORE_VER: '1.6.6', //接口地址 - API_URL: "https://www.tensent.cn/admin/", + API_URL: 'https://www.tensent.cn/admin/', //请求超时 TIMEOUT: 50000, //TokenName - TOKEN_NAME: "authorization", + TOKEN_NAME: 'authorization', //Token前缀,注意最后有个空格,如不需要需设置空字符串 - TOKEN_PREFIX: "Bearer ", + TOKEN_PREFIX: 'Bearer ', //追加其他头 HEADERS: {}, @@ -28,24 +28,24 @@ export default { //请求是否开启缓存 REQUEST_CACHE: false, //语言 - LANG: "zh-cn", + LANG: 'zh-cn', //是否加密localStorage, 为空不加密 //支持多种加密方式: 'AES', 'BASE64', 'DES' - LS_ENCRYPTION: "", + LS_ENCRYPTION: '', //localStorage加密秘钥,位数建议填写8的倍数 - LS_ENCRYPTION_key: "2XNN4K8LC0ELVWN4", + LS_ENCRYPTION_key: '2XNN4K8LC0ELVWN4', //localStorage加密模式,AES支持: 'ECB', 'CBC', 'CTR', 'OFB', 'CFB' - LS_ENCRYPTION_mode: "ECB", + LS_ENCRYPTION_mode: 'ECB', //localStorage加密填充方式,AES支持: 'Pkcs7', 'ZeroPadding', 'Iso10126', 'Iso97971' - LS_ENCRYPTION_padding: "Pkcs7", + LS_ENCRYPTION_padding: 'Pkcs7', //localStorage默认过期时间(单位:小时),0表示永不过期 LS_DEFAULT_EXPIRE: 720, // 30天 //DES加密秘钥,必须是8字节 - LS_DES_key: "12345678", + LS_DES_key: '12345678', } diff --git a/src/config/routes.js b/src/config/routes.js index 18e45cc..2139573 100644 --- a/src/config/routes.js +++ b/src/config/routes.js @@ -2,55 +2,6 @@ * 静态路由配置 * 这些路由会根据用户角色进行过滤后添加到路由中 */ -const userRoutes = [ - { - path: '/home', - name: 'Home', - component: 'home', - meta: { - title: '首页', - icon: 'HomeOutlined', - affix: true, - noCache: false - } - }, - { - path: '/system', - name: 'System', - meta: { - title: '系统管理', - icon: 'SettingOutlined' - }, - children: [ - { - path: '/system/user', - name: 'SystemUser', - component: 'system/user', - meta: { - title: '用户管理', - icon: 'UserOutlined' - } - }, - { - path: '/system/role', - name: 'SystemRole', - component: 'system/role', - meta: { - title: '角色管理', - icon: 'TeamOutlined' - } - }, - { - path: '/system/menu', - name: 'SystemMenu', - component: 'system/menu', - meta: { - title: '菜单管理', - icon: 'MenuOutlined' - } - } - ] - } -] +const userRoutes = [] export default userRoutes diff --git a/src/layouts/components/tags.vue b/src/layouts/components/tags.vue index c27d6a2..4bdf46f 100644 --- a/src/layouts/components/tags.vue +++ b/src/layouts/components/tags.vue @@ -57,6 +57,7 @@ import { ref, computed, watch, onMounted } from 'vue' import { useRoute, useRouter } from 'vue-router' import { useLayoutStore } from '@/stores/modules/layout' import { ReloadOutlined, CloseOutlined, ColumnWidthOutlined, CloseCircleOutlined } from '@ant-design/icons-vue' +import config from '@/config' // 定义组件名称(多词命名) defineOptions({ @@ -107,7 +108,7 @@ const closeSelectedTag = (view) => { router.push(nextTag.fullPath) } else { // 如果没有其他标签,跳转到首页 - router.push('/home') + router.push(config.DASHBOARD_URL) } } } diff --git a/src/pages/ucenter/components/BasicInfo.vue b/src/pages/ucenter/components/BasicInfo.vue new file mode 100644 index 0000000..04ac4d0 --- /dev/null +++ b/src/pages/ucenter/components/BasicInfo.vue @@ -0,0 +1,105 @@ + + + + + diff --git a/src/pages/ucenter/components/Password.vue b/src/pages/ucenter/components/Password.vue new file mode 100644 index 0000000..52a66a2 --- /dev/null +++ b/src/pages/ucenter/components/Password.vue @@ -0,0 +1,81 @@ + + + + + diff --git a/src/pages/ucenter/components/ProfileInfo.vue b/src/pages/ucenter/components/ProfileInfo.vue new file mode 100644 index 0000000..bd1b3dc --- /dev/null +++ b/src/pages/ucenter/components/ProfileInfo.vue @@ -0,0 +1,73 @@ + + + + + diff --git a/src/pages/ucenter/components/Security.vue b/src/pages/ucenter/components/Security.vue new file mode 100644 index 0000000..c953293 --- /dev/null +++ b/src/pages/ucenter/components/Security.vue @@ -0,0 +1,85 @@ + + + + + diff --git a/src/pages/ucenter/index.vue b/src/pages/ucenter/index.vue new file mode 100644 index 0000000..a6f8ea4 --- /dev/null +++ b/src/pages/ucenter/index.vue @@ -0,0 +1,202 @@ + + + + + diff --git a/src/router/systemRoutes.js b/src/router/systemRoutes.js index 5289e34..8153830 100644 --- a/src/router/systemRoutes.js +++ b/src/router/systemRoutes.js @@ -1,3 +1,5 @@ +import config from '@/config' + /** * 基础路由(不需要登录) */ @@ -8,8 +10,8 @@ const systemRoutes = [ component: () => import('../pages/login/index.vue'), meta: { title: 'login', - hidden: true - } + hidden: true, + }, }, { path: '/register', @@ -17,8 +19,8 @@ const systemRoutes = [ component: () => import('../pages/login/userRegister.vue'), meta: { title: 'register', - hidden: true - } + hidden: true, + }, }, { path: '/reset-password', @@ -26,16 +28,16 @@ const systemRoutes = [ component: () => import('../pages/login/resetPassword.vue'), meta: { title: 'resetPassword', - hidden: true - } + hidden: true, + }, }, { path: '/', name: 'Layout', component: () => import('@/layouts/index.vue'), - redirect: '/home', - children: [] - } + redirect: config.DASHBOARD_URL, + children: [], + }, ] export default systemRoutes