Commit d0008eb6 by 蒋勇

d

parent a254c334
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
})
}
......@@ -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,
......
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)
})
})
}
}
}
......@@ -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"},
......
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