zhangbiao преди 3 години
родител
ревизия
e3a44106c6
променени са 2 файла, в които са добавени 8 реда и са изтрити 6 реда
  1. 4 3
      src/views/articleManagement/articleCreate.vue
  2. 4 3
      src/views/articleManagement/videoCreate.vue

+ 4 - 3
src/views/articleManagement/articleCreate.vue

@@ -367,7 +367,7 @@ export default {
       // 必学日期
       this.learnDate = learnDate ? formateStringDate(learnDate) : null;
       console.log("编辑初始化时间为YYYY-MM-DD", this.learnDate, learnDate);
-      this.recommand = item.recommand;
+      this.recommand = item.recommand + "";
       console.log("--推荐--" + item.recommand);
       // 文章内容
       this.content = item.contents;
@@ -445,7 +445,7 @@ export default {
                 tags: tag ? [tag] : [],
                 engineerTypes: [that.engineerType.id],
                 links: links,
-                recommand: that.recommand
+                recommand: eval(that.recommand.toLowerCase())
               };
               that.$_http
                 .post(that.$_API.INTERFACE_POST_ADMIN_MATERIALS, bodyParams, {
@@ -491,7 +491,8 @@ export default {
                 contents: that.content,
                 tags: tag ? [tag] : [],
                 engineerTypes: [that.engineerType.id],
-                links: links
+                links: links,
+                recommand: eval(that.recommand.toLowerCase())
               };
               console.log(
                 "保存修改日期格式为YYYYMMDD",

+ 4 - 3
src/views/articleManagement/videoCreate.vue

@@ -394,7 +394,7 @@ export default {
       this.learnDate = learnDate ? formateStringDate(learnDate) : null;
       console.log("编辑初始化时间为YYYY-MM-DD", this.learnDate, learnDate);
       // 推荐
-      this.recommand = item.recommand;
+      this.recommand = item.recommand + "";
       console.log("--推荐--" + item.recommand);
       // 文章内容
       this.content = item.contents;
@@ -475,7 +475,7 @@ export default {
                 tags: tag ? [tag] : [],
                 engineerTypes: [that.engineerType.id],
                 links: links,
-                recommand: that.recommand
+                recommand: eval(that.recommand.toLowerCase())
               };
               that.$_http
                 .post(that.$_API.INTERFACE_POST_ADMIN_MATERIALS, bodyParams, {
@@ -521,7 +521,8 @@ export default {
                 contents: JSON.stringify(contentObj),
                 tags: tag ? [tag] : [],
                 engineerTypes: [that.engineerType.id],
-                links: links
+                links: links,
+                recommand: eval(that.recommand.toLowerCase())
               };
               console.log(
                 "保存修改日期格式为YYYYMMDD",