Commit f26cce70 authored by 秦海涛's avatar 秦海涛

update

parent 78a9d787
...@@ -88,7 +88,7 @@ const saveActivityInfoByHasId = async function (context) { ...@@ -88,7 +88,7 @@ const saveActivityInfoByHasId = async function (context) {
activityId = "", activityId = "",
startTime, startTime,
endTime, endTime,
taskList = [], tasks = {},
rule, rule,
} = context.data; } = context.data;
let initialData; let initialData;
...@@ -103,6 +103,12 @@ const saveActivityInfoByHasId = async function (context) { ...@@ -103,6 +103,12 @@ const saveActivityInfoByHasId = async function (context) {
"活动名称不可超过12个字" "活动名称不可超过12个字"
); );
} }
const taskList = Object.keys(tasks).map(type => {
return {
...tasks[type]
type
}
})
if (taskList.length === 0) { if (taskList.length === 0) {
return resultsModel.error(CODE_TYPES.PARAMS_ERROR, "任务配置必须配置一项"); return resultsModel.error(CODE_TYPES.PARAMS_ERROR, "任务配置必须配置一项");
} else { } else {
...@@ -232,7 +238,7 @@ const saveActivityInfoByHasId = async function (context) { ...@@ -232,7 +238,7 @@ const saveActivityInfoByHasId = async function (context) {
endTime, endTime,
rule, rule,
openId, openId,
taskList, tasks,
}; };
prizeInfoList = prizeInfoList.map((v, i) => { prizeInfoList = prizeInfoList.map((v, i) => {
return { ...v, level: i + 1 }; return { ...v, level: i + 1 };
......
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