123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- const Api = require('../net/Api');
- class ArtistTrainApi {
- /**
- * 获取艺人的培养列表
- * @param {int} targetUid 艺人的 uid
- * @param {*} success
- * @param {*} fail
- */
- static missionGetTrainings(targetUid, success, fail) {
-
- let url = "/mission/getTrainings.do";
- let data = {
- targetUid: targetUid,
- };
- let requestBody = {
- url: url,
- data: data,
- success: success,
- fail: fail,
- complete: () => {
- }
- };
- Api.httpGet(requestBody);
- }
- /**
- * 艺人培养
- * @param {int} targetUid 艺人的 uid
- * @param {int} missionId 任务id
- * @param {*} success
- * @param {*} fail
- */
- static missionTrains(targetUid, missionId, success, fail) {
-
- let url = "/mission/train.do";
- let data = {
- targetUid: targetUid,
- missionId: missionId
- };
- let requestBody = {
- url: url,
- data: data,
- success: success,
- fail: fail,
- complete: () => {
- }
- };
- Api.httpPost(requestBody);
- }
- /**
- * 获取培养成果
- * @param {int} targetUid 艺人的 uid
- * @param {int} missionId 任务id
- * @param {*} success
- * @param {*} fail
- */
- static missionGain(targetUid, missionId, success, fail) {
-
- let url = "/mission/gain.do";
- let data = {
- targetUid: targetUid,
- missionId: missionId
- };
- let requestBody = {
- url: url,
- data: data,
- success: success,
- fail: fail,
- complete: () => {
- }
- };
- Api.httpPost(requestBody);
- }
- /**
- * 加速培养任务
- * @param {int} targetUid 艺人的 uid
- * @param {int} missionId 任务id
- * @param {*} success
- * @param {*} fail
- */
- static missionSpeedUp(targetUid, missionId, success, fail) {
-
- let url = "/mission/speedUp.do";
- let data = {
- targetUid: targetUid,
- missionId: missionId
- };
- let requestBody = {
- url: url,
- data: data,
- success: success,
- fail: fail,
- complete: () => {
- }
- };
- Api.httpPost(requestBody);
- }
- }
- module.exports = ArtistTrainApi;
|