public ActionResult Expired(long id, string openId = "", long grantid = 0, string wxhead = "") //已过期 { ShopBonusDataModel dataModel = new ShopBonusDataModel(); dataModel.GrantId = grantid; dataModel.HeadImg = wxhead; ShopBonusModel model = new ShopBonusModel(this._bonusService.Get(id)); dataModel.ShopAddress = GetShopAddress(model.ShopId); ViewBag.DataModel = dataModel; model.ShareImg = "http://" + Request.Url.Host.ToString() + model.ShareImg; return(View(model)); }
public ActionResult Expired(long id, string openId = "", long grantid = 0, string wxhead = "") //已过期 { ShopBonusDataModel dataModel = new ShopBonusDataModel(); dataModel.GrantId = grantid; dataModel.HeadImg = wxhead; ShopBonusModel model = new ShopBonusModel(this._bonusService.GetShopBonus(id)); dataModel.ShopAddress = GetShopAddress(model.ShopId); ViewBag.DataModel = dataModel; model.ShareImg = CurrentUrlHelper.CurrentUrlNoPort() + model.ShareImg; return(View(model)); }
public ActionResult HasReceive(long id, string openId = "", long grantid = 0, string wxhead = "", string host = "") //已领取过 { ShopBonusDataModel dataModel = new ShopBonusDataModel(); dataModel.GrantId = grantid; dataModel.ShareHref = host + "/m-weixin/shopbonus/index/" + grantid.ToString(); dataModel.OpenId = openId; dataModel.HeadImg = wxhead; ShopBonusModel model = new ShopBonusModel(this._bonusService.Get(id)); dataModel.ShopAddress = GetShopAddress(model.ShopId); ViewBag.DataModel = dataModel; model.ShareImg = "http://" + host + model.ShareImg; return(View(model)); }
public ActionResult Completed(long id, string openId = "", decimal price = 0, string user = "", long grantid = 0, long rid = 0, string wxhead = "", string host = "") { host = CurrentUrlHelper.CurrentUrl(); ShopBonusDataModel dataModel = new ShopBonusDataModel(); ShopBonusModel model = new ShopBonusModel(this._bonusService.GetShopBonus(id)); var shop = ShopApplication.GetShop(model.ShopId); dataModel.GrantId = grantid; dataModel.ShareHref = host + "/m-weixin/shopbonus/index/" + grantid.ToString(); dataModel.HeadImg = wxhead; //dataModel.HeadImg = Mall.Core.MallIO.GetImagePath(dataModel.HeadImg); dataModel.ShopAddress = GetShopAddress(model.ShopId); dataModel.UserName = user; dataModel.Price = price; dataModel.OpenId = openId; dataModel.ShopName = shop.ShopName; ViewBag.DataModel = dataModel; model.ShareImg = MallIO.GetRomoteImagePath(model.ShareImg); if (!string.IsNullOrWhiteSpace(model.ShareImg)) { if (model.ShareImg.Substring(0, 4) != "http") { model.ShareImg = host + model.ShareImg; } } model.ReceiveId = rid; #region 步微信前信息准备 if (model.SynchronizeCard == true && this.PlatformType == PlatformType.WeiXin) { model.WXJSInfo = _iWXCardService.GetSyncWeiXin(id, rid, ThisCouponType, Request.GetDisplayUrl()); if (model.WXJSInfo != null) { model.IsShowSyncWeiXin = true; //model.WXJSCardInfo = ser_wxcard.GetJSWeiXinCard(id, rid, ThisCouponType); //同步方式有重复留的Bug } } #endregion return(View(model)); }