public ActionResult Edit() { var auth = WXInterface.GetAccessToken(Config.AppID, Config.AppSecret); var json = WXInterface.GetMenu(auth.access_token); ViewBag.data = json.ToJsonString(); return(View()); }
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)); }