提交 bbc6e844 编写于 作者: changdi.hao's avatar changdi.hao

增加根据分类查询列表

上级 ec54efda
...@@ -122,12 +122,8 @@ export default { ...@@ -122,12 +122,8 @@ export default {
pageSize: 15 pageSize: 15
}, },
category:[ category:[
{
value:'积木',
label:'积木'
}
], ],
categoryStatus:'积木', categoryStatus:'',
statuSelect: [ statuSelect: [
{ {
label: '未发布', label: '未发布',
...@@ -197,12 +193,25 @@ export default { ...@@ -197,12 +193,25 @@ export default {
console.log(this.categoryStatus) console.log(this.categoryStatus)
this.loading = true; this.loading = true;
let url = '/interaction/discuss/'+this.categoryStatus+'/'+subject+'/'+name+'/'+status+'/'+this.searchParam.pageNo+'/'+this.searchParam.pageSize let cStatus = this.categoryStatus ? this.categoryStatus : '0'; //'0'表示默认查所有的
let url = '/interaction/discuss/'+cStatus+'/'+subject+'/'+name+'/'+status+'/'+this.searchParam.pageNo+'/'+this.searchParam.pageSize
this.GET(url).then((res) => { this.GET(url).then((res) => {
this.loading = false this.loading = false
if( res.code == '000000' ) { if( res.code == '000000' ) {
this.tableData = res.data.discuss || [] console.log( res.data)
this.totalRows = res.data.count this.tableData = res.data.resp.discuss || []
this.totalRows = res.data.resp.count
if (res.data.typeList && res.data.typeList.length) {
let arr = [];
for(let i = 0; i < res.data.typeList.length; i++) {
let obj = {};
obj.label = res.data.typeList[i];
obj.value = res.data.typeList[i];
arr.push(obj);
}
this.category = arr;
}
} }
}) })
}, },
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册