|
@@ -37,6 +37,12 @@
|
|
|
<div class="container" style="margin: 15px auto">
|
|
|
<el-row>
|
|
|
<el-col :span="18" class="project-task">
|
|
|
+ <CrowdTool
|
|
|
+ :toolList = techArticleList.content v-if="searchType=='2'">
|
|
|
+ </CrowdTool>
|
|
|
+ <CrowdCase
|
|
|
+ :toolList = techArticleList.content v-if="searchType=='3'" @refreshList="loadTechnologyArticles(activePage)">
|
|
|
+ </CrowdCase>
|
|
|
<TechnologyCard
|
|
|
:techArticleList = techArticleList.content v-if="searchType=='0'" @refreshList="loadTechnologyArticles(activePage)">
|
|
|
</TechnologyCard>
|
|
@@ -66,6 +72,8 @@
|
|
|
import SearchBar from '../../components/commons/SearchBar'
|
|
|
import TechnologyCard from './TechnologyCard'
|
|
|
import TechnologyMG from './TechnologyMG'
|
|
|
+ import CrowdCase from './CrowdCase'
|
|
|
+ import CrowdTool from './CrowdTool'
|
|
|
import HotActicle from './HotActicle'
|
|
|
import PopularProject from '../Square/PopularProject'
|
|
|
import {storageGet} from '@/js/index.js'
|
|
@@ -78,16 +86,28 @@
|
|
|
TechnologyCard,
|
|
|
TechnologyMG,
|
|
|
PopularProject,
|
|
|
- HotActicle
|
|
|
+ HotActicle,
|
|
|
+ CrowdCase,
|
|
|
+ CrowdTool
|
|
|
},
|
|
|
data(){
|
|
|
return {
|
|
|
loading: false,
|
|
|
isLogin: false,
|
|
|
searchVal: '',
|
|
|
- searchType:'',
|
|
|
+ searchType:'2',
|
|
|
searchTypeArr:[
|
|
|
{
|
|
|
+ "name": "众测工具",
|
|
|
+ "value": "2",
|
|
|
+ "label":'工具'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "众测案例",
|
|
|
+ "value": "3",
|
|
|
+ "label":'案例'
|
|
|
+ },
|
|
|
+ {
|
|
|
"name": "技术文章",
|
|
|
"value": "0",
|
|
|
"label":'文章'
|
|
@@ -115,7 +135,6 @@
|
|
|
},
|
|
|
checkCreateProjectAuth() {
|
|
|
if (!this.isLogin) {
|
|
|
- console.log("请登录后访问");
|
|
|
notify('warning', '请登录后访问');
|
|
|
} else if (this.isLogin) {
|
|
|
Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
|
|
@@ -143,8 +162,6 @@
|
|
|
})
|
|
|
},
|
|
|
loadTechnologyArticles(index){
|
|
|
- // let url=`/api/technical/articles?searchCondition={"keyword":"${this.keyword}","activePage":${this.activePage}}`;
|
|
|
- // Http.get(encodeURI(url))
|
|
|
let url = '/api/technical/articles';
|
|
|
this.activePage = index;
|
|
|
let params = {
|
|
@@ -157,17 +174,21 @@
|
|
|
"enums": this.searchTypeArr,
|
|
|
"value": this.searchType//展示技术文章value为0
|
|
|
}
|
|
|
- ]
|
|
|
- }
|
|
|
+ ],
|
|
|
+ "sortType":this.searchType === '2' ? 'id' :null
|
|
|
+ };
|
|
|
Http.post(url,params)
|
|
|
.then(res=>{
|
|
|
+ console.log(res.data)
|
|
|
if(res.data.technicalArticlesPage){
|
|
|
this.techArticleList = res.data.technicalArticlesPage;
|
|
|
- this.searchType = '0';
|
|
|
+ // this.searchType = '0';
|
|
|
}
|
|
|
else if(res.data.publicationsPage){
|
|
|
this.techArticleList = res.data.publicationsPage;
|
|
|
- this.searchType = '1';
|
|
|
+ // this.searchType = '1';
|
|
|
+ }else if(res.data.toolVOPage){
|
|
|
+ this.techArticleList = res.data.toolVOPage;
|
|
|
}
|
|
|
})
|
|
|
},
|