/*
 * 测试
 */

using System;
using System.Web;
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Http;
using MySystem.Models.Bs;
using Library;
using LitJson;
using Microsoft.AspNetCore.Authorization;
using MySystem.Service.Bs;
using System.Linq;

namespace MySystem.Areas.Api.Controllers.v1
{
    [Area("Api")]
    [Route("Api/v1/[controller]/[action]")]
    public class TestController : BaseController
    {
        public TestController(IHttpContextAccessor accessor) : base(accessor)
        {
        }

        #region 测试方法

        /// <summary>
        /// 产品库列表
        /// </summary>
        /// <returns></returns>
        // [HttpPost]
        // [Authorize]
        [Route("/main/test/all")]
        public JsonResult List(string value)
        {
            value = PublicFunction.DesDecrypt(value);
            JsonData jsonObj = JsonMapper.ToObject(value);
            // Dictionary<string, object> obj = new Dictionary<string, object>(); //返回字段
            // var anths = BaseClass.GetRightJson();
            // obj.Add("AuthsTree", anths); //主token,用于刷新apiToken

            
            return Json(new AppResultJson() { Status = "1", Info = "" });
        }

        #endregion

    }
}