コード例 #1
0
        /// <summary>
        /// 获取账户余额
        /// </summary>
        /// <returns></returns>
        public ActionResult GetMoney()
        {
            try
            {
                NameValueCollection parmas = WorkContext.postparms;
                if (parmas.Keys.Count != 2)
                {
                    return(APIResult("error", "缺少请求参数"));
                }


                DataTable dt = Recharge.GetUserMoney(parmas["account"]);
                return(APIResult("success", "{\"money\":\"" + dt.Rows[0]["totalmoney"].ToString().Trim() + "\"}", true));
            }
            catch (Exception ex)
            {
                return(APIResult("error", "获取失败"));
            }
        }