Esempio n. 1
0
        public string AddItemToList(int itemId)
        {
            Response response = new Response();

            response.status = false;

            int nowUserId = Convert.ToInt32(HttpContext.Session.GetInt32("id"));

            if (nowUserId != 0)
            {
                TraceManager.AddItemToList(nowUserId, itemId);
                response.status  = true;
                response.message = "操作成功";
            }
            else
            {
                response.message = "请先登录";
            }
            return(JsonConvert.SerializeObject(response));
        }