BUG 26062
This commit is contained in:
		@@ -18,7 +18,7 @@ export default {
 | 
				
			|||||||
          url: '../AppResidentActivitie/AppResidentActivities'
 | 
					          url: '../AppResidentActivitie/AppResidentActivities'
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          name: '通知公告',
 | 
					          name: '小程序公告',
 | 
				
			||||||
          icon: require('./img/xcxgg.png'),
 | 
					          icon: require('./img/xcxgg.png'),
 | 
				
			||||||
          url: '../AppUniMsg/AppUniMsg'
 | 
					          url: '../AppUniMsg/AppUniMsg'
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
@@ -31,7 +31,7 @@ export default {
 | 
				
			|||||||
      headerBg: require('./img/header-bg.png'),
 | 
					      headerBg: require('./img/header-bg.png'),
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  onShow(){
 | 
					  onShow() {
 | 
				
			||||||
    document.title = "居民互动"
 | 
					    document.title = "居民互动"
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,21 +3,22 @@
 | 
				
			|||||||
    <div class="header-description">
 | 
					    <div class="header-description">
 | 
				
			||||||
      <u-form :model="forms" ref="uForm" label-width="auto" :border-bottom="false">
 | 
					      <u-form :model="forms" ref="uForm" label-width="auto" :border-bottom="false">
 | 
				
			||||||
        <u-form-item label="标题" prop="title" required :border-bottom="false" class="names">
 | 
					        <u-form-item label="标题" prop="title" required :border-bottom="false" class="names">
 | 
				
			||||||
          <u-input v-model="forms.title" placeholder="请输入标题" maxlength="30" />
 | 
					          <u-input v-model="forms.title" placeholder="请输入标题" maxlength="30"/>
 | 
				
			||||||
        </u-form-item>
 | 
					        </u-form-item>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <u-form-item label="发布组织" prop="publishUnitName" required :border-bottom="false" class="phones">
 | 
					        <u-form-item label="发布组织" prop="publishUnitName" required :border-bottom="false" class="phones">
 | 
				
			||||||
          <u-input v-model="forms.publishUnitName" placeholder="请输入发布组织" maxlength="16" />
 | 
					          <u-input v-model="forms.publishUnitName" placeholder="请输入发布组织" maxlength="16"/>
 | 
				
			||||||
        </u-form-item>
 | 
					        </u-form-item>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <u-form-item label="正文" prop="content" :border-bottom="false" label-position="top" class="contents">
 | 
					        <u-form-item label="正文" prop="content" :border-bottom="false" label-position="top" class="contents">
 | 
				
			||||||
          <u-input v-model="forms.content" placeholder="请输入正文" type="textarea" auto-height height="100" maxlength="500" />
 | 
					          <AiEditor v-model="forms.content" placeholder="请输入正文" :maxlength="500"/>
 | 
				
			||||||
        </u-form-item>
 | 
					        </u-form-item>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <div class="line"></div>
 | 
					        <div class="line"></div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <u-form-item label="图片上传 (最多9张)" prop="images" :border-bottom="false" class="avatars" label-position="top">
 | 
					        <u-form-item label="图片上传 (最多9张)" prop="images" :border-bottom="false" class="avatars" label-position="top">
 | 
				
			||||||
          <AiUploader :def.sync="forms.images" multiple placeholder="上传图片" :limit="9" action="/admin/file/add2"></AiUploader>
 | 
					          <AiUploader :def.sync="forms.images" multiple placeholder="上传图片" :limit="9"
 | 
				
			||||||
 | 
					                      action="/admin/file/add2"/>
 | 
				
			||||||
        </u-form-item>
 | 
					        </u-form-item>
 | 
				
			||||||
      </u-form>
 | 
					      </u-form>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
@@ -27,11 +28,10 @@
 | 
				
			|||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import { mapState } from 'vuex'
 | 
					import {mapState} from 'vuex'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: 'Add',
 | 
					  name: 'Add',
 | 
				
			||||||
  components: {},
 | 
					 | 
				
			||||||
  props: {},
 | 
					  props: {},
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
@@ -45,7 +45,7 @@ export default {
 | 
				
			|||||||
      flag: false,
 | 
					      flag: false,
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  computed: { ...mapState(['user']) },
 | 
					  computed: {...mapState(['user'])},
 | 
				
			||||||
  onLoad(o) {
 | 
					  onLoad(o) {
 | 
				
			||||||
    this.id = o.id
 | 
					    this.id = o.id
 | 
				
			||||||
    this.getDetail()
 | 
					    this.getDetail()
 | 
				
			||||||
@@ -54,7 +54,8 @@ export default {
 | 
				
			|||||||
    document.title = '新增通知公告'
 | 
					    document.title = '新增通知公告'
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  mounted() {},
 | 
					  mounted() {
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    getDetail() {
 | 
					    getDetail() {
 | 
				
			||||||
      if (this.id) {
 | 
					      if (this.id) {
 | 
				
			||||||
@@ -93,29 +94,29 @@ export default {
 | 
				
			|||||||
          const imgs = []
 | 
					          const imgs = []
 | 
				
			||||||
          if (this.forms.images) {
 | 
					          if (this.forms.images) {
 | 
				
			||||||
            this.forms.images.map((e) => {
 | 
					            this.forms.images.map((e) => {
 | 
				
			||||||
              imgs.push({ url: e.url, id: e.id })
 | 
					              imgs.push({url: e.url, id: e.id})
 | 
				
			||||||
            })
 | 
					            })
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          this.flag = true
 | 
					          this.flag = true
 | 
				
			||||||
          this.$http
 | 
					          this.$http
 | 
				
			||||||
            .post(`/app/appmininotice/addOrUpdate`, {
 | 
					          .post(`/app/appmininotice/addOrUpdate`, {
 | 
				
			||||||
              title: this.forms.title,
 | 
					            title: this.forms.title,
 | 
				
			||||||
              publishUnitName: this.forms.publishUnitName,
 | 
					            publishUnitName: this.forms.publishUnitName,
 | 
				
			||||||
              content: this.forms.content,
 | 
					            content: this.forms.content,
 | 
				
			||||||
              images: JSON.stringify(imgs) || [],
 | 
					            images: JSON.stringify(imgs) || [],
 | 
				
			||||||
              id: this.id,
 | 
					            id: this.id,
 | 
				
			||||||
            })
 | 
					          })
 | 
				
			||||||
            .then((res) => {
 | 
					          .then((res) => {
 | 
				
			||||||
              if (res.code == 0) {
 | 
					            if (res.code == 0) {
 | 
				
			||||||
                this.flag = false
 | 
					              this.flag = false
 | 
				
			||||||
                this.$u.toast('提交成功')
 | 
					              this.$u.toast('提交成功')
 | 
				
			||||||
                uni.$emit('updateList')
 | 
					              uni.$emit('updateList')
 | 
				
			||||||
                setTimeout(() => {
 | 
					              setTimeout(() => {
 | 
				
			||||||
                  uni.navigateBack()
 | 
					                uni.navigateBack()
 | 
				
			||||||
                }, 600)
 | 
					              }, 600)
 | 
				
			||||||
              }
 | 
					            }
 | 
				
			||||||
            })
 | 
					          })
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
          this.$u.toast('失败')
 | 
					          this.$u.toast('失败')
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@@ -129,17 +130,21 @@ export default {
 | 
				
			|||||||
uni-page-body {
 | 
					uni-page-body {
 | 
				
			||||||
  height: 100%;
 | 
					  height: 100%;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.add {
 | 
					.add {
 | 
				
			||||||
  height: 100%;
 | 
					  height: 100%;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  .header-description {
 | 
					  .header-description {
 | 
				
			||||||
    padding-bottom: 112px;
 | 
					    padding-bottom: 112px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ::v-deep .u-form {
 | 
					    ::v-deep .u-form {
 | 
				
			||||||
      .u-form-item {
 | 
					      .u-form-item {
 | 
				
			||||||
        padding: 0 45px !important;
 | 
					        padding: 0 45px !important;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        .u-form-item__body {
 | 
					        .u-form-item__body {
 | 
				
			||||||
          .u-form-item--right__content__slot {
 | 
					          .u-form-item--right__content__slot {
 | 
				
			||||||
            padding-bottom: 0;
 | 
					            padding-bottom: 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            .u-input {
 | 
					            .u-input {
 | 
				
			||||||
              text-align: right !important;
 | 
					              text-align: right !important;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
@@ -162,12 +167,14 @@ uni-page-body {
 | 
				
			|||||||
      .avatars,
 | 
					      .avatars,
 | 
				
			||||||
      .contents {
 | 
					      .contents {
 | 
				
			||||||
        padding-bottom: 20px !important;
 | 
					        padding-bottom: 20px !important;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        .u-form-item__body {
 | 
					        .u-form-item__body {
 | 
				
			||||||
          .u-form-item--right__content__slot {
 | 
					          .u-form-item--right__content__slot {
 | 
				
			||||||
            .u-input {
 | 
					            .u-input {
 | 
				
			||||||
              text-align: left !important;
 | 
					              text-align: left !important;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          .default {
 | 
					          .default {
 | 
				
			||||||
            width: 160px;
 | 
					            width: 160px;
 | 
				
			||||||
            height: 160px;
 | 
					            height: 160px;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user