public ActionResult Index() { try { string auth = AppUserToken; if (auth.IsEmpty()) { //没有登录 // return(RedirectToAction("Index", "ErrorPrompt", new { message = "用户登录失败" })); } else if (auth == "-1") { return(RedirectToAction("Register", "ParkingPayment")); } Car car = Carapi.bb(auth); Car mycar = JsonConvert.DeserializeObject <Car>(JsonHelper.GetJsonString(car)); return(View(mycar)); } catch (Exception e) { return(View()); } }
public ActionResult Index() { try { string auth = AppUserToken; LogerHelper.Loger.Info(AppUserToken); if (auth.IsEmpty()) { //没有登录 // return(RedirectToAction("Index", "ErrorPrompt", new { message = "用户登录失败" })); } else if (auth == "-1") { return(RedirectToAction("Register", "ParkingPayment")); } //string auth = "D8F586C77EB73316CFB5FC8C035EF3AFD4BF2EB5DF8F150448EDB019BFE4E5814E401DEBF5C242031E53AD4858A3C1DFDF2537FD4F193CC86928F771770CF6CA"; Car car = Carapi.bb(auth); Car mycar = JsonConvert.DeserializeObject <Car>(JsonHelper.GetJsonString(car)); return(View(mycar)); } catch (Exception e) { return(View()); } }