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