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

fix option category parentId

parent 10a11fdf
Pipeline #28085 failed with stage
in 39 seconds
...@@ -58,7 +58,7 @@ class OptionService extends Service { ...@@ -58,7 +58,7 @@ class OptionService extends Service {
async getOptions() { async getOptions() {
const { ctx } = this; const { ctx } = this;
// 分类 // 分类
const categoryList = await ctx.classModel.V5.CourseV5Category.findAll({ where: { type: 1, status: 1, is_deleted: 0 }, order: [[ 'sort', 'asc' ]], attributes: [ 'id', 'name' ], raw: true }); const categoryList = await ctx.classModel.V5.CourseV5Category.findAll({ where: { type: 1, parent_id: 0, status: 1, is_deleted: 0 }, order: [[ 'sort', 'asc' ]], attributes: [ 'id', 'name' ], raw: true });
categoryList.forEach(e => { categoryList.forEach(e => {
e.value = e.id; e.value = e.id;
}); });
......
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