...
|
...
|
@@ -50,22 +50,22 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
]).then(result => {
|
|
|
let resData = {};
|
|
|
|
|
|
if (_.get(result, '[0].code', '') !== 200) {
|
|
|
resData.errText = _.get(result, '[0].message', '哟,本次调研已经飞走了,请移步其他调研呗!');
|
|
|
}
|
|
|
if (_.get(result, '[0].code', '') === 200) {
|
|
|
let data = _.get(result, '[1].data', {});
|
|
|
|
|
|
let data = _.get(result, '[1].data', {});
|
|
|
|
|
|
if (data.questions) {
|
|
|
_.forEach(data.questions, value => {
|
|
|
if (+value.questionType === 3) {
|
|
|
value.questionContents = _.fill(Array(value.fillBlankNum || 1), true);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
if (data.questions) {
|
|
|
_.forEach(data.questions, value => {
|
|
|
if (+value.questionType === 3) {
|
|
|
value.questionContents = _.fill(Array(value.fillBlankNum || 1), true);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
if (!_.isEmpty(data)) {
|
|
|
resData.detail = data;
|
|
|
if (!_.isEmpty(data)) {
|
|
|
resData.detail = data;
|
|
|
}
|
|
|
} else {
|
|
|
resData.errText = _.get(result, '[0].message', '哟,本次调研已经飞走了,请移步其他调研呗!');
|
|
|
}
|
|
|
|
|
|
return resData;
|
...
|
...
|
|