Commit 2738722c by 莫晓莉

首页搜索

parent ce115153
......@@ -107,3 +107,12 @@ export function latestNewOfGXCourt(data) {
})
}
//按栏目名搜索栏目
export function findBoard(data) {
return request({
url: `websiteCluster/web/findBoard`,
method: 'POST',
data,
})
}
......@@ -25,7 +25,7 @@
</ul>-->
<!-- <el-tree :data="dataTreeFile" :props="defaultProps"></el-tree> -->
<div style="height: 65vh;over-flow:hidden;overflow:auto;">
<el-tree :data="dataTreeFile" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
<el-tree default-expand-all :data="dataTreeFile" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
</div>
</div>
</el-col>
......@@ -182,6 +182,9 @@ import {
newsFromBoard, //获取栏目下的新闻列表
getSubLevelBoard
} from "@/api/list.js";
import {
getSelectedBoardTree,//获取指定栏目树
} from "@/api/homePage.js"
export default {
name: "show",
......@@ -313,8 +316,12 @@ export default {
getSubLevelBoardF(boardId){
var params={};
params.boardId=boardId;
getSubLevelBoard(JSON.stringify(params)).then(res=>{
console.log(res);
// getSubLevelBoard(JSON.stringify(params)).then(res=>{
// console.log(res);
// this.dataTreeFile = res.data
// })
getSelectedBoardTree(params).then(res=>{
console.log('获取指定栏目树=',res);
this.dataTreeFile = res.data
})
},
......
......@@ -118,7 +118,7 @@ export default {
},
methods:{
getLatestNewOfGXCourt(){
this.pageInfo.deptId=32;
// this.pageInfo.deptId=32;
latestNewOfGXCourt(this.pageInfo).then(res=>{
if(res.success){
this.moreNewsList=res.data.records;
......
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