Commit 67ab3d4f authored by 任国军's avatar 任国军

add pay_url

parent b23f103c
Pipeline #27116 passed with stage
in 4 seconds
......@@ -33,6 +33,7 @@ module.exports = app => {
button_pay_text: STRING,
top_price: STRING,
pay_price: DECIMAL,
pay_url: STRING,
sub_title: STRING,
pay_count: INTEGER,
sort: INTEGER,
......
......@@ -111,7 +111,7 @@ class InstitutionSubService extends Service {
// 课程详情
async getClassInfo(id) {
const { ctx } = this;
const attributes = [ 'id', 'institution_id', 'name', 'logo', 'age', 'price', 'price_type', 'mode', 'time', 'class_amount', 'multi_classes', 'cycle', 'description', 'button_style', 'button_text', 'button_type', 'button_sub_text', 'button_url', 'button_pay_text', 'top_price', 'pay_price', 'sub_title', 'pay_count', 'sort' ];
const attributes = [ 'id', 'institution_id', 'name', 'logo', 'age', 'price', 'price_type', 'mode', 'time', 'class_amount', 'multi_classes', 'cycle', 'description', 'button_style', 'button_text', 'button_type', 'button_sub_text', 'button_url', 'button_pay_text', 'top_price', 'pay_price', 'sub_title', 'pay_count', 'sort', 'pay_url' ];
const classInfo = await ctx.classModel.V5.CourseV5Class.findOne({ where: { id, status: 1, is_deleted: 0 }, attributes, raw: true });
if (ctx.isEmpty(classInfo)) {
ctx.failed('数据不存在');
......@@ -207,6 +207,7 @@ class InstitutionSubService extends Service {
classInfo.video_count = videoCount;
classInfo.frequency = frequency;
classInfo.relation = relation;
classInfo.ext = ctx.isEmpty(institution) ? {} : JSON.parse(institution.ext);
return classInfo;
}
......
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