Commit 71b09883 authored by 徐一鸣's avatar 徐一鸣

Merge branch 'dev' of cloud.wodcloud.com:apaas/apaas-v3-ui into dev

parents b361dc6b d8accb64
......@@ -66,13 +66,13 @@ export default {
this.editor = new E(this.$refs.toolbar);
this.editor.config.uploadImgShowBase64 = false; // base 64 存储图片
this.editor.config.uploadImgServer =
"/tp-jiwei-pcsvc/display/cigApi/common/uploadFile"; // 配置服务器端地址
"/apaas/static/image/upload"; // 配置服务器端地址
this.editor.config.uploadImgHeaders = {}; // 自定义 header
this.editor.config.uploadFileName = "file"; // 后端接受上传文件的参数名
// this.editor.config.uploadImgMaxSize = 2 * 1024 * 1024; // 将图片大小限制为 2M
this.editor.config.uploadImgMaxSize = 2 * 1024 * 1024; // 将图片大小限制为 2M
this.editor.config.uploadImgMaxLength = 6; // 限制一次最多上传 3 张图片
this.editor.config.uploadImgTimeout = 3 * 60 * 1000; // 设置超时时间
this.editor.config.uploadImgParams = { category: "图片" };
this.editor.config.uploadImgParams = { directory: "image" };
this.editor.config.uploadImgHooks = {
fail: (xhr, editor, result) => {
......@@ -95,13 +95,13 @@ export default {
//循环插入图片
// for (let i = 0; i < 1; i++) {
console.log(result);
let imgUrl = "/tp-jiwei-pcsvc/display" + result.data.visitPath;
let imgUrl = result.data;
console.log(imgUrl);
insertImg(imgUrl);
// }
}
};
this.editor.config.onchange = html => {
this.editor.config.onblur = html => {
this.info_ = html; // 绑定当前逐渐地值
this.$emit("change", this.info_); // 将内容同步到父组件中
};
......
......@@ -74,13 +74,13 @@ export default {
this.editor = new E(this.$refs.toolbar);
this.editor.config.uploadImgShowBase64 = false; // base 64 存储图片
this.editor.config.uploadImgServer =
"/tp-jiwei-pcsvc/display/cigApi/common/uploadFile"; // 配置服务器端地址
"/apaas/static/image/upload"; // 配置服务器端地址
this.editor.config.uploadImgHeaders = {}; // 自定义 header
this.editor.config.uploadFileName = "file"; // 后端接受上传文件的参数名
// this.editor.config.uploadImgMaxSize = 2 * 1024 * 1024; // 将图片大小限制为 2M
this.editor.config.uploadImgMaxSize = 2 * 1024 * 1024; // 将图片大小限制为 2M
this.editor.config.uploadImgMaxLength = 6; // 限制一次最多上传 3 张图片
this.editor.config.uploadImgTimeout = 3 * 60 * 1000; // 设置超时时间
this.editor.config.uploadImgParams = { category: "图片" };
this.editor.config.uploadImgParams = { directory: "image" };
this.editor.config.uploadImgHooks = {
fail: (xhr, editor, result) => {
......@@ -103,7 +103,7 @@ export default {
//循环插入图片
// for (let i = 0; i < 1; i++) {
console.log(result);
let imgUrl = "/tp-jiwei-pcsvc/display" + result.data.visitPath;
let imgUrl = result.data;
console.log(imgUrl);
insertImg(imgUrl);
// }
......@@ -113,7 +113,7 @@ export default {
this.editor.config.menus = this.menu
}
this.editor.config.showFullScreen = this.full
this.editor.config.onchange = html => {
this.editor.config.onblur = html => {
this.info_ = html; // 绑定当前逐渐地值
this.$emit("change", this.info_); // 将内容同步到父组件中
};
......
......@@ -10,7 +10,7 @@
</div>
<div class="detail_edit">
<wang-e-bd class="editbox" v-model="editstr" :menu="menu" :full="false"></wang-e-bd>
<div class="pubilc"><img src="../../../assets/imgs/jszc_ic_fabu.png" alt="">发表</div>
<div class="pubilc" @click="add_question"><img src="../../../assets/imgs/jszc_ic_fabu.png" alt="">发表</div>
</div>
</div>
</div>
......@@ -35,6 +35,7 @@ export default {
'video'
],
editstr:'',
click_flag:true,
};
},
watch: {
......@@ -50,7 +51,43 @@ export default {
},
methods: {
add_question(){
if(!this.click_flag){
return
}
setTimeout(()=>{
if(this.title){
}else{
this.$message.error('请填写标题')
return
}
if(this.editstr){
}else{
this.$message.error('请填写内容')
return
}
this.click_flag = false
this.$http
.post(
`/apaas/support/qa/question/create`,{
title:this.title,
content:this.editstr
}
).then((res)=>{
this.click_flag = true
this.title = ''
this.editstr = ''
if(res.data.success){
this.$message.success('添加成功')
this.$router.push('/technical_support/answer_center/list')
}else{
this.$message.error('添加失败')
}
})
},100)
}
},
};
</script>
......
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