dangyunlong 1 сар өмнө
parent
commit
7f8fdaba54

+ 6 - 0
src/views/news/creatNews.vue

@@ -556,6 +556,9 @@ export default {
       if (this.form.commend_id != undefined && this.form.commend_id.length > 0) {
         this.form.commend_id = JSON.stringify(this.form.commend_id); // 提取推荐ID
       }
+      if (this.form.commend_id.length == 0) {
+        this.form.commend_id = '[]';
+      }
       //先进行验证
       console.log(this.form);
 
@@ -827,6 +830,9 @@ export default {
       if (this.form.commend_id != undefined && this.form.commend_id.length > 0) {
         this.form.commend_id = JSON.stringify(this.form.commend_id); // 提取推荐ID
       }
+      if (this.form.commend_id.length == 0) {
+        this.form.commend_id = '[]';
+      }
       //将department_id和city_id转换为字符串  
       // this.form.department_arr_id = JSON.stringify(this.form.department_arr_id);
       // this.form.city_arr_id = JSON.stringify(this.form.city_arr_id);