Commit 6299de14 authored by anxixi's avatar anxixi

文章发布展示

parent 26ed7262
......@@ -170,7 +170,7 @@ router.beforeEach((to, from, next) => {
if(!publicFun.getCookie("userInfo")){
if(to.name == 'dashboard'||to.name=='indexView'|| to.name == 'login' || to.name == 'mobileLoginCmpt'|| to.name == 'emailLoginCmpt'|| to.name == 'mobileRegisterCmpt'|| to.name == 'emailRegisterCmpt'||to.name=='completeInfoCmpt'|| to.name == 'successCmpt'||to.name=='findPasswordCmpt'||to.name=='modifyPasswordCmpt'||to.name=='passSuccessCmpt'||to.name=='indexView'||to.name=="mobileIndex"||to.name=="mobileLogin"||to.name=="loginByPhone"||to.name=="loginByEmail"||to.name=="mobileRegister"||to.name=="duijieshareRequire"||to.name=="duijieshareProject"||to.name=="knowledgeList"||to.name=="knowledgeDetail"||to.name=='vip'||to.name=='vipList'||to.name=='loadEmail'||to.name=='openEmail'||to.name=="viewRequire"||to.name=="duijiephoneBusinessList"||to.name=="duijiephoneBusinessDetail"||to.name=="duijiephoneRequireDetail"||to.name=="bigBusinessList"||to.name=="bigBusinessDetail"||to.name=="requireDetail"||to.name=="mixSearch"||to.name=="activitylist"||to.name=="activitydetail"||to.name=="activitySearchResult"||to.name=="activityapplyForProject"||to.name=='wechatLogin'||to.name=='newPage'||to.name=='bindAccount'||to.name=='subjectsecondStage'||to.name=='subjectsecondStageDetail'||to.name=='subjectmasterComment'||to.name=='subjectmasterList'||to.name=='subjectmasterDetail'||to.name=='subjectfirstStage'||to.name=='subjectcommentMore'||to.name=='subjectList'||to.name=="subjectresultpage"||to.name=="mineIndex"||to.name=="subjectStage"||to.name=="articleList"||to.name=="articleDetail"||to.name=="mobileSearch"){
} else{
if(to.path == '/tabconnect'||to.path == '/thirdStage'||to.path == '/questionfill'||to.path == '/questionfillpc'||to.path == '/casedetailschild'||to.path == '/lndustryfocuschild'||to.path == '/successfulcasechild'||to.path == '/projectdetails'||to.path == '/seeprojectlist'||to.path == '/projectlist'||to.path == '/viewproject'||to.path == '/templateMobile1'||to.path == '/knowledge'||to.path == '/knowledgedetails'||to.path == '/termserviceed'||to.path == '/privacypolicyed'||to.path == '/contactused'||to.path == '/aboutused'||to.path == '/casedetailsed'||to.path == '/lndustryfocused'||to.path == '/successfulcaseed'||to.path == '/usehelped'||to.path == '/useHelp'||to.path == '/reminder'||to.path == '/contactus' ||to.path == '/privacypolicy' ||to.path == '/termservice' ||to.path == '/casedetails' ||to.path == '/successfulcase' ||to.path == '/lndustryfocus' ||to.path == '/aboutus'||to.path=='/applicationnotice' ){
if(to.path == '/contentall'||to.path == '/contentdetail'||to.path == '/tabconnect'||to.path == '/thirdStage'||to.path == '/questionfill'||to.path == '/questionfillpc'||to.path == '/casedetailschild'||to.path == '/lndustryfocuschild'||to.path == '/successfulcasechild'||to.path == '/projectdetails'||to.path == '/seeprojectlist'||to.path == '/projectlist'||to.path == '/viewproject'||to.path == '/templateMobile1'||to.path == '/knowledge'||to.path == '/knowledgedetails'||to.path == '/termserviceed'||to.path == '/privacypolicyed'||to.path == '/contactused'||to.path == '/aboutused'||to.path == '/casedetailsed'||to.path == '/lndustryfocused'||to.path == '/successfulcaseed'||to.path == '/usehelped'||to.path == '/useHelp'||to.path == '/reminder'||to.path == '/contactus' ||to.path == '/privacypolicy' ||to.path == '/termservice' ||to.path == '/casedetails' ||to.path == '/successfulcase' ||to.path == '/lndustryfocus' ||to.path == '/aboutus'||to.path=='/applicationnotice' ){
}else{
if(to.path == '/projectlist' || to.path == '/phoneBusinessList'){
......
......@@ -53,7 +53,7 @@
<span v-for="(item,index) in scope.row.channelList" :key="index"> {{item}} <i> {{scope.row.channelList.length-1 == index ? '' : '、'}} </i></span>
</template>
</el-table-column>
<el-table-column prop="publishTime" label="发布时间" align="center">
<el-table-column prop="createdTime" label="发布时间" align="center">
</el-table-column>
<el-table-column prop="empName" label="发布人" align="center">
</el-table-column>
......
......@@ -36,9 +36,9 @@
methods: {
getsaveSettingInfo(){
if(this.value){
this.infoData.isOpenComment = 1;
}else{
this.infoData.isOpenComment = 0;
}else{
this.infoData.isOpenComment = 1;
}
api.saveSettingInfo(this.infoData).then(response => {
if(response.code == 0) {
......@@ -57,7 +57,7 @@
if(response.code == 0) {
if(response.result){
this.infoData = response.result;
if(this.infoData.isOpenComment == 1){
if(this.infoData.isOpenComment == 0){
this.value = true;
}else{
this.value = false;
......
......@@ -63,7 +63,7 @@
</li>
</ul>
<p style="color: #9197B4;margin-top: 40px;" v-if="loading">加载中...</p>
<p style="color: #9197B4;margin-top: 40px;" v-if="noMore">没有更多了</p>
<p style="color: #9197B4;margin-top: 40px;" v-if="!loading">没有更多了</p>
</div>
<div style="width: 320px;">
<hotArticlepage></hotArticlepage>
......
......@@ -9,7 +9,7 @@ export default {
//获取首页推荐文章信息
getIndexTopNArticle(params){
return api.fetchGet(baseUrl+"/index/getIndexTopNArticle");
return api.fetchGet(baseUrl+"/index/getIndexTopNArticle?count="+params);
},
//获取首页推荐公司展示信息
......
......@@ -78,6 +78,58 @@
</div>
</div>
<div class="tabWrapper">
<div class="topUpdateTitle">
<h4>{{$t("topNav.newsArticle")}}</h4>
<div class="borderBottom40px"></div>
<span class="lookmoreBtn" @click="handleMore(6)">{{$t("indexCount.lookMore")}}></span>
</div>
<div>
<ul class="contentlist_ul">
<li class="contentlist_li" v-for="(item,index) in articleList" :key="index" @click="gocontentdetail(item)">
<div v-if="item.contentCoverUrl || item.contentUrl">
<div>
<img :src="item.contentCoverUrl?item.contentCoverUrl:item.contentUrl.split(',')[0]?item.contentUrl.split(',')[0]:''" alt="图片" style="border-radius: 3px; border:1px solid #DCDFF1; width: 200px;height: 114px;">
</div>
<div>
<div>
<p>{{item.contentTitle}}</p>
<div class="state_code">
<p>
<span style="color: #FF5D5D;" v-if="item.codeList && item.codeList.indexOf('CT001') > -1"> 置顶 </span>
<span v-if="item.contentSourceType == 0">原创</span>
<span>{{item.contentBrowseStr}} 阅读量</span>
<span>{{item.publishDateStr}}</span>
<span style="background: #F8F8F8;padding: 3px 10px;">{{item.classifyList[0].classifyName}}</span>
</p>
</div>
</div>
</div>
</div>
<el-row style="width: 100%;" v-else>
<div style="width: 100%;">
<div style="width: 100%;">
<p style="font-size: 18px;font-weight: bold;color: #1A1A1E;margin-bottom: 5px;">{{item.contentTitle}}</p>
<p style="color: #9197B4;margin-bottom: 20px;">{{item.contentValidity}}</p>
</div>
<div class="isstate_code">
<p>
<span style="color: #FF5D5D;" v-if="item.codeList && item.codeList.indexOf('CT001') > -1"> 置顶 </span>
<span v-if="item.contentSourceType == 0">原创</span>
<span>{{item.contentBrowseStr}} 阅读量</span>
<span>{{item.publishDateStr}}</span>
<span style="background: #F8F8F8;padding: 3px 10px;">{{item.classifyList[0].classifyName}}</span>
</p>
</div>
</div>
</el-row>
</li>
</ul>
</div>
</div>
<div class="tabWrapper">
<div class="topUpdateTitle">
<h4>{{$t("indexCount.businessRequire")}}</h4>
......@@ -358,6 +410,7 @@
projectInfo:[],
companyInfo:[],
caseInfo:[],
articleList:[],
lang:this.$i18n.locale=="zh-CN"?1:2,
friendlyLink:[{
id:1,
......@@ -378,7 +431,10 @@
};
},
methods: {
//文章详情
gocontentdetail(row){
this.$router.push({path:"/contentdetail",query:{id:row.contentId}});
},
//去详情
handleRowClick(data){
this.$router.push({path:"/bigBusiness/detail",query:{id:data.businessId}})
......@@ -437,6 +493,19 @@
})
},
//获取推荐文章
getIndexTopNArticle(){
api.getIndexTopNArticle(4).then((res)=>{
if(res.code==0){
this.articleList = res.result;
}else{
that.$message.error(res.msg);
}
}).catch((err)=>{
that.$message.error(err);
})
},
//获取推荐项目
getProjectInfoData(){
let that =this;
......@@ -539,6 +608,7 @@
//查看更多
handleMore(data){
if(data==1) this.$router.push("/bigBusiness/list");
else if(data==6) this.$router.push("/contentall");
else if(data==2) this.$router.push("/seeprojectlist");
else {
globalMsg.$emit('sendIndex',4);
......@@ -571,6 +641,7 @@
this.getCountData();
this.getActiveInfoData();
this.getBusinessInfoData();
this.getIndexTopNArticle();
// this.getCaseData();
}
}
......@@ -846,4 +917,73 @@
}
}
}
.contentlist_ul{
text-align: left;
display: flex;
flex-wrap: wrap;
>li{
width: 50%;
cursor: pointer;
}
}
.contentlist_li{
>div{
width: 100%;
display: flex;
padding: 25px 0;
>div:nth-child(1){
text-align: left;
}
>div:nth-child(2){
width: 100%;
>div{
text-align: left;
position: relative;
height: 110px;
margin-left: 30px;
>p{
font-size: 18px;
font-weight: bold;
color: #1A1A1E;
padding-top: 5px;
}
}
}
}
}
.state_code{
display: flex;
>p{
position: absolute;
bottom: 0px;
color: #AAAAAA;
>span{
margin-right: 15px;
}
}
>p:nth-child(1){
left: 0px;
}
>p:nth-child(2){
right: 30px;
}
}
.isstate_code{
display: flex;
>p{
color: #AAAAAA;
>span{
margin-right: 15px;
}
}
>p:nth-child(1){
width: 100%;
}
>p:nth-child(2){
width: 50px;
}
}
</style>
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