Commit 51edd222 by Sendya

Added error components

parent 3e060b65
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
</a-breadcrumb> </a-breadcrumb>
<div class="detail"> <div class="detail">
<div class="main"> <div class="main" v-if="!$route.meta.hiddenPageHeader">
<div class="row"> <div class="row">
<img v-if="logo" :src="logo" class="logo"/> <img v-if="logo" :src="logo" class="logo"/>
<h1 v-if="title" class="title">{{ title }}</h1> <h1 v-if="title" class="title">{{ title }}</h1>
......
...@@ -14,6 +14,7 @@ Vue.use(Router) ...@@ -14,6 +14,7 @@ Vue.use(Router)
* meta : { * meta : {
title: 'title' the name show in submenu and breadcrumb (recommend set) title: 'title' the name show in submenu and breadcrumb (recommend set)
icon: 'svg-name' the icon show in the sidebar, icon: 'svg-name' the icon show in the sidebar,
hiddenPageHeader: true if `hiddenPageHeader: true` will not show page-header(details)
} }
**/ **/
export const constantRouterMap = [ export const constantRouterMap = [
...@@ -181,8 +182,8 @@ export const asyncRouterMap = [ ...@@ -181,8 +182,8 @@ export const asyncRouterMap = [
{ {
path: '/result/success', path: '/result/success',
name: 'ResultSuccess', name: 'ResultSuccess',
component: () => import('../views/result/Success'), component: () => import(/* webpackChunkName: "result" */ '../views/result/Success'),
meta: { title: '成功' } meta: { title: '成功', hiddenPageHeader: true }
}, },
{ {
path: '/result/fail', path: '/result/fail',
...@@ -190,8 +191,8 @@ export const asyncRouterMap = [ ...@@ -190,8 +191,8 @@ export const asyncRouterMap = [
// route level code-splitting // route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route // this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited. // which is lazy-loaded when the route is visited.
component: () => import(/* webpackChunkName: "fail" */ '../views/result/Success'), component: () => import(/* webpackChunkName: "result" */ '../views/result/Error'),
meta: { title: '失败' } meta: { title: '失败', hiddenPageHeader: true }
} }
] ]
}, },
......
<template>
<a-card :bordered="false">
<result style="margin-bottom: 16px; margin-top: 48px" :is-success="false" :title="title" :description="description">
<template slot="action">
<a-button type="primary" >返回修改</a-button>
</template>
<div>
<div style="font-size: 16px; color: rgba(0, 0, 0, 0.85); font-weight: 500; margin-bottom: 16px">
您提交的内容有如下错误:
</div>
<div style="margin-bottom: 16px">
<a-icon type="close-circle-o" style="color: #f5222d; margin-right: 8px"/>
您的账户已被冻结
<a style="margin-left: 16px">立即解冻 <a-icon type="right" /></a>
</div>
<div>
<a-icon type="close-circle-o" style="color: #f5222d; margin-right: 8px"/>
您的账户还不具备申请资格
<a style="margin-left: 16px">立即升级 <a-icon type="right" /></a>
</div>
</div>
</result>
</a-card>
</template>
<script>
import Result from './Result'
export default {
name: "Error",
components: {
Result
},
data () {
return {
title: '提交失败',
description: '请核对并修改以下信息后,再重新提交。'
}
}
}
</script>
<style scoped>
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment