Commit ec65fae9 by 李伟康

commit

1 parent 198fa1b1
...@@ -56,27 +56,30 @@ export default { ...@@ -56,27 +56,30 @@ export default {
}, },
activated () { activated () {
ssoApi.getPermission().then(data => { ssoApi.getPermission().then(data => {
let [merchantProTreeResponses] = data[0].products[0].merchantProTreeResponses if (data && data.length) {
if (merchantProTreeResponses) { let [merchantProTreeResponses] = data[0].products[0].merchantProTreeResponses
let list = merchantProTreeResponses.children if (merchantProTreeResponses) {
if (list && list.length) { let list = merchantProTreeResponses.children
list.map(e => { if (list && list.length) {
if (e.children) { list.map(e => {
e.children.map(i => { if (e.children) {
let [url, item] = i.menuUrl.split('@') e.children.map(i => {
let [target, icon] = item.split('|') let [url, item] = i.menuUrl.split('@')
let [link, query] = url.split('?') let [target, icon] = item.split('|')
i.icon = icon let [link, query] = url.split('?')
i.link = link i.icon = icon
i.target = target i.link = link
i.query = query i.target = target
}) i.query = query
} })
}) }
console.log(list) })
this.list = list console.log(list)
this.list = list
}
} }
} }
this.flag = true this.flag = true
}) })
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!