예제 #1
0
        public ActionResult Edit()
        {
            var auth = WXInterface.GetAccessToken(Config.AppID, Config.AppSecret);
            var json = WXInterface.GetMenu(auth.access_token);

            ViewBag.data = json.ToJsonString();
            return(View());
        }
예제 #2
0
        public ActionResult Index()
        {
            var auth       = WXInterface.GetAccessToken(Config.AppID, Config.AppSecret);
            var json       = WXInterface.GetMenu(auth.access_token);
            var returnType = Request["r"];

            if (returnType == "json")
            {
                return(Json(json, JsonRequestBehavior.AllowGet));
            }
            return(View(json));
        }