Commit b71d750b authored by anxixi's avatar anxixi

文章发布修改

parent 13d45e52
......@@ -195,7 +195,7 @@
this.expertVisible = false;
this.cur_page = 1;
this.getselectContentList();
if(index>8){
if(index>=8){
this.channelListmax.splice(this.channelListmax.length-1,1);
this.channelListmax.push(row);
}
......@@ -206,6 +206,7 @@
this.search.channelId = row.name;
this.cur_page = 1;
this.getselectContentList();
this.contentList = [];
if(this.positions){
window.scrollTo(0, 220);
}
......@@ -272,11 +273,6 @@
this.loading = true;
api.selectContentList(searchurl,params).then(response => {
if(response.code == 0) {
//右侧推荐
let paramsd = {
contentId:null
};
this.$refs.hotstate.selectProfessorRecommendedContent(paramsd);
if(this.cur_page == 1){
this.contentList = response.result.records;
}else{
......@@ -325,11 +321,18 @@
},
mounted() {
this.selectContentChannelList();
if(this.$route.query.classifyId){
let params = [{classifyId:this.$route.query.classifyId,classifyName:this.$route.query.classifyName}];
this.classifyclk(params);
}
//右侧推荐
let paramsd = {
contentId:null
};
this.$refs.hotstate.selectProfessorRecommendedContent(paramsd);
//右侧热门
let params = {};
this.$refs.hotstate.getselectHotContent(params);
api.selectBasicParams().then(response => {
if(response.code == 0) {
this.urltext = response.result.websitePrefix+'#/articleDetail?id=';
......
......@@ -181,6 +181,7 @@
dictData:{},
urltext:'',
positions:false,
isaxios:true,
}
},
methods:{
......@@ -296,6 +297,7 @@
},
//评论
getselectContentCommentsList(){
this.isaxios = false;
let params = {
pagination: {
number: this.numberData,
......@@ -415,6 +417,7 @@
},
//举报
dictdialog(item){
this.selectDictListaxios();
if(!this.publicFun.getCookie("userInfo")){
this.$refs.login.isexpertVisible();
return
......@@ -448,6 +451,9 @@
let scroll = document.documentElement.scrollTop || document.body.scrollTop;
if(scroll>200){
this.positions = true;
if(this.isaxios == true){
this.getselectContentCommentsList();
}
}else{
this.positions = false;
}
......@@ -457,6 +463,17 @@
globalMsg.$emit('topShowpage',false);
}
},
selectDictListaxios(){
api.getselectDictList().then((res)=>{
if(res.code==0){
this.reportTypeList = res.result;
}else{
this.$message.error(res.msgCode);
}
}).catch((err)=>{
this.$toast(err);
})
},
},
beforeDestroy() { // 在组件生命周期结束的时候销毁。
window.removeEventListener('scroll', this.menu);
......@@ -476,16 +493,6 @@
globalMsg.$emit('sendIndex',3);
}
this.getselectContentById(false);
this.getselectContentCommentsList();
api.getselectDictList().then((res)=>{
if(res.code==0){
this.reportTypeList = res.result;
}else{
this.$message.error(res.msgCode);
}
}).catch((err)=>{
this.$toast(err);
})
api.selectBasicParams().then(response => {
if(response.code == 0) {
this.urltext = response.result.websitePrefix+'#/articleDetail?id=';
......
......@@ -117,12 +117,12 @@
},
},
mounted() {
let params = {
hotContentChangeDTO:{
}
};
this.getselectHotContent(params);
// let params = {
// hotContentChangeDTO:{
//
// }
// };
// this.getselectHotContent(params);
globalMsg.$on("topShowpage",(data)=>{
this.istopShow= data;
})
......
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