问卷:添加等级限制

This commit is contained in:
luying
2022-04-13 15:04:58 +08:00
parent c78b213a01
commit 661a691e98
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -340,8 +340,8 @@ export async function getParamStr(activity: ActivityModelType, productID: string
}
export async function getSurvey(roleId: string) {
let surveys = await SurveyModel.findEnableSurvey(SURVEY_SELECT.FIND);
export async function getSurvey(roleId: string, lv: number) {
let surveys = await SurveyModel.findEnableSurvey(lv, SURVEY_SELECT.FIND);
let recs = await SurveyRecModel.findByRole(roleId);
return surveys.filter(survey => {
let index = recs.findIndex(rec => rec.surveyId == survey.surveyId);