Explorar el Código

修改新闻内容上传图片的格式

xiaomin hace 4 años
padre
commit
c5011a16dc
Se han modificado 1 ficheros con 6 adiciones y 6 borrados
  1. 6 6
      src/views/journalism/journalism.vue

+ 6 - 6
src/views/journalism/journalism.vue

@@ -88,8 +88,8 @@
               <el-input v-model="formList.author" auto-complete="off" placeholder="请输入新闻作者"></el-input>
             </el-form-item>
 
-            <el-form-item label="文章来源" prop="sourcet">
-              <el-input v-model="formList.sourcet" auto-complete="off" placeholder="请输入文章来源"></el-input>
+            <el-form-item label="文章来源" prop="source">
+              <el-input v-model="formList.source" auto-complete="off" placeholder="请输入文章来源"></el-input>
             </el-form-item>
 
             <el-form-item label="新闻封面">
@@ -128,7 +128,6 @@
                 :action="serverUrl"
                 name="photo"
                 :format="['jpg','jpeg','png','gif']"
-                :max-size="2048"
                 :headers="header"
                 :show-file-list="false"
                 :on-success="uploadSuccess"
@@ -177,7 +176,7 @@
             </el-form-item>
 
             <el-form-item label="文章来源">
-              <el-input v-model="formChangeList.sourcet" auto-complete="off" placeholder="请输入文章来源"></el-input>
+              <el-input v-model="formChangeList.source" auto-complete="off" placeholder="请输入文章来源"></el-input>
             </el-form-item>
 
              <el-form-item label="新闻封面">
@@ -216,7 +215,6 @@
                 :action="serverUrl"
                 name="photo"
                 :format="['jpg','jpeg','png','gif']"
-                :max-size="2048"
                 :headers="header"
                 :show-file-list="false"
                 :on-success="uploadSuccessOne"
@@ -310,7 +308,7 @@ export default {
           changeUser: false,
           photo: '',
           quillUpdateImg: false,
-          // serverUrl: '',
+          // serverUrl: 'http://localhost:8088/api/app/upload',
           serverUrl: 'http://192.168.1.199:30001/api/app/upload',
           // 这里写你要上传的图片服务器地址
           header: {Authorization: 'Bearer ' + sessionStorage.token},  //有的图片服务器要求请求头需要有token之类的参数,写在这里
@@ -507,6 +505,8 @@ export default {
       this.changeUser = true;
       this.formChangeList.id = user.id;
       this.formChangeList.title = user.title;
+      this.formChangeList.author = user.author;
+      this.formChangeList.source = user.source;
       this.formChangeList.newsAbstract = user.newsAbstract;
       this.dialogImageUrl = user.photoUrl;
       this.detailContent = user.content;