Commit 739e82fd by yanju

Merge branch 'xue' into 'master'

博客发布页面完善

See merge request pigbigbig/beyond-clouds-front!38
parents 5dabf285 8f5830c2
......@@ -123,7 +123,7 @@
let that = this;
// this.addImg(this.img)
this.$refs.cropper.getCropData((e) => {
this.loading = true
this.loading = true;
let bytes = window.atob(e.split(',')[1]);
let array = [];
for(let i = 0;i<bytes.length;i++){
......
......@@ -129,7 +129,6 @@ export default {
async handleSearch(){
this.isShow = true;
this.isShow2 = true;
console.log(111);
if (this.value.tag !== "") {
let tagSearch = await this.$axios.$get(config.api.get.Tag.search, {
params: {
......@@ -138,7 +137,7 @@ export default {
size: 12
}
});
console.log(tagSearch);
//console.log(tagSearch);
this.isSearch = true; // 用于 有无搜索结果
this.searchList = [];
if (tagSearch.data.dataList.length !== 0) {
......
......@@ -22,13 +22,13 @@
<div class="answer-release">
<div class="answer-release__header">
<span>*</span>
<input type="text" placeholder="请一句话说明问题,并以问号结尾">
<input type="text" v-model="questionDetail" placeholder="请一句话说明问题,并以问号结尾">
</div>
<div class="answer-release__content">
<span>*</span>
<div class="editor-container">
<mavon-editor
v-model="value"
v-model="questionDetail"
:toolbars="markdownOption"
class="editor"
placeholder="问题详情...."
......@@ -46,7 +46,7 @@
<span>*</span>
<select-card selectType="1"></select-card>
</div>
<select-card selectType="2" :class-list="classList" placeholder="请选择问题分类"></select-card>
<select-card selectType="2" :class-list="classList" @handleClass="handleBlogClass" placeholder="请选择问题分类"></select-card>
</div>
<div class="answer-release__footer">
<p>已自动存为草稿</p>
......@@ -60,10 +60,10 @@
</template>
<script>
import CardContainer from "../../../components/pc/cardContainer";
import SelectCard from "../../../components/pc/select/selectCard";
export default {
import CardContainer from "../../../components/pc/cardContainer";
import SelectCard from "../../../components/pc/select/selectCard";
import config from "../../../action/config";
export default {
components: {SelectCard, CardContainer},
data() {
return {
......@@ -103,6 +103,38 @@ export default {
}
},
methods: {
handleBlogClass(value) {
this.blogClass = value;
if(value=="web"){
this.blogClass=1
}else if(value=="java"){
this.blogClass=2
}else if(value=="javascript"){
this.blogClass=3
}
console.log(this.blogClass);
},
postQuestion(){
this.$axios.$post(config.api.post.question.release,{
categoryId: this.blogClass,
questionAbstract: "摘要",//摘要
questionDetail: this.questionDetail,
questionTitle: this.questionTitle,
tagIds: [//标签id
"java"
],
topicIds: [//话题id
"话题id"
]
}).then((response)=>{
//处理response
})
},
imgAdd(pos, file) {
//添加图片,pos为位置
// 第一步.将图片上传到服务器.
......@@ -141,7 +173,7 @@ export default {
boolean = true;
}
}
}
}
</script>
<style lang="scss" scoped>
......
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