Commit f3fe2cdd authored by zhangyanni's avatar zhangyanni

Merge remote-tracking branch 'origin/master'

parents 4b6a0b5c 789568be
......@@ -30,6 +30,7 @@ module.exports = {
activity:"Event",
mine:"Mine",
article:"Article",
newsArticle:"最新资讯",
},
......
......@@ -30,7 +30,8 @@ module.exports = {
vote:"评选",
activity:"活动",
mine:"我的",
article:"文章"
article:"文章",
newsArticle:"最新资讯",
},
......
......@@ -149,4 +149,15 @@ export default {
return api.fetchPost('/base/article/saveSettingInfo',params );
},
//文章 频道
selectContentChannelList() {
return api.fetchPost('/business/content/selectContentChannelList' );
},
// 文章列表
selectContentList(params) {
return api.fetchPost('/business/content/selectContentList',params );
},
}
\ No newline at end of file
......@@ -132,12 +132,12 @@
// 分页导航
handleCurrentChange(val) {
this.cur_page = val;
this.getsearchBaseData();
this.getsearchContents();
},
//设置个数
handleSizeChange(val) {
this.numberData = val;
this.getsearchBaseData();
this.getsearchContents();
},
//文章列表
getsearchContents(){
......
......@@ -3,7 +3,7 @@
<div style="margin-top: 20px;">
<el-form label-position="right" label-width="180px" class="contnetform180" >
<el-form-item label="免责声明:">
<el-input v-model="infoData.settingStatementContent" maxlength="500" placeholder="请输入免责声明,最多可输入200个字" style="width: 600px;" type="textarea" :rows="6"></el-input>
<el-input @input="$forceUpdate()" v-model="infoData.settingStatementContent" maxlength="500" placeholder="请输入免责声明,最多可输入200个字" style="width: 600px;" type="textarea" :rows="6"></el-input>
</el-form-item>
<el-form-item label=" ">
<el-button type="primary" @click="getsaveSettingInfo">保存</el-button>
......
......@@ -47,7 +47,7 @@
<div v-show="false" v-html="contentDiv" id="content1"></div>
</el-form-item>
<el-form-item label="活动封面:" prop="contentCoverUrl" ref="formimg" style="width: 100%;">
<el-checkbox @change="coverchange(formData.isCover)" v-model="formData.isCover">选取文中图片作为封面图</el-checkbox>
<el-checkbox @change="coverchange(formData.firstPic)" v-model="formData.firstPic">选取文中图片作为封面图</el-checkbox>
<p class="imgTitle">封面图只支持PNG、JPG、jpeg格式,最大支持400K;建议图片尺寸500x400</p>
<div class="uploadImg">
<up-img :actionUrl="'/base/upload/uploadOriginalImg'" @dataEvent="uploadimg" :channelPic="formData.contentCoverUrl" :upmax="0.4"></up-img>
......@@ -74,7 +74,7 @@
</el-cascader>
<div style="margin-top: 10px;">
<el-row v-if="formData.contentLabels.length > 0" class="tagspan">
<el-tag v-for="tag in formData.contentLabels" closable :disable-transitions="false" @close="handleClose(tag)">
<el-tag v-for="(tag,index) in formData.contentLabels" :key="index" closable :disable-transitions="false" @close="handleClose(tag)">
{{tag}}
</el-tag>
</el-row>
......@@ -254,7 +254,8 @@
channelIds:[],
classifyIds:[],
contentChoose:[],
isCover:true,
firstPic:true,
isCover:0,
isOpenComment:0,
dataKeywordList:[],
publishType:0,
......@@ -329,9 +330,11 @@
this.$message.error('请输入文章来源')
return
}
if(this.formData.keywordList.length+this.formData.contentLabels.length > 10){
this.$message.error('标签最多10个')
return
if(this.formData.keywordList&&this.formData.contentLabels){
if(this.formData.keywordList.length+this.formData.contentLabels.length > 10){
this.$message.error('标签最多10个')
return
}
}
let contentimg = document.getElementById("content1").getElementsByTagName("img");
let imgurlList = [];
......@@ -343,10 +346,10 @@
if(valid) {
api.checkSensitiveContent({content:this.formData.contentDetail}).then(response => {
if(response.code == 0) {
if(this.formData.isCover){
this.formData.isCover = 0;
if(this.formData.firstPic){
this.formData.firstPic = 1;
}else{
this.formData.isCover = 1;
this.formData.firstPic = 0;
}
let urls = this.$route.query.contentId?'/base/article/editArticleContent':'/base/article/pushArticleContent'
api.pushArticleContent(urls,this.formData).then(response => {
......@@ -382,6 +385,11 @@
},
//处理上传封面图
uploadimg(url){
if(url == ' '){
this.formData.isCover = 0;
}else{
this.formData.isCover = 1;
}
this.formData.contentCoverUrl = url;
},
//获取频道下拉数据
......@@ -634,8 +642,13 @@
}
let selectIndustrys = [];
this.selectIndustrys = [];
for(let i in response.result.keywordList){
selectIndustrys.push([response.result.keywordList[i].dataId,response.result.keywordList[i].id]);
if(response.result.keywordList){
for(let i in response.result.keywordList){
selectIndustrys.push([response.result.keywordList[i].dataId,response.result.keywordList[i].id]);
}
}
if(!this.formData.contentLabels){
this.formData.contentLabels = [];
}
this.selectIndustrys = selectIndustrys;
if(response.result.contentProfessor){
......
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