public async Task <IActionResult> Shopflow(ShopflowRequest order) { string userName = HttpContext.Session.GetString("UserName"); int? userId = HttpContext.Session.GetInt32("UserId"); log.InfoFormat(userName + " || Get into 获取收货地址"); try { var adds = await _userManager.GetAddressesAsync(userId); var list = new ShopflowResponse { Adds = adds, Orderidlist = order.Orderidlist }; log.InfoFormat("获取收货地址成功" + (list != null ? Helper.JsonHelper.ToJson(list) : "")); ViewData["UserName"] = userName; return(View(list)); } catch (Exception e) { log.Error("获取收货地址失败,错误提示: " + Helper.JsonHelper.ToJson(e)); return(View("Error", e)); } }
public async Task <IActionResult> Payment(ShopflowRequest olist) { string userName = HttpContext.Session.GetString("UserName"); log.InfoFormat(userName + " || Get into 转到支付页面"); try { var num = await _orderManager.Zongjia(olist.Orderidlist); log.InfoFormat("转到支付页面成功"); ViewData["UserName"] = userName; ViewData["Num"] = num; var list = new ShopflowResponse { Orderidlist = olist.Orderidlist }; return(View(list)); } catch (Exception e) { log.Error("转到支付页面失败,错误提示: " + Helper.JsonHelper.ToJson(e)); return(View("Error", e)); } }