Commit 11cfb37a authored by Mac's avatar Mac

公众号的素材新增 页面修改

parent 7eec7506
......@@ -28765,7 +28765,7 @@ UE.ui = baidu.editor.ui = {};
function setCount(editor,ui) {
editor.setOpt({
wordCount:true,
maximumWords:10000,
maximumWords:100000,
wordCountMsg:editor.options.wordCountMsg || editor.getLang("wordCountMsg"),
wordOverFlowMsg:editor.options.wordOverFlowMsg || editor.getLang("wordOverFlowMsg")
});
......@@ -272,7 +272,7 @@
//wordCount
,wordCount:false //是否开启字数统计
//,maximumWords:10000 //允许的最大字符数
,maximumWords:100000 //允许的最大字符数
//字数统计提示,{#count}代表当前字数,{#leave}代表还可以输入多少字符数,留空支持多语言自动切换,否则按此配置显示
//,wordCountMsg:'' //当前已输入 {#count} 个字符,您还可以输入{#leave} 个字符
//超出字数限制提示 留空支持多语言自动切换,否则按此配置显示
......
......@@ -33,7 +33,7 @@
</q-dialog>
<!-- 选择文件 -->
<q-dialog title="选择文件" v-model="getImgChoice" width="1200px">
<ChooseImg @SelectId="SelectId" :type="1" @closeDia="getImgChoice=false"></ChooseImg>
<ChooseImg @SelectId="SelectId" :type="0" @closeDia="getImgChoice=false"></ChooseImg>
</q-dialog>
</div>
</template>
......@@ -80,7 +80,7 @@
},
methods: {
SelectId(obj) {
this.objOption.Image = obj.url;
this.objOption.Image = obj[0].ImageUrl;
this.getImgChoice = false;
},
//关闭弹窗
......
......@@ -8,17 +8,22 @@
<el-button @click="GetPageList" slot="append" icon="el-icon-search"></el-button>
</el-input>
</div>
<!-- type=1 图片 -->
<!-- type=0 图片单选 -->
<template v-if="type==0">
<div class="basefix app-attachment-list">
<el-tooltip v-for="(item,index) in dataList" :key="index" class="item" effect="dark"
:content="item.MediaGroupName" placement="top-start">
<div @click="PageSelect(item)" :class="getChecked(item) ? 'selected' :''"
class="el-tooltip item app-attachment-item">
<img :src="getIconLink(item.ImageUrl)" class="app-attachment-img" style="width: 100px; height: 100px;">
<div class="app-attachment-name">{{item.MediaGroupName}}</div>
</div>
</el-tooltip>
</div>
</template>
<!-- type=1 图片多选 -->
<template v-if="type==1">
<div class="basefix app-attachment-list">
<!-- <div class="app-attachment-item app-attachment-upload">
<el-upload class="avatar-uploader" action="" accept="image/jpeg,image/gif,image/png,image/bmp"
:show-file-list="false" :http-request="UploadImage" multiple>
<div class="app-upload" flex="main:center cross:center" style="width: 100px; height: 100px;">
<i class="el-icon-upload"></i>
</div>
</el-upload>
</div> -->
<el-tooltip v-for="(item,index) in dataList" :key="index" class="item" effect="dark"
:content="item.MediaGroupName" placement="top-start">
<div @click="PageSelect(item)" :class="getChecked(item) ? 'selected' :''"
......@@ -122,7 +127,12 @@
},
mounted() {
if(this.type){
this.msg.Type = this.type;
if(this.type==1 || this.type==0){
this.msg.Type =1
}else{
this.msg.Type = this.type;
}
}
this.GetPageList();
},
......@@ -174,20 +184,41 @@
var isChecked = false;
if (this.emitmsg && this.emitmsg.length > 0) {
this.emitmsg.forEach(eItem => {
if (eItem.selectId == item.Id && !isChecked) {
if (eItem.Id == item.Id && !isChecked) {
isChecked = true;
}
});
}
return isChecked;
},
//选择图片
PageSelect(item) {
console.log(item,'item');
if(this.type!=1){//单选
this.emitmsg = [];
this.emitmsg.push(item)
}else{//图片多选的时候
if(this.emitmsg && this.emitmsg.length>0){//一个没有选择的时候
let data = JSON.parse(JSON.stringify(this.emitmsg))
let isyes = false
data.forEach((eItem,eindex) => {
if (eItem.Id == item.Id) {
this.emitmsg.splice(eindex,1)
isyes = true
}
});
if(isyes== false){
this.emitmsg.push(item)
}
}else{//有一个选中的时候
this.emitmsg.push(item)
}
}
this.selectId = item.Id;
},
SelectImgId() {
if (this.emitmsg && this.emitmsg.length > 0) {
var result = {
selectId: this.emitmsg[0].selectId,
url: this.emitmsg[0].url,
Name:this.emitmsg[0].Name
};
var result = this.emitmsg;
this.$emit('SelectId', result)
}
this.selectId = -1;
......@@ -214,25 +245,7 @@
}
})
},
//选择图片 clickType 1单击 2双击
PageSelect(item) {
this.emitmsg = [];
console.log(item,'item');
let url = ''
if(this.type==1){
url = item.ImageUrl
}else if(this.type==2){
url = item.Media_Id
}else if(this.type==3){
url = item.VideoWXPath
}
this.emitmsg.push({
selectId: item.Id,
url: url,
Name:item.MediaName
});
this.selectId = item.Id;
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.GetPageList();
......
......@@ -116,8 +116,9 @@
let html = '';
//s视频
fileArray.forEach(item => {
html += '<p style="text-align:center"><iframe frameborder="0" src="' + item.fileUrl +
'" allowFullScreen="true" align="center" height="280" width="420"></iframe></p>';
html+="<iframe frameborder='0' width='100%' height='200px' src='https://v.qq.com/iframe/player.html?vid=v326875u4ek' allowfullscreen='true'></iframe>"
// html += '<p style="text-align:center"><iframe frameborder="0" src="' + item.fileUrl +
// '" allowFullScreen="true" align="center" height="280" width="420"></iframe></p>';
})
console.log(html)
......@@ -237,11 +238,11 @@
});
this.ue.addListener('keyup', editor => {
this.isInputChange = true;
this.$emit('input', this.ue.getContent());
// this.$emit('input', this.ue.getContent());
});
this.ue.addListener('contentChange', (editor, e) => {
this.isInputChange = true;
this.$emit('input', this.ue.getContent());
this.$emit('input', this.ue.getContent(),this.ue.getContentTxt().length);
});
this.ue.addListener('blur', editor => {
this.isInputChange = true;
......
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