zengyicheng 2 anni fa
parent
commit
f553347df4
2 ha cambiato i file con 8 aggiunte e 9 eliminazioni
  1. 5 5
      src/components/pages/addCourse.vue
  2. 3 4
      src/components/pages/data.vue

+ 5 - 5
src/components/pages/addCourse.vue

@@ -2671,10 +2671,10 @@ export default {
           astudent:
             this.checkboxList.length > 0
               ? JSON.stringify(this.checkboxList)
-              : "",
+              : [],
           see: this.isTeacherSee == true ? 0 : 1,
           chapters: JSON.stringify(this.unitJson),
-          template: this.cTemplate,
+          template: this.cTemplate != "undefined" ? this.cTemplate : "",
           courseType: JSON.stringify(this.courseTypeId),
         },
       ];
@@ -2722,10 +2722,10 @@ export default {
           astudent:
             this.checkboxList.length > 0
               ? JSON.stringify(this.checkboxList)
-              : "",
+              : [],
           see: this.isTeacherSee == true ? 0 : 1,
-          chapters: JSON.stringify(this.unitJson),
-          template: this.myWord,
+          chapters: JSON.stringify(this.unitJson).replaceAll(/%/g,'%25'),
+          template: this.myWord != "undefined" ? this.myWord : [],
           uid: this.userid,
           courseType: JSON.stringify(this.courseTypeId),
         },

+ 3 - 4
src/components/pages/data.vue

@@ -155,7 +155,7 @@ export default {
     return {
       ruleForm: {
         name: "",
-        // type: [],
+        type: "",
         sex: "男",
         intro: "",
         // mail: "",
@@ -212,7 +212,7 @@ export default {
         {
           userid: this.userid,
           username: this.ruleForm.name,
-          // type: this.ruleForm.type == "老师" ? "1" : "2",
+          type:this.ruleForm.type == "老师" ? 1 : 2,
           oid: this.ruleForm.sBySchool,
           phone: this.ruleForm.phone,
           intro: this.ruleForm.intro,
@@ -220,8 +220,7 @@ export default {
         },
       ];
       this.ajax
-        // .post(this.$store.state.api + "updateUser", params)
-        .post(this.$store.state.api + "updateUserByEdu", params)
+        .post(this.$store.state.api + "updatePblMessage", params)
         .then((res) => {
           this.$message({
             message: "修改成功",