const Api = require('../net/Api'); class QuestApi { //获取主线任务 static getMainTask(success, fail) { let url = "/task/mainTask.do"; let requestBody = { url: url, data: {}, success: success, fail: fail, complete: () => { } }; Api.httpGet(requestBody); } //获取主线任务 static getDailyTask(success, fail) { let url = "/daily/getUserDailyInfo"; let requestBody = { url: url, data: {}, success: success, fail: fail, complete: () => { } }; Api.httpGet(requestBody); } static postDailyDegreeReward(degree, success, fail) { let url = "/daily/getDailyDegreeReward"; let data = { degree: degree }; let requestBody = { url: url, data: data, success: success, fail: fail, complete: () => { } }; Api.httpPost(requestBody); } //领取每日任务奖励 static postGetDailyTaskReward(taskId, success, fail) { let url = "/daily/getDailyTaskReward"; let data = { id: taskId }; let requestBody = { url: url, data: data, success: success, fail: fail, complete: () => { } }; Api.httpPost(requestBody); } //领取每日任务额外奖励 static postGetDailyDegreeReward(count, success, fail) { let url = "/daily/getDailyDegreeReward"; let data = { degree: count }; let requestBody = { url: url, data: data, success: success, fail: fail, complete: () => { } }; Api.httpPost(requestBody); } } module.exports = QuestApi;