12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- 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;
|