diff --git a/vue/public/static/img/403.gif b/vue/public/static/img/403.gif deleted file mode 100644 index cd6e0d9..0000000 Binary files a/vue/public/static/img/403.gif and /dev/null differ diff --git a/vue/public/static/img/403.svg b/vue/public/static/img/403.svg new file mode 100644 index 0000000..610f136 --- /dev/null +++ b/vue/public/static/img/403.svg @@ -0,0 +1,508 @@ + + + + Group 9 + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vue/public/static/img/404.png b/vue/public/static/img/404.png deleted file mode 100644 index 3d8e230..0000000 Binary files a/vue/public/static/img/404.png and /dev/null differ diff --git a/vue/public/static/img/404.svg b/vue/public/static/img/404.svg new file mode 100644 index 0000000..5531d05 --- /dev/null +++ b/vue/public/static/img/404.svg @@ -0,0 +1,314 @@ + + + + Group 4 + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vue/public/static/img/404_cloud.png b/vue/public/static/img/404_cloud.png deleted file mode 100644 index c6281d0..0000000 Binary files a/vue/public/static/img/404_cloud.png and /dev/null differ diff --git a/vue/public/static/img/500.svg b/vue/public/static/img/500.svg new file mode 100644 index 0000000..de723b1 --- /dev/null +++ b/vue/public/static/img/500.svg @@ -0,0 +1,208 @@ + + + + Group 4 + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vue/public/static/img/sprite.1.2.4.png b/vue/public/static/img/sprite.1.2.4.png deleted file mode 100644 index eca4e8d..0000000 Binary files a/vue/public/static/img/sprite.1.2.4.png and /dev/null differ diff --git a/vue/src/component/Skeleton/PageSkeleton.vue b/vue/src/component/Skeleton/PageSkeleton.vue deleted file mode 100644 index 0b70484..0000000 --- a/vue/src/component/Skeleton/PageSkeleton.vue +++ /dev/null @@ -1,75 +0,0 @@ - - - diff --git a/vue/src/router/define.js b/vue/src/router/define.js index 0f93dac..f941f1c 100644 --- a/vue/src/router/define.js +++ b/vue/src/router/define.js @@ -1,8 +1,9 @@ import Layout from "@/layout/index" import Redirect from "@/view/app/redirect" import Login from "@/view/app/login/index" -import Page404 from "@/view/app/404" import Page403 from "@/view/app/403" +import Page404 from "@/view/app/404" +import Page500 from "@/view/app/500" import routes from './module' import {parseRoutes, stringifyRoutes} from "./util" @@ -28,12 +29,16 @@ export default [ alias: '/register', component: Login }, + { + path: '/403', + component: Page403 + }, { path: '/404', component: Page404 }, { - path: '/403', - component: Page403 + path: '/500', + component: Page500 } ] diff --git a/vue/src/router/index.js b/vue/src/router/index.js index b33fd3f..02a223f 100644 --- a/vue/src/router/index.js +++ b/vue/src/router/index.js @@ -15,7 +15,7 @@ import Vue from 'vue' import Router from 'vue-router' import {pathToRegexp} from 'path-to-regexp' import NProgress from 'nprogress' -import {contextPath, route as routeConfig, title} from '@/config' +import {route as routeConfig, title} from '@/config' import defaultRoutes from '@/router/define' import store from "@/store" import {stringifyRoutes, parseRoutes, generateRoutes} from './util' @@ -27,10 +27,10 @@ Vue.use(Router) NProgress.configure({showSpinner: false}) -const whiteList = transformWhiteList(['/login', '/register', '/404', '/403']) +const whiteList = transformWhiteList(['/login', '/register', '/403', '/404', '/500']) const router = new Router({ - base: contextPath, + base: process.env.BASE_URL, mode: routeConfig.mode, scrollBehavior: () => ({y: 0}), routes: defaultRoutes diff --git a/vue/src/router/module/defaultRoot/child/example.js b/vue/src/router/module/defaultRoot/child/example.js deleted file mode 100644 index 6b3bf40..0000000 --- a/vue/src/router/module/defaultRoot/child/example.js +++ /dev/null @@ -1,100 +0,0 @@ -/*路由表:演示用例*/ - -const router = { - path: 'example', - meta: {title: '演示用例', icon: 'svg-show', noAuth: true, noCache: true}, - children: [ - { - path: 'icon', - component: 'example/icon/', - meta: {title: '图 标'} - }, - { - path: 'taobao', - meta: {title: '淘宝iframe', iframe: 'https://www.taobao.com'} - }, - { - path: 'cool', - meta: {title: '好玩的东东'}, - children: [ - { - path: 'fluid', - component: 'example/cool/fluid', - meta: {title: '流体动画'} - }, - { - path: 'l2d', - component: 'example/cool/l2d', - meta: {title: '看板娘'} - }, - ] - }, - { - path: 'components', - meta: {title: '组件'}, - children: [ - { - path: 'uploadExample', - component: 'example/component/upload', - meta: {title: '上传文件'} - }, - { - path: 'skeletonExample', - component: 'example/component/skeleton', - meta: {title: '骨架屏'} - }, - { - path: 'rippleExample', - component: 'example/component/ripple', - meta: {title: '波纹'} - }, - { - path: 'signatureExample', - component: 'example/component/signature', - meta: {title: '手写签名'} - }, - { - path: 'regionSelectorExample', - component: 'example/component/regionSelector', - meta: {title: '行政区划选择'} - }, - { - path: 'treeSelectExample', - component: 'example/component/treeSelect', - meta: {title: '树选择'} - } - ] - }, - { - path: 'developingTest', - component: 'example/developingTest/', - meta: {title: '开发测试'} - }, - { - path: 'cacheTest', - meta: {title: '详情页缓存测试', noCache: false}, - children: [ - { - path: 'detailPage1', - component: 'example/cacheTest/detail', - meta: { - title: '详情页1', - usePathKey: true, - commonModule: '@/view/example/cacheTest/detailPage' - } - }, - { - path: 'detailPage2', - component: 'example/cacheTest/detail', - meta: { - title: '详情页2', - usePathKey: true, - commonModule: '@/view/example/cacheTest/detailPage' - } - } - ] - } - ] -} - -export default [] diff --git a/vue/src/router/util.js b/vue/src/router/util.js index 9d4cba6..2c60bb9 100644 --- a/vue/src/router/util.js +++ b/vue/src/router/util.js @@ -1,5 +1,6 @@ -import PageSkeleton from "@/component/Skeleton/PageSkeleton" import Layout from '@/layout' +import SkeletonPage from '@/view/app/common/SkeletonPage' +import Page500 from '@/view/app/500' import {isEmpty} from "@/util" import {isExternal} from "@/util/validate" @@ -105,7 +106,15 @@ export function generateRoutes(jsonTree) { else if (path.endsWith('Page')) path = path.replace('Page', '') else path = path.replace('Page.vue', '') - const AsyncHandler = () => ({component: import(`@/view/${path}Page.vue`), loading: PageSkeleton}) + //这里注意一点,如果设置了超时时间,那么超时后只能刷新整个页面才能重新加载该组件 + const AsyncHandler = () => ({ + component: import(`@/view/${path}Page.vue`), + loading: SkeletonPage, + error: Page500, + delay: 200, + timeout: 10000 + }) + return () => Promise.resolve({ functional: true, render(h, {data, children}) { diff --git a/vue/src/view/app/403.vue b/vue/src/view/app/403.vue index de05d55..4534108 100644 --- a/vue/src/view/app/403.vue +++ b/vue/src/view/app/403.vue @@ -1,123 +1,13 @@ -