public bool register(object info)
        {
            LastMoneyResult result = invoke("/user/register/base", new {
                info,
            });

            return(result.success ? TypeExtensions.Convert <bool>(result.data, false) : false);
        }
        public bool user_exists(object condition)
        {
            LastMoneyResult result = invoke("/user/exists", new {
                condition,
            });

            return(result.success ? TypeExtensions.Convert <bool>(result.data, false) : false);
        }
        public int import(System.Collections.Generic.List <m_lm_MoneyRecord_Import> list)
        {
            LastMoneyResult result = invoke("/moneyRecord/import", new {
                token = _token,
                list
            });

            return(result.success ? TypeExtensions.Convert <int>(result.data, 0) : 0);
        }
 LastMoneyResult ActionResult(LastMoneyResult result)
 {
     if (result == null)
     {
         return(ActionResult(2101, "未返回数据"));
     }
     _lastCode    = result.code;
     _lastMessage = result.message;
     _lastResult  = result;
     return(result);
 }
        public bool login(string account, string password)
        {
            LastMoneyResult result = invoke("/user/login/base", new {
                info = new {
                    account,
                    password,
                    userAgent = GetUserAgent()
                }
            });

            _token = result.success? FastObject.Path(result.data, "token") as string: "";
            return(result.success);
        }
        LastMoneyResult ActionResult(int code, string message, object data = null)
        {
            _lastCode    = code;
            _lastMessage = message;
            LastMoneyResult result = new LastMoneyResult()
            {
                code    = code,
                message = message,
                data    = data,
            };

            _lastResult = result;
            return(result);
        }
        public bool login()
        {
            if (string.IsNullOrEmpty(_token))
            {
                return(false);
            }
            LastMoneyResult result = invoke("/user/login/token", new {
                token = _token,
            });

            if (!result.success)
            {
                _token = "";
            }
            return(result.success);
        }