Commit 499dffb7 authored by 智勇's avatar 智勇

up

parent 91e0f4db
...@@ -40,7 +40,7 @@ const user = { ...@@ -40,7 +40,7 @@ const user = {
// 获取用户信息 // 获取用户信息
GetInfo({ commit, state }) { GetInfo({ commit, state }) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getInfo(state.token).then(response => { getInfo().then(response => {
const data = response.data const data = response.data
data.roles = data.rank.indexOf('CHANNEL') !== -1 ? ['channel'] : ['admin'] data.roles = data.rank.indexOf('CHANNEL') !== -1 ? ['channel'] : ['admin']
if (data.roles && data.roles.length > 0) { // 验证返回的roles是否是一个非空数组 if (data.roles && data.roles.length > 0) { // 验证返回的roles是否是一个非空数组
......
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