Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
d0008eb6
Commit
d0008eb6
authored
Apr 17, 2020
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
a254c334
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
1 deletions
+54
-1
iview-admin/src/api/meta.js
+17
-0
iview-admin/src/router/index.js
+2
-0
iview-admin/src/store/module/meta.js
+34
-0
iview-admin/src/view/components/tables/tables.vue
+1
-1
No files found.
iview-admin/src/api/meta.js
0 → 100644
View file @
d0008eb6
import
axios
from
'@/libs/api.request'
export
const
fetchListInfo
=
()
=>
{
return
axios
.
request
({
url
:
'/web/common/metaCtl/fetchListInfo'
,
method
:
'post'
})
}
export
const
uploadImg
=
formData
=>
{
return
axios
.
request
({
url
:
'image/upload'
,
data
:
formData
})
}
iview-admin/src/router/index.js
View file @
d0008eb6
...
...
@@ -7,6 +7,8 @@ import { setToken, getToken, canTurnTo, setTitle } from '@/libs/util'
import
config
from
'@/config'
const
{
homeName
}
=
config
Vue
.
use
(
Router
)
const
router
=
new
Router
({
routes
,
...
...
iview-admin/src/store/module/meta.js
0 → 100644
View file @
d0008eb6
import
{
setToken
,
getToken
}
from
'@/libs/util'
export
default
{
state
:
{
},
mutations
:
{
setAvatar
(
state
,
avatarPath
)
{
state
.
avatarImgPath
=
avatarPath
},
},
getters
:
{
messageUnreadCount
:
state
=>
state
.
messageUnreadList
.
length
,
},
actions
:
{
// 登录
handleLogin
({
commit
},
{
userName
,
password
})
{
userName
=
userName
.
trim
()
return
new
Promise
((
resolve
,
reject
)
=>
{
login
({
userName
,
password
}).
then
(
res
=>
{
const
data
=
res
.
data
commit
(
'setToken'
,
data
.
token
)
resolve
()
}).
catch
(
err
=>
{
reject
(
err
)
})
})
}
}
}
iview-admin/src/view/components/tables/tables.vue
View file @
d0008eb6
...
...
@@ -24,7 +24,7 @@ export default {
{
title
:
'Handle'
,
key
:
'handle'
,
button
:
[
button
:
[
//这个数组中内容,需要按照权限字符串,在服务端构造
{
title
:
"删除"
,
type
:
"text"
,
icon
:
"md-trash"
,
key
:
"delete"
},
{
title
:
"编辑"
,
type
:
"text"
,
icon
:
""
,
key
:
"edit"
},
{
title
:
"启用"
,
type
:
"text"
,
icon
:
""
,
key
:
"enable"
},
...
...
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