Explorar o código

修改bug

修改bug
dangyunlong hai 1 mes
pai
achega
7f8fdaba54
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      src/views/news/creatNews.vue

+ 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);