Commit 60bba2ce by liangjianmin

404

parent 8325f78c
......@@ -25,7 +25,7 @@ Vue.use(directive);
//处理顶部导航TAB
router.afterEach((to, from, next) => {
if (to.path == "/" || to.path == "/login") {
if (to.path == "/" || to.path == "/login" || to.path == '/notfound') {
return
}
let tabOldArr = sessionStorage.getItem('tabs');
......@@ -90,7 +90,7 @@ Vue.prototype.$http = http;
//路由页面回跳处理 mate里面参数 back:true 开启登录态回跳
router.beforeEach((to, from, next) => {
if (to.path == "/login") {
if (to.path == "/login" || to.path == '/notfound') {
next()
} else {
let token = Util.getCookie('token') || '';
......
......@@ -15,6 +15,7 @@ const Enter = resolve => require(['@/views/Store/enter.vue'], resolve);
const Goods = resolve => require(['@/views/Goods/goods.vue'], resolve);
const Message = resolve => require(['@/views/Info/message.vue'], resolve);
const Login = resolve => require(['@/views/User/login.vue'], resolve);
const notfound = resolve => require(['@/views/User/notfound.vue'], resolve);
const routes = [
//首页
......@@ -107,8 +108,6 @@ const routes = [
},
component: Message
},
{
path: '/login',
name: 'Login',
......@@ -118,6 +117,15 @@ const routes = [
},
component:Login
},
{
path: '/notfound',
name: 'notfound',
meta: {
title: '猎芯网',
back: true
},
component:notfound
},
/**错误页面重定向到首页**/
{
path: '*',
......
......@@ -79,8 +79,12 @@
<!--匹配库存-->
<template v-if="active==0">
<el-table :data="tableData" border style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column fixed prop="goods_name" label="型号" width="180">
<el-table-column fixed label="操作" width="100" align="center" v-if="'show'">
<template slot-scope="scope">
<el-button type="primary" plain size="mini" @click="handle(scope.$index, scope.row)">确认</el-button>
</template>
</el-table-column>
<el-table-column fixed prop="goods_name" label="型号" width="180"></el-table-column>
<el-table-column fixed prop="goods_sn" label="供应商内部型号编码" width="180">
</el-table-column>
<el-table-column fixed prop="brand_name" label="品牌" width="180">
......
<template>
<div class="notfound">
<img src="../../assets/images/notfound.png" alt="">
</div>
</template>
<script>
export default {
name: "notfound",
data() {
return {};
}
};
</script>
<style>
.notfound {
width: 100%;
margin: 0 auto;
text-align: center;
}
.notfound img {
display: block;
margin: 0 auto;
}
</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 sign in to comment