Commit bd0715ea authored by 任国军's avatar 任国军

fix bugs

parent 65a136cd
Pipeline #14452 passed with stage
in 6 seconds
......@@ -151,7 +151,7 @@ class InstitutionService extends Service {
const { ctx } = this;
const where = { id: teacher_id };
let teacher = await ctx.classModel.CourseTeacher.one({ where });
teacher.dataValues.point_tags = teacher.point ? teacher.point.split(';') : [];
teacher.dataValues.point_tags = teacher.point ? teacher.point.split(',') : [];
teacher.dataValues.work_experience_tags = teacher.work_experience ? teacher.work_experience.split(';') : [];
const institution = await ctx.classModel.CourseInstitution.find({ where: { id: teacher.institution_id } });
......@@ -195,7 +195,7 @@ class InstitutionService extends Service {
});
}
return ret;
return {page, count:ret.length, rows:ret};
}
......@@ -225,6 +225,7 @@ class InstitutionService extends Service {
let classs = classes.rows[i];
classs.dataValues.image = class_images[i] ? class_images[i].image_url : '';;
classs.dataValues.price_text = classs.price ? classs.price : '现场咨询';
classs.dataValues.class_period = classs.class_period > 0 ? classs.class_period : '';
ret.push(classs);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment