// module g2.account_dep {
//     // 底层的AccountHttp服务
//     // 全静态函数
//     export class G2AccountHttp {
//         // API常量
//         private static API_TEST:string = "test";
//         private static API_REG_GUEST_ACCOUNT:string = "reg_guest_account";
//         private static API_REG_MOBILE_ACCOUNT:string = "reg_mobile_account";
//         private static API_REG_EMAIL_ACCOUNT:string = "reg_email_account";
//         private static API_LOGIN:string = "login";
//         private static API_BIND_MOBILE:string = "bind_mobile";
//         private static API_RESET_PASSWORD:string = "reset_password";
//         private static API_SEND_VALID_CODE:string = "send_valid_code";
//         private static API_S:string = "s";
//         private static API_ACCOUNT_GAMELIST:string = "account_gamelist";
//         private static http(_host:string, _api:string, _req:any, _complete:Function = null) {
//             // 获得url
//             let url:string = `${_host}${_api}`;
//             // 发起请求
//             g.common.Common.httpPostJson(url, _req, Const.DEFAULT_HTTP_TIMEOUT, (_success:boolean, _errMsg:string, _rsp:any) => {
//                 // 目的仅仅是在这里加一个clientInfo
//                 if(!_success){
//                     g.clientinfo.ClientInfo.send(`ACCOUNT HTTP ERROR: url:${url} err:${_errMsg}`);
//                 }
//                 _complete(_success, _errMsg, _rsp);
//             });
//         }
//         /**
//          * 发起账号注册请求
//          * @param _host 
//          * @param _mobile 
//          * @param _validCode 
//          * @param _password 
//          * @param _complete 
//          */
//         public static httpRegMobileAccount(
//             _host:string,
//             _mobile:string,
//             _validCode:string,
//             _password:string,
//             _complete:Function){
//             // get device info
//             let deviceInfo:g.device.GDeviceInfo = g.device.GDevice.getDeviceInfo();
//             // 构造req
//             let req:any = {
//                 device:deviceInfo.toNetOBJ(),
//                 mobile:_mobile,
//                 validCode:_validCode,
//                 password:_password,
//                 tag:""
//             };
//             // 发起请求
//             G2AccountHttp.http(
//                 _host,
//                 G2AccountHttp.API_REG_MOBILE_ACCOUNT,
//                 req,
//                 _complete
//             );
//         }
//         /**
//          * 发起邮箱注册请求
//          * @param _host 
//          * @param _email 
//          * @param _validCode 
//          * @param _password 
//          * @param _complete 
//          */
//         public static httpRegEmailAccount(
//             _host:string,
//             _email:string,
//             _validCode:string,
//             _password:string,
//             _complete:Function = null) {
//             // get device info
//             let deviceInfo:g.device.GDeviceInfo = g.device.GDevice.getDeviceInfo();
//             // 构造req
//             let req:any = {
//                 device:deviceInfo.toNetOBJ(),
//                 email:_email,
//                 validCode:_validCode,
//                 password:_password,
//                 tag:""
//             };
//             // 发起请求
//             G2AccountHttp.http(
//                 _host,
//                 G2AccountHttp.API_REG_EMAIL_ACCOUNT,
//                 req,
//                 _complete
//             );
//         }
//         /**
//          * 注册游客账号
//          * @param _host 
//          * @param _complete 
//          */
//         public static httpRegGuestAccount(
//             _host:string,
//             _complete:Function){
//             // get device info
//             let deviceInfo:g.device.GDeviceInfo = g.device.GDevice.getDeviceInfo();
//             // 构造req
//             let req:any = {
//                 device:deviceInfo.toNetOBJ(),
//                 tag:""
//             };
//             // 发起请求
//             G2AccountHttp.http(
//                 _host,
//                 G2AccountHttp.API_REG_GUEST_ACCOUNT,
//                 req,
//                 _complete
//             );
//         }
//         /**
//          * 绑定手机号
//          * @param _host 
//          * @param _accountID 
//          * @param _mobile 
//          * @param _validCode 
//          * @param _password 
//          * @param _complete 
//          */
//         public static httpBindMobile(
//             _host:string,
//             _accountID:string,
//             _mobile:string,
//             _validCode:string,
//             _password:string,
//             _complete:Function) {
//             // 构造req
//             let req:any = {
//                 accountID:_accountID,
//                 mobile:_mobile,
//                 validCode:_validCode,
//                 password:_password
//             }
//             // 发起请求
//             G2AccountHttp.http(
//                 _host,
//                 G2AccountHttp.API_BIND_MOBILE,
//                 req,
//                 _complete
//             );
//         }
//         /**
//          * 修改秘密
//          * @param _host 
//          * @param _mobile 
//          * @param _validCode 
//          * @param _password 
//          * @param _complete 
//          */
//         public static httpResetPassword(
//             _host:string,
//             _mobile:string,
//             _validCode:string,
//             _password:string,
//             _complete:Function) {
//             // 构造req
//             let req:any = {
//                 mobile:_mobile,
//                 validCode:_validCode,
//                 password:_password
//             }
//             // 发起请求
//             G2AccountHttp.http(
//                 _host,
//                 G2AccountHttp.API_RESET_PASSWORD,
//                 req,
//                 _complete
//             );
//         }
//         /**
//          * 登录http接口
//          * 参数req的字段:
//          *  accountType 账号类型,参见 Const.ACCOUNT_TYPE_XXX
//          *  accountID 账号ID accountType = Const.ACCOUNT_TYPE_GUEST 时填写
//          *  mobile : 手机号 accountType = Const.ACCOUNT_TYPE_MOBILE 时填写
//          *  password : 密码 accountType = Const.ACCOUNT_TYPE_MOBILE 时填写
//          *  wxCode : 微信code accountType = Const.ACCOUNT_TYPE_WX 时填写
//          * @param _host 
//          * @param _req 
//          * @param _complete 
//          */
//         public static httpLogin(
//             _host:string,
//             _req:Object,
//             _complete:Function) {
//             // get device info
//             let deviceInfo:g.device.GDeviceInfo = g.device.GDevice.getDeviceInfo();
//             // 构造req
//             let req:any = {
//                 loginReq:_req,
//                 device:deviceInfo.toNetOBJ(),
//             };
//             // 发起http请求
//             G2AccountHttp.http(_host, G2AccountHttp.API_LOGIN, req, _complete);
//         }
//         /**
//          * 请求校验码
//          * @param _host 
//          * @param _mobile 
//          * @param _usage 
//          * @param _complete 
//          */
//         public static httpSendValidCode(
//             _host:string,
//             _mobile:string, 
//             _usage:number, 
//             _complete:Function){
//             // 构造req
//             let req:any = {
//                 mobile:_mobile,
//                 usage:_usage
//             };
//             // 发起http请求
//             G2AccountHttp.http(
//                 _host,
//                 G2AccountHttp.API_SEND_VALID_CODE,
//                 req,
//                 _complete
//             );
//         }
//         public static httpS(_host:string, _complete:Function){
//             // make req
//             let deviceInfo:g.device.GDeviceInfo = g.device.GDevice.getDeviceInfo();
//             // 发起请求
//             G2AccountHttp.http(
//                 _host,
//                 G2AccountHttp.API_S,
//                 deviceInfo.toNetOBJ(),
//                 _complete);
//         }
//         public static httpAccountGameList(_host:string, _complete:Function) {
//             G2AccountHttp.http(
//                 _host,
//                 G2AccountHttp.API_ACCOUNT_GAMELIST,
//                 null,
//                 _complete);
//             // G2AccountHttp.httpSend(
//             //     G2AccountHttp.API_ACCOUNT_GAMELIST,
//             //     null,
//             //     _complete
//             // );
//         }
//     }
// }
//# sourceMappingURL=AccountHttp.js.map