diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..78a752d --- /dev/null +++ b/.gitignore @@ -0,0 +1,23 @@ +.DS_Store +node_modules/ +dist/ +npm-debug.log* +yarn-debug.log* +yarn-error.log* +**/*.log + +tests/**/coverage/ +tests/e2e/reports +selenium-debug.log + +# Editor directories and files +.idea +.vscode +*.suo +*.ntvs* +*.njsproj +*.sln +*.local + +package-lock.json +yarn.lock diff --git a/src/assets/401_images/401.gif b/src/assets/401_images/401.gif new file mode 100644 index 0000000..cd6e0d9 Binary files /dev/null and b/src/assets/401_images/401.gif differ diff --git a/src/assets/404_images/404.png b/src/assets/404_images/404.png new file mode 100644 index 0000000..3d8e230 Binary files /dev/null and b/src/assets/404_images/404.png differ diff --git a/src/assets/404_images/404_cloud.png b/src/assets/404_images/404_cloud.png new file mode 100644 index 0000000..c6281d0 Binary files /dev/null and b/src/assets/404_images/404_cloud.png differ diff --git a/src/assets/icons/svg/404.svg b/src/assets/icons/svg/404.svg new file mode 100644 index 0000000..323fab0 --- /dev/null +++ b/src/assets/icons/svg/404.svg @@ -0,0 +1,4 @@ + + + diff --git a/src/store/modules/app.js b/src/store/modules/app.js new file mode 100644 index 0000000..367dd93 --- /dev/null +++ b/src/store/modules/app.js @@ -0,0 +1,66 @@ +import Cookies from 'js-cookie' + +const state = { + sidebar: { + opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true, + withoutAnimation: false, + hide: false + }, + device: 'desktop', + size: Cookies.get('size') || 'medium' +} + +const mutations = { + TOGGLE_SIDEBAR: state => { + if (state.sidebar.hide) { + return false; + } + state.sidebar.opened = !state.sidebar.opened + state.sidebar.withoutAnimation = false + if (state.sidebar.opened) { + Cookies.set('sidebarStatus', 1) + } else { + Cookies.set('sidebarStatus', 0) + } + }, + CLOSE_SIDEBAR: (state, withoutAnimation) => { + Cookies.set('sidebarStatus', 0) + state.sidebar.opened = false + state.sidebar.withoutAnimation = withoutAnimation + }, + TOGGLE_DEVICE: (state, device) => { + state.device = device + }, + SET_SIZE: (state, size) => { + state.size = size + Cookies.set('size', size) + }, + SET_SIDEBAR_HIDE: (state, status) => { + state.sidebar.hide = status + } +} + +const actions = { + toggleSideBar({commit}) { + commit('TOGGLE_SIDEBAR') + }, + closeSideBar({commit}, {withoutAnimation}) { + commit('CLOSE_SIDEBAR', withoutAnimation) + }, + toggleDevice({commit}, device) { + commit('TOGGLE_DEVICE', device) + }, + setSize({commit}, size) { + commit('SET_SIZE', size) + }, + toggleSideBarHide({commit}, status) { + commit('SET_SIDEBAR_HIDE', status) + } +} + +export default { + namespaced: true, + state, + mutations, + actions +} diff --git a/src/views/error/401.vue b/src/views/error/401.vue new file mode 100644 index 0000000..6282882 --- /dev/null +++ b/src/views/error/401.vue @@ -0,0 +1,96 @@ + + + + 返回 + + + + + 401错误! + + 您没有访问权限! + 对不起,您没有访问权限,请不要进行非法操作!您可以返回主页面 + + + + 回首页 + + + + + + + + + + + + + + diff --git a/src/views/error/404.vue b/src/views/error/404.vue new file mode 100644 index 0000000..192c806 --- /dev/null +++ b/src/views/error/404.vue @@ -0,0 +1,247 @@ + + + + + + + + + + + + 404错误! + + + {{ message }} + + + 对不起,您正在寻找的页面不存在。尝试检查URL的错误,然后按浏览器上的刷新按钮或尝试在我们的应用程序中找到其他内容。 + + + 返回首页 + + + + + + + + +