|
@@ -283,7 +283,8 @@ export default {
|
|
|
let allMenu = result.data;
|
|
|
for (let item of allMenu) {
|
|
|
if (item.type === 'content') {
|
|
|
- item.path = `/info/detail?id=${item.content_id}`;
|
|
|
+ if (this.user === 'master') item.path = `/master/news/${item.content_id}`;
|
|
|
+ else item.path = `/info/detail?id=${item.content_id}`;
|
|
|
} else if (item.type !== 'url') {
|
|
|
let res = await this.completeMenu(item);
|
|
|
item.children = res;
|
|
@@ -299,8 +300,12 @@ export default {
|
|
|
if (`${res.errcode}` === '0') {
|
|
|
//组合path:res.data内容都为栏目.所以,点击这些栏目显示的列表应该是信息列表,需要用栏目的id作为查询信息的parten_id查出不同栏目的信息
|
|
|
for (const col of res.data) {
|
|
|
- if (col.type === 'content') col.path = `/info/detail?id=${col.content_id}`;
|
|
|
- else if (col.type !== 'url') col.path = `/info/list/${col.id}`;
|
|
|
+ if (col.type === 'content') {
|
|
|
+ if(this.user === 'master') {
|
|
|
+ col.path = `/master/`
|
|
|
+ }
|
|
|
+ col.path = `/info/detail?id=${col.content_id}`;
|
|
|
+ } else if (col.type !== 'url') col.path = `/info/list/${col.id}`;
|
|
|
}
|
|
|
return res.data;
|
|
|
}
|