/** * 结算处理 * 结算:BalanceAction * 参数:1:Token 用户的seeion标示符 * 返回:1:Result 结果(0表示成功,其他均是错误码, * -1:用户异地登陆,须管理员先注销上次登陆ip,-2:Token不正确) * * */ public void BalancAction(Action <object> callBack) { Dictionary <string, object> param = new Dictionary <string, object>(); param.Add("token", UserModel.getInstance().UserVo.token); PopMaskMaskManager.show(0.5f); Action <object, object> action; action = (object data, object str) => { setVo = (SetVo)data; int result = setVo.result; //System.Convert.ToInt32( data["Result"] ); if (result == Config.CODE_SUCCESS) { UserModel.getInstance().UserVo.money = 0; if (callBack != null) { callBack(result); } } PopMaskMaskManager.hide(); }; HttpLoadManager.getInstance.json <SetVo>("api/v1/users/balance", action, param); }
/** * 结算处理 * 结算:BalanceAction 参数:1:Token 用户的seeion标示符 返回:1:Result 结果(0表示成功,其他均是错误码, -1:用户异地登陆,须管理员先注销上次登陆ip,-2:Token不正确) * */ public void BalancAction(Action<object> callBack) { Dictionary<string,object> param = new Dictionary<string,object>(); param.Add("token",UserModel.getInstance().UserVo.token); PopMaskMaskManager.show (0.5f); Action<object,object> action; action = (object data,object str) => { setVo = (SetVo)data; int result = setVo.result;//System.Convert.ToInt32( data["Result"] ); if(result == Config.CODE_SUCCESS){ UserModel.getInstance().UserVo.money = 0; if(callBack != null ) callBack(result); } PopMaskMaskManager.hide(); }; HttpLoadManager.getInstance.json<SetVo>("api/v1/users/balance",action,param); }