Пример #1
0
        /// <summary>
        /// 获取App菜单
        /// </summary>
        public void AppMenus()
        {
            string lang = RequestTool.RequestSafeString("lang", "CN");
            string val  = B_BaseConfig.Get("app_menu");

            val = Language.Content(val, lang);
            JavaScriptSerializer     jss   = new JavaScriptSerializer();
            List <BaseConfigAppMenu> menus = B_BaseConfig.AppMenu(val);

            if (menus != null)
            {
                for (int i = 0; i < menus.Count; i++)
                {
                    menus[i].Icon = "http://" + RequestTool.GetRequestDomain() + menus[i].Icon;
                }
            }
            val = jss.Serialize(menus);
            LBAPI api = new LBAPI();

            api.data = val;
            api.msg  = "OK";
            string json = jss.Serialize(api);

            Response.Write(json);
        }
Пример #2
0
        public List <BaseConfigAppMenu> Getmenus(string str)
        {
            List <BaseConfigAppMenu> menus;

            try
            {
                menus = B_BaseConfig.AppMenu(str);
                if (menus == null)
                {
                    menus = new List <BaseConfigAppMenu>();
                }
            }
            catch
            {
                menus = new List <BaseConfigAppMenu>();
            }

            return(menus);
        }