Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                var reqSid = Request["sid"];//分享用户的AutoId
                if (!string.IsNullOrEmpty(reqSid))
                {
                    shareUser = bllUser.GetUserInfoByAutoID(int.Parse(reqSid));
                }

                var reqUserAutoId = Request["autoid"];

                currUser = bllUser.GetUserInfoByAutoID(int.Parse(reqUserAutoId));

                website = bllUser.GetWebsiteInfoModelFromDataBase(currUser.WebsiteOwner);

                config = bllWebsite.GetCompanyWebsiteConfig(currUser.WebsiteOwner);

                if (string.IsNullOrWhiteSpace(website.DistributionShareQrcodeBgImg))
                {
                    website.DistributionShareQrcodeBgImg = "http://files.comeoncloud.net/img/gxfc.png";
                }

                string currUserShowName = bllUser.GetUserDispalyName(currUser);

                shareTitle = currUserShowName + "邀请您加入 " + website.WXMallName;

                if (!string.IsNullOrWhiteSpace(reqUserAutoId))
                {
                    bllWeixin.GetDistributionWxQrcodeLimit(out qrcondeUrl, currUser);
                    if (!string.IsNullOrEmpty(config.DistributionQRCodeIcon) && !string.IsNullOrEmpty(qrcondeUrl))
                    {
                        try
                        {
                            qrcondeUrl = bllWeixin.GetQRCodeImg(qrcondeUrl, config.DistributionQRCodeIcon);
                        }
                        catch (Exception ex)
                        {
                        }
                    }
                    pageTitle = currUserShowName + "的专属二维码";
                }
            }
            catch (Exception ex)
            {
                Response.Write(ex.ToString());
                Response.End();
            }
        }