Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tsndu-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
魏吉光
tsndu-web
Commits
0eeca6f3
Commit
0eeca6f3
authored
Oct 24, 2020
by
weijiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
feb9957b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
31 deletions
+45
-31
src/libs/axios.js
+4
-2
src/main.js
+12
-14
src/view/company/companys/helper.js
+13
-15
src/view/main/index.js
+16
-0
No files found.
src/libs/axios.js
View file @
0eeca6f3
...
@@ -31,8 +31,9 @@ service.interceptors.response.use(
...
@@ -31,8 +31,9 @@ service.interceptors.response.use(
if
(
headers
[
"content-disposition"
])
{
if
(
headers
[
"content-disposition"
])
{
return
{
file
:
data
,
fileName
:
headers
[
"content-disposition"
]
};
return
{
file
:
data
,
fileName
:
headers
[
"content-disposition"
]
};
}
}
const
{
code
}
=
data
;
const
{
code
,
msg
}
=
data
;
const
{
msg
}
=
data
;
console
.
log
(
code
);
console
.
log
(
msg
);
switch
(
code
)
{
switch
(
code
)
{
case
1
:
case
1
:
return
data
;
return
data
;
...
@@ -42,6 +43,7 @@ service.interceptors.response.use(
...
@@ -42,6 +43,7 @@ service.interceptors.response.use(
desc
:
msg
desc
:
msg
});
});
localStorage
.
removeItem
(
"token"
);
localStorage
.
removeItem
(
"token"
);
localStorage
.
removeItem
(
"tokenInfo"
);
router
.
push
(
"/"
);
router
.
push
(
"/"
);
return
data
;
return
data
;
case
3
:
case
3
:
...
...
src/main.js
View file @
0eeca6f3
...
@@ -10,22 +10,20 @@ import "./index.less";
...
@@ -10,22 +10,20 @@ import "./index.less";
Vue
.
config
.
productionTip
=
false
;
Vue
.
config
.
productionTip
=
false
;
Vue
.
use
(
iView
);
Vue
.
use
(
iView
);
// Viewer.setDefaults({
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
// zIndex: 99999999,
if
(
to
.
path
==
"/"
)
{
// 判断该路由是否需要登录权限
// url(image) {
const
tokenInfo
=
localStorage
.
getItem
(
"tokenInfo"
);
// return image.getAttribute("url");
if
(
tokenInfo
)
{
// }
router
.
push
(
"/main"
);
// });
return
;
// Vue.use(Viewer);
}
next
();
}
else
{
next
();
}
})
new
Vue
({
new
Vue
({
router
,
router
,
render
:
h
=>
h
(
App
)
render
:
h
=>
h
(
App
)
}).
$mount
(
"#app"
)
}).
$mount
(
"#app"
)
// new Vue({
// el: '#app',
// router,
// components: { App },
// template: '<App/>'
// })
src/view/company/companys/helper.js
View file @
0eeca6f3
...
@@ -84,22 +84,20 @@ export const columns = (search, disable, enable, showEditExpired, showEdit, show
...
@@ -84,22 +84,20 @@ export const columns = (search, disable, enable, showEditExpired, showEdit, show
}
}
},
},
{
{
title
:
"省"
,
title
:
"地区"
,
key
:
"province"
,
align
:
"center"
,
align
:
"center"
,
minWidth
:
40
,
minWidth
:
80
,
},
render
(
h
,
{
row
})
{
{
try
{
title
:
"市"
,
const
{
province
,
city
,
district
}
=
row
;
key
:
"city"
,
if
(
province
||
city
||
district
)
{
align
:
"center"
,
return
h
(
"span"
,
`
${
province
}
/
${
city
}
/
${
district
}
`
);
minWidth
:
40
,
}
},
return
h
(
"span"
,
`未知`
);
{
}
catch
(
e
)
{
title
:
"区"
,
console
.
log
(
e
);
key
:
"district"
,
}
align
:
"center"
,
}
minWidth
:
40
,
},
},
{
{
title
:
"状态"
,
title
:
"状态"
,
...
...
src/view/main/index.js
View file @
0eeca6f3
...
@@ -39,6 +39,21 @@ export default {
...
@@ -39,6 +39,21 @@ export default {
}
}
});
});
},
},
clearMenus
()
{
this
.
maps
=
[];
for
(
var
i
in
routers
)
{
var
router
=
routers
[
i
];
router
.
visable
=
false
;
if
(
!
router
.
children
||
router
.
children
.
length
<=
0
)
{
continue
;
}
for
(
var
j
in
router
.
children
)
{
var
childRouter
=
router
.
children
[
j
];
childRouter
.
visable
=
false
;
}
}
},
getMenuFromRouter
(
key
)
{
getMenuFromRouter
(
key
)
{
var
maps
=
[];
var
maps
=
[];
for
(
var
i
in
routers
)
{
for
(
var
i
in
routers
)
{
...
@@ -82,6 +97,7 @@ export default {
...
@@ -82,6 +97,7 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
this
.
clearMenus
();
this
.
setMenus
();
this
.
setMenus
();
this
.
onMenuSelect
(
"home"
);
this
.
onMenuSelect
(
"home"
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment