1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- const Api = require('../net/Api');
- class PackApi {
- /*
- * 获取用户插卡信息
- * @param uid [string] 用户id
- * */
- static getUserCardsInfo(uid, success, fail) {
- let url = "/item/getCards.do";
- let data = {
- targetUid: uid
- };
- let requestBody = {
- url: url,
- data: data,
- success: success,
- fail: fail,
- complete: () => {
- }
- };
- Api.httpGet(requestBody);
- }
- static postInsertCard(uid, itemId, success, fail) {
- let url = "/item/insertCard.do";
- let data = {
- targetUid: uid,
- itemId: itemId
- };
- let requestBody = {
- url: url,
- data: data,
- success: success,
- fail: fail,
- complete: () => {
- }
- };
- Api.httpPost(requestBody);
- }
- static postUnloadCard(uid, itemId, success, fail) {
- let url = "/item/unload.do";
- let data = {
- targetUid: uid,
- itemId: itemId,
- };
- let requestBody = {
- url: url,
- data: data,
- success: success,
- fail: fail,
- complete: () => {
- }
- };
- Api.httpPost(requestBody);
- }
- static getUserPackInfo(success, fail) {
- let url = "/user/getUserPackInfo.do";
- let data = {};
- let requestBody = {
- url: url,
- data: data,
- success: success,
- fail: fail,
- complete: () => {
- }
- };
- Api.httpGet(requestBody);
- };
- }
- module.exports = PackApi;
|