Commit 769f9563 authored by 任国军's avatar 任国军

change optins sort

parent eadeb094
Pipeline #22012 passed with stage
in 3 seconds
......@@ -6,6 +6,10 @@ const moment = require('moment');
const MODE = [
{
id: 0,
name: '全部',
value: 0,
}, {
id: 1,
name: '直播',
value: 1,
......@@ -25,15 +29,15 @@ const MODE = [
id: 5,
name: '小程序',
value: 5,
}, {
id: 0,
name: '全部',
value: 0,
},
];
const PRICE_TYPE = [
{
id: 0,
name: '全部',
value: 0,
}, {
id: 1,
name: '免费公益课',
value: 1,
......@@ -45,10 +49,6 @@ const PRICE_TYPE = [
id: 3,
name: '正价课',
value: 3,
}, {
id: 0,
name: '全部',
value: 0,
},
];
......@@ -60,13 +60,13 @@ class OptionService extends Service {
categoryList.forEach(e => {
e.value = e.id;
});
categoryList.push({ id: 0, name: '全部', value: 0 });
categoryList.unshift({ id: 0, name: '全部', value: 0 });
// 年龄段
const ageList = await ctx.classModel.V5.CourseV5Age.findAll({ where: { status: 1, is_deleted: 0 }, order: [[ 'sort', 'asc' ]], attributes: [ 'id', 'name' ], raw: true });
ageList.forEach(e => {
e.value = e.id;
});
ageList.push({ id: 0, name: '全部', value: 0 });
ageList.unshift({ id: 0, name: '全部', value: 0 });
// // 课程班型
// const typeList = await ctx.classModel.V5.CourseV5Type.findAll({ where: { status: 1, is_deleted: 0 }, order: [ ['sort', 'asc'] ], attributes: [ 'id', 'name' ], raw: true });
// typeList.forEach(e => {
......
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