Commit aac041b8 authored by anxixi's avatar anxixi

富文本图片上传修改

parent 9d5b4294
......@@ -371,7 +371,7 @@ export default {
fetchPostImg(url, params, method = 'POST') {
var langVal = url.indexOf('?') == -1 ? '?lang=' + lang : '&lang=' + lang,_this = this;
if(publicFun.getCookie("userInfo")) {
// if(publicFun.getCookie("userInfo")) {
return new Promise((resolve, reject) => {
axios({
method: method,
......@@ -400,7 +400,7 @@ export default {
}
})
})
}
// }
},
fetchUploadImg(url, params, method = 'POST') {
......
......@@ -44,6 +44,7 @@
if(response.code == 0) {
insert(response.result.fileUpload)
} else {
this.$emit('dataEvent_img',true);
this.$message.error(response.msgCode);
}
})
......
......@@ -75,7 +75,7 @@
<!-- maxlength="5000"-->
<!-- show-word-limit-->
<!-- ></el-input>-->
<rich-text @dataEvent="statedata" :istopic="richstate" :channelIntroduction="discussContent"></rich-text>
<rich-text @dataEvent="statedata" @dataEvent_img="imglose" :istopic="richstate" :channelIntroduction="discussContent"></rich-text>
<div style="line-height: 55px;">
<div class="gendisplay">
<div class="gendisplay" style="width: 400px;">
......@@ -198,8 +198,8 @@
</div>
<div>
<div style="margin: 15px 0;color:#1A1A1E;line-height: 24px;" @click="eventtopiccontent($event)">
<span v-if="item.alltext" v-html="publicFun.analyzeEmoji(item.discussContentlin+(item.discussContentlin.length>140?'...':''))"></span>
<span v-else v-html="publicFun.analyzeEmoji(item.discussContentconst)"></span>
<span v-if="item.alltext" v-html="item.pcState==1?(item.discussContentlin+(item.discussContentlin.length>140?'...':'')):publicFun.analyzeEmoji((item.discussContentlin+(item.discussContentlin.length>140?'...':'')))"></span>
<span v-else v-html="item.pcState==1?item.discussContentconst:publicFun.analyzeEmoji(item.discussContentconst)"></span>
<i
v-if="publicFun.getTextInRichtext(item.discussContentconst).length>140"
@click="item.alltext = !item.alltext"
......@@ -812,6 +812,12 @@
return false;
});
},
imglose(){
if(!this.publicFun.getCookie("userInfo")){
this.$refs.login.isexpertVisible();
return
}
},
//添加话题讨论
pushdiscuss(){
if(!this.publicFun.getCookie("userInfo")){
......
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