明梦爽
2022-04-17 5529b7077126be368abd444d45ec085d8c7779e3
src/components/Administrator/Edit copy.vue
@@ -24,7 +24,7 @@
      content: '',  //新闻内容
      newsCategoryId:2,
      editorOption: {
        placeholder: "请输入正文",
        placeholder: '请输入正文',
        // editorOption里是放图片上传配置参数用的,例如:
        action:  '/api/product/richtext_img_upload.do',  // 必填参数 图片上传地址
        methods: 'POST',  // 必填参数 图片上传方式
@@ -33,7 +33,7 @@
        size: 10000000,  // 可选参数   图片大小,单位为Kb, 1M = 1024Kb
        accept: 'multipart/form-data, image/png, image/gif, image/jpeg, image/bmp, image/x-icon,image/jpg'  // 可选 可上传的图片格式
      } ,  //编辑器新闻对象
      fileList:[],
      fileList: []
    }
  },
  created(){
@@ -49,12 +49,12 @@
        releaseTime:this.releaseTime
      }
      add(data).then(res => {
        console.log(res);
        console.log(res)
        if(res.code !== 200){
          return this.$message.error('发布新闻失败,请重试!')
        }else{
          this.$message.success('新闻发布成功!')
          console.log(this.content);
          console.log(this.content)
          this.$router.go(-1)
        }
      })