|
@@ -2,8 +2,8 @@
|
|
|
<div class="createPost-container">
|
|
|
<el-form ref="postForm" :label-position="labelPosition" :model="postForm" :rules="rules" class="form-container">
|
|
|
<div class="createPost-main-container">
|
|
|
- <el-form-item prop="content" style="" label="关于我们">
|
|
|
- <Tinymce ref="editor" v-model="postForm.content" :height="400" />
|
|
|
+ <el-form-item prop="content" style="" label="门店数量">
|
|
|
+ <el-input v-model="postForm.content" placeholder="" style="width: 300px;" />
|
|
|
</el-form-item>
|
|
|
<el-row>
|
|
|
<el-button v-loading="loading" type="success" @click="updateArticle">
|
|
@@ -16,9 +16,6 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import Tinymce from '@/components/Tinymce'
|
|
|
-// import Sticky from '@/components/Sticky' // 粘性header组件
|
|
|
-// import { validURL } from '@/utils/validate'
|
|
|
import { fetchSetting, updateSetting } from '@/api/setting'
|
|
|
// import { searchUser } from '@/api/remote-search'
|
|
|
// import { CommentDropdown, PlatformDropdown, SourceUrlDropdown } from './Dropdown'
|
|
@@ -39,7 +36,7 @@ const defaultForm = {
|
|
|
|
|
|
export default {
|
|
|
name: 'ArticleDetail',
|
|
|
- components: { Tinymce },
|
|
|
+ components: { },
|
|
|
props: {
|
|
|
isEdit: {
|
|
|
type: Boolean,
|
|
@@ -85,7 +82,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
fetchData() {
|
|
|
- const type = 'about'
|
|
|
+ const type = 'shop_num'
|
|
|
fetchSetting(type).then(response => {
|
|
|
this.postForm = response.data.info
|
|
|
}).catch(err => {
|
|
@@ -93,7 +90,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
updateArticle() {
|
|
|
- this.postForm.type = 'about'
|
|
|
+ this.postForm.type = 'shop_num'
|
|
|
updateSetting(this.postForm, 'about').then(response => {
|
|
|
this.$notify({
|
|
|
title: '修改',
|
|
@@ -109,7 +106,7 @@ export default {
|
|
|
draftForm() {
|
|
|
if (this.postForm.content.length === 0 || this.postForm.title.length === 0) {
|
|
|
this.$message({
|
|
|
- message: '请填写必要的标题和内容',
|
|
|
+ message: '请填写必要内容',
|
|
|
type: 'warning'
|
|
|
})
|
|
|
return
|