BUG 26948

This commit is contained in:
aixianling
2022-01-25 16:08:27 +08:00
parent b34bd79df7
commit 1c26780400
2 changed files with 17 additions and 17 deletions

View File

@@ -1,9 +1,10 @@
<template>
<div class="add" v-if="isShow">
<div class="add">
<div class="header-description">
<u-form :model="forms" ref="uForm" label-width="auto">
<u-form-item label="标题" prop="title" required label-position="top">
<u-input v-model="forms.title" :focus="true" placeholder="请输入标题(30字以内)" type="textarea" auto-height height="60"
<u-input v-model="forms.title" :focus="true" placeholder="请输入标题(30字以内)" type="textarea" auto-height
height="60"
maxlength="30"/>
</u-form-item>
@@ -54,7 +55,6 @@ export default {
id: '',
forms: {
title: '',
content: '',
areaId: '',
selectIndex: '',
files: []
@@ -66,7 +66,6 @@ export default {
listName: '',
selectList: [],
isHideCoverimg: false,
isShow: false
}
},
computed: {...mapState(['user'])},
@@ -78,7 +77,6 @@ export default {
}
if (!o.id) {
this.forms.areaId = this.user.areaId
this.isShow = true
}
this.listName = o.listName
this.getType()
@@ -86,11 +84,8 @@ export default {
onShow() {
document.title = this.listName
},
mounted() {
},
methods: {
getModuleInfo () {
getModuleInfo() {
this.$http.post(`/app/appcontentmoduleinfo/queryDetailById?id=${this.moduleId}`).then(res => {
if (res.code === 0) {
this.isHideCoverimg = res.data.styleType === '0'
@@ -100,7 +95,7 @@ export default {
getDetail() {
this.$http.post(`/app/appcontentinfo/queryDetailById?id=${this.id}`).then((res) => {
if (res?.data) {
this.forms = {...res.data}
this.forms = res.data
if (this.selectList.length) {
this.selectList.map((item, index) => {
if (item.id == res.data.categoryId) {
@@ -111,13 +106,12 @@ export default {
if (res.data.images) {
this.forms.images = JSON.parse(res.data.images || '[]')
}
this.isShow = true
}
})
},
getType() {
this.$http.post(`/app/appcontentmoduleinfo/listByName?names=${this.listName}`).then((res) => {
if (res.code == 0) {
if (res?.code == 0) {
if (res.data && res.data.length) {
this.selectList = res.data[0].categoryList
this.selectList.map((item, index) => {