|
@@ -13,47 +13,85 @@
|
|
|
.avatar-uploader-icon {
|
|
|
font-size: 28px;
|
|
|
color: #8c939d;
|
|
|
- width: 178px;
|
|
|
- height: 178px;
|
|
|
- line-height: 178px;
|
|
|
+ width: 200px;
|
|
|
+ height: 120px;
|
|
|
+ line-height: 120px;
|
|
|
text-align: center;
|
|
|
}
|
|
|
.avatar {
|
|
|
- width: 178px;
|
|
|
- height: 178px;
|
|
|
+ width: 200px;
|
|
|
+ height: 120px;
|
|
|
display: block;
|
|
|
}
|
|
|
- height: 110vh!important;
|
|
|
+ height: 10vh!important;
|
|
|
+
|
|
|
+ .top{
|
|
|
+ margin-left: 20px;
|
|
|
+ }
|
|
|
+ .save{
|
|
|
+ margin-left: 50px;
|
|
|
+ margin-top: 20px;
|
|
|
+ }
|
|
|
+ .detail{
|
|
|
+ margin-bottom: 100px;
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
</style>
|
|
|
<template>
|
|
|
<section class="content">
|
|
|
<h4>新增文章</h4>
|
|
|
<el-divider></el-divider>
|
|
|
- <el-form label-width="80px">
|
|
|
- <el-form-item label="分类">
|
|
|
- <el-select v-model="form.category" placeholder="">
|
|
|
- <el-option
|
|
|
- v-for="item in categoryList"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="置顶">
|
|
|
- <el-select v-model="form.isbanner" placeholder="">
|
|
|
- <el-option
|
|
|
- v-for="item in bannerList"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="标题">
|
|
|
- <el-input placeholder="标题" v-model="form.name"></el-input>
|
|
|
- </el-form-item>
|
|
|
+ <el-form>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="标题">
|
|
|
+ <el-input placeholder="标题" v-model="form.name"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="3">
|
|
|
+ <el-form-item label="分类" class="top">
|
|
|
+ <el-select v-model="form.category" placeholder="">
|
|
|
+ <el-option
|
|
|
+ v-for="item in categoryList"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3" class="top">
|
|
|
+ <el-form-item label="置顶">
|
|
|
+ <el-select v-model="form.isbanner" placeholder="">
|
|
|
+ <el-option
|
|
|
+ v-for="item in bannerList"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3" class="top">
|
|
|
+ <el-form-item label="状态" prop="status">
|
|
|
+ <el-select v-model="form.status" placeholder="请选择状态">
|
|
|
+ <el-option key="1" label="编辑中" :value="1"></el-option>
|
|
|
+ <el-option key="2" label="上线" :value="2"></el-option>
|
|
|
+ <el-option key="-1" label="下线" :value="-1"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="4" class="save">
|
|
|
+ <el-form-item label="">
|
|
|
+ <el-button type="primary" @click="save">保存</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+
|
|
|
<el-form-item label="封面图">
|
|
|
<el-upload
|
|
|
class="avatar-uploader"
|
|
@@ -70,16 +108,16 @@
|
|
|
<el-input placeholder="URL地址" v-model="articleurl" style="width:500px"></el-input>
|
|
|
<el-button type="primary" @click="spiderArticle" style="margin-left:20px">抓取</el-button>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="详情">
|
|
|
- <!-- <fuEditor
|
|
|
+ <el-form-item v-loading="loading">
|
|
|
+ <fuEditor
|
|
|
v-model="form.content"
|
|
|
:isClear="isClear"
|
|
|
@change="change"
|
|
|
- ></fuEditor> -->
|
|
|
+ ></fuEditor>
|
|
|
|
|
|
- <vue-ueditor-wrap ref="editor" v-model="form.content" :config="myConfig"></vue-ueditor-wrap>
|
|
|
+ <!-- <vue-ueditor-wrap ref="editor" v-model="form.content" :config="myConfig"></vue-ueditor-wrap> -->
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="状态" prop="status">
|
|
|
+ <!-- <el-form-item label="状态" prop="status">
|
|
|
<el-select v-model="form.status" placeholder="请选择状态">
|
|
|
<el-option key="1" label="编辑中" :value="1"></el-option>
|
|
|
<el-option key="2" label="上线" :value="2"></el-option>
|
|
@@ -88,6 +126,12 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="">
|
|
|
<el-button type="primary" @click="save">保存</el-button>
|
|
|
+ </el-form-item> -->
|
|
|
+ <el-form-item >
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item >
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item >
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</section>
|
|
@@ -100,6 +144,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ loading: false,
|
|
|
imageUrl: "",
|
|
|
test: "",
|
|
|
list: [],
|
|
@@ -112,6 +157,8 @@ export default {
|
|
|
point: "",
|
|
|
status: 1,
|
|
|
img: "",
|
|
|
+ isbanner:0,
|
|
|
+ category:'每日点评',
|
|
|
},
|
|
|
isClear: false,
|
|
|
keyword: "",
|
|
@@ -134,7 +181,8 @@ export default {
|
|
|
{label:"游资专场",value:"游资专场"},
|
|
|
{label:"冠军交割",value:"冠军交割"},
|
|
|
{label:"牛人专场",value:"牛人专场"},
|
|
|
- {label:"妖股列传",value:"妖股列传"}
|
|
|
+ {label:"妖股列传",value:"妖股列传"},
|
|
|
+ {label:"每日点评",value:"每日点评"}
|
|
|
],
|
|
|
bannerList:[
|
|
|
{label:"否",value:0},
|
|
@@ -208,9 +256,12 @@ export default {
|
|
|
},
|
|
|
|
|
|
spiderArticle() {
|
|
|
+ this.loading = true;
|
|
|
+
|
|
|
this.$api.getSpiderArticle({ url: this.articleurl }).then((res) => {
|
|
|
console.log('data',res.data)
|
|
|
this.form.content = res.data.data;
|
|
|
+ this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
|