Ejemplo n.º 1
0
        public bool register(object info)
        {
            LastMoneyResult result = invoke("/user/register/base", new {
                info,
            });

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

            return(result.success ? TypeExtensions.Convert <bool>(result.data, false) : false);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
 LastMoneyResult ActionResult(LastMoneyResult result)
 {
     if (result == null)
     {
         return(ActionResult(2101, "未返回数据"));
     }
     _lastCode    = result.code;
     _lastMessage = result.message;
     _lastResult  = result;
     return(result);
 }
Ejemplo n.º 5
0
        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);
        }
Ejemplo n.º 6
0
        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);
        }
Ejemplo n.º 7
0
        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);
        }