Ejemplo n.º 1
0
        public static string Getmenulist(int comid, int pageindex, int pagesize, int usetype = 0, int menuindex = 0)
        {
            int totalcount  = 0;
            int totalcount1 = 0;
            int totalcount2 = 0;
            int totalcount3 = 0;

            try
            {
                var imagedata   = new B2bCompanyMenuData();
                var prodata     = new B2bComProData();
                var actdata     = new WxMaterialData();
                var projectdata = new B2b_com_projectData();
                List <B2b_company_menu> list   = imagedata.GetMenuList(comid, pageindex, pagesize, out totalcount, usetype, menuindex);
                IEnumerable             result = "";
                if (list != null)
                {
                    result = from pro in list
                             select new
                    {
                        Id             = pro.Id,
                        Com_id         = pro.Com_id,
                        Imgurl_address = FileSerivce.GetImgUrl(pro.Imgurl),
                        Imgurl         = pro.Imgurl,
                        Linkurl        = pro.Linkurl,
                        Name           = pro.Name,
                        Fonticon       = pro.Fonticon,
                        Usestyle       = pro.Usestyle,
                        Menutype       = pro.Menutype,
                        Usetype        = pro.Usetype,
                        Projectlist    = pro.Projectlist,
                        menuindex      = pro.menuindex,
                        menuviewtype   = pro.menuviewtype,
                        hotellist      = pro.menuviewtype == 1 ? projectdata.Projectpagelist(comid.ToString(), 1, 12, "1", out totalcount3, "", 1, pro.Projectlist, 9) : null,
                        prolist        = pro.Menutype == 0 ? prodata.Selectpagelist_diaoyong(comid.ToString(), 1, 12, "", out totalcount1, pro.Projectlist, 0, pro.Id) : null,//读出每个栏目的产品,每页12个
                        Materiallist   = pro.Menutype == 0 ? null : actdata.ShopWxMaterialPageList(comid, 1, 12, 10, pro.Id, pro.Projectlist, out totalcount2, "")
                    };
                }

                return(JsonConvert.SerializeObject(new { type = 100, msg = result, totalCount = totalcount }));
            }
            catch (Exception ex)
            {
                return(JsonConvert.SerializeObject(new { type = 1, msg = ex.Message }));
            }
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            B2b_company_manageuser user    = UserHelper.CurrentUser();
            B2b_company            company = UserHelper.CurrentCompany;

            comid  = company.ID;//获取登陆账户公司id
            userid = user.Id.ToString();
            if (comid == 0)
            {
                Response.Redirect("/");//如果没有COMID 返回 首页
            }


            //判断商户ID(域名未绑定)
            if (comid != 0)
            {
                B2b_company modlecom = B2bCompanyData.GetAllComMsg(comid);
                if (modlecom != null)
                {
                    Com_name       = modlecom.Com_name;
                    txtServiceInfo = modlecom.B2bcompanyinfo.Serviceinfo;
                    Scenic_name    = modlecom.Scenic_name;
                    scenic_address = modlecom.B2bcompanyinfo.Scenic_address;
                    coordinate     = modlecom.B2bcompanyinfo.Coordinate;
                    coordinatesize = modlecom.B2bcompanyinfo.Coordinatesize;
                    weixinimg      = modlecom.B2bcompanyinfo.Weixinimg;
                    weixinname     = modlecom.B2bcompanyinfo.Weixinname;
                    Qq             = modlecom.B2bcompanyinfo.Qq;
                }

                B2b_company_saleset pro = B2bCompanySaleSetData.GetDirectSellByComid(comid.ToString());
                if (pro != null)
                {
                    if (pro.Smalllogo != null && pro.Smalllogo != "")
                    {
                        comlogo = FileSerivce.GetImgUrl(pro.Smalllogo.ConvertTo <int>(0));
                    }
                    Copyright = pro.Copyright;
                    Tel       = pro.Service_Phone;
                }



                //读取首页栏目,只读取前10个栏目,太多影响打开
                //var shopmenudata = new B2bCompanyMenuData();
                //menulist = shopmenudata.GetMenuList(comid, 1, 10, out menutotalcount, 1);
                //if (menulist != null)
                //{
                //    for (int i = 0; i < menutotalcount; i++)
                //    {
                //        menulist[i].Imgurl_address = FileSerivce.GetImgUrl(menulist[i].Imgurl);
                //    }
                //}

                //如果没有栏目读取项目
                if (menutotalcount == 0)
                {
                    var prodata = new B2b_com_projectData();
                    projectlist = prodata.Projectpagelist(comid.ToString(), 1, 20, "1", out porjectcount, "", 1);
                }
            }
        }
Ejemplo n.º 3
0
        public int viewtop   = 1;   //头部及左侧相关显示控制
        protected void Page_Load(object sender, EventArgs e)
        {
            //如果判断手机浏览器 跳转手机版
            string u  = Request.ServerVariables["HTTP_USER_AGENT"];
            bool   bo = detectmobilebrowser.HttpUserAgent(u);

            if (bo)
            {
                Response.Redirect("/h5/order/");
            }


            RequestUrl = Request.ServerVariables["SERVER_NAME"].ToString();
            comid      = Request["comid"].ConvertTo <int>(0);
            menuindex  = Request["menuindex"].ConvertTo <int>(0);


            B2b_company_info companyinfo = B2bCompanyData.GetComId(RequestUrl);

            if (companyinfo != null)
            {
                comid = companyinfo.Com_id;
            }
            else
            { //判定是否为自助域名规则安 shop1.etown.cn
                if (Domain_def.Domain_yanzheng(RequestUrl))
                {
                    comid = Int32.Parse(Domain_def.Domain_Huoqu(RequestUrl));
                }
            }


            //绿野 不显示头部
            if (comid == 2553)
            {
                viewtop = 0;
            }

            //判断商户ID(域名未绑定)
            if (comid != 0)
            {
                B2b_company modlecom = B2bCompanyData.GetAllComMsg(comid);
                if (modlecom != null)
                {
                    Com_name       = modlecom.Com_name;
                    txtServiceInfo = modlecom.B2bcompanyinfo.Serviceinfo;
                    Scenic_name    = modlecom.Scenic_name;
                    scenic_address = modlecom.B2bcompanyinfo.Scenic_address;
                    coordinate     = modlecom.B2bcompanyinfo.Coordinate;
                    coordinatesize = modlecom.B2bcompanyinfo.Coordinatesize;
                    weixinimg      = modlecom.B2bcompanyinfo.Weixinimg;
                    weixinname     = modlecom.B2bcompanyinfo.Weixinname;
                    Qq             = modlecom.B2bcompanyinfo.Qq;
                }

                B2b_company_saleset pro = B2bCompanySaleSetData.GetDirectSellByComid(comid.ToString());
                if (pro != null)
                {
                    if (pro.Smalllogo != null && pro.Smalllogo != "")
                    {
                        comlogo = FileSerivce.GetImgUrl(pro.Smalllogo.ConvertTo <int>(0));
                    }
                    Copyright = pro.Copyright;
                    Tel       = pro.Service_Phone;
                }



                //读取首页栏目,只读取前10个栏目,太多影响打开
                var shopmenudata = new B2bCompanyMenuData();
                menulist = shopmenudata.GetMenuList(comid, 1, 10, out menutotalcount, 1, menuindex);
                if (menulist != null)
                {
                    for (int i = 0; i < menulist.Count; i++)
                    {
                        menulist[i].Imgurl_address = FileSerivce.GetImgUrl(menulist[i].Imgurl);
                    }
                }

                //如果没有栏目读取项目
                if (menutotalcount == 0)
                {
                    var prodata = new B2b_com_projectData();
                    projectlist = prodata.Projectpagelist(comid.ToString(), 1, 10, "1", out porjectcount, "");
                }
            }


            int totalcount = 0;

            if (Session["AccountId"] != null)
            {
                //账户信息
                AccountId   = Int32.Parse(Session["AccountId"].ToString());
                AccountName = Session["AccountName"].ToString();
                AccountCard = Session["AccountCard"].ToString();
                RequestUrl  = Request.ServerVariables["SERVER_NAME"].ToLower();

                //会员信息
                B2bCrmData dateuser  = new B2bCrmData();
                B2b_crm    modeluser = dateuser.Readuser(AccountId, comid);

                if (modeluser != null)
                {
                    AccountWeixin = modeluser.Weixin;
                    AccountEmail  = modeluser.Email;
                    Accountphone  = modeluser.Phone;
                    Imprest       = modeluser.Imprest;
                    Integral      = modeluser.Integral;
                    //密码
                    AccountPass = modeluser.Password1;
                    //微信关注
                    weixin = modeluser.Weixin == "" ? "未关注" : "已关注";
                }

                //用户订单
                //List<B2b_order> orderlist = new B2bOrderData().ComOrderPageList(comid,1, 100, AccountId, out totalcount);
                //Rporder.DataSource = orderlist;
                //Rporder.DataBind();
            }
        }
Ejemplo n.º 4
0
        public int promotetypeid = 0;   //文章分类


        protected void Page_Load(object sender, EventArgs e)
        {
            RequestUrl    = Request.ServerVariables["SERVER_NAME"].ToString();
            comid         = Request["comid"].ConvertTo <int>(0);
            id            = Request["id"].ConvertTo <int>(0);
            promotetypeid = Request["promotetypeid"].ConvertTo <int>(0);

            B2b_company_info companyinfo = B2bCompanyData.GetComId(RequestUrl);

            if (companyinfo != null)
            {
                comid = companyinfo.Com_id;
            }
            else
            { //判定是否为自助域名规则安 shop1.etown.cn
                if (Domain_def.Domain_yanzheng(RequestUrl))
                {
                    comid = Int32.Parse(Domain_def.Domain_Huoqu(RequestUrl));
                }
            }

            if (comid != 0)
            {
                //从cookie中得到微信号
                if (Request.Cookies["openid"] != null)
                {
                    openid = Request.Cookies["openid"].Value;
                }
                B2bCrmData b2b_crm = new B2bCrmData();
                if (openid != "")
                {
                    B2b_crm b2bmodle = b2b_crm.b2b_crmH5(openid, comid);
                    if (b2bmodle != null)
                    {
                        Imprest  = b2bmodle.Imprest;
                        Integral = b2bmodle.Integral;
                    }
                }
            }



            //判断商户ID(域名未绑定)
            if (comid != 0)
            {
                B2b_company modlecom = B2bCompanyData.GetAllComMsg(comid);
                if (modlecom != null)
                {
                    Com_name = modlecom.Com_name;
                    title    = modlecom.Com_name;

                    txtServiceInfo = modlecom.B2bcompanyinfo.Serviceinfo;
                    Scenic_name    = modlecom.Scenic_name;
                    scenic_address = modlecom.B2bcompanyinfo.Scenic_address;
                    coordinate     = modlecom.B2bcompanyinfo.Coordinate;
                    coordinatesize = modlecom.B2bcompanyinfo.Coordinatesize;
                    weixinimg      = modlecom.B2bcompanyinfo.Weixinimg;
                    weixinname     = modlecom.B2bcompanyinfo.Weixinname;
                    Qq             = modlecom.B2bcompanyinfo.Qq;

                    Wxfocus_url    = modlecom.B2bcompanyinfo.Wxfocus_url;
                    Wxfocus_author = modlecom.B2bcompanyinfo.Wxfocus_author;;
                }

                B2b_company_saleset pro = B2bCompanySaleSetData.GetDirectSellByComid(comid.ToString());
                if (pro != null)
                {
                    if (pro.Smalllogo != null && pro.Smalllogo != "")
                    {
                        comlogo = FileSerivce.GetImgUrl(pro.Smalllogo.ConvertTo <int>(0));
                    }
                    phone     = pro.Service_Phone;
                    Copyright = pro.Copyright;
                    Tel       = pro.Service_Phone;
                }



                //读取首页栏目,只读取前10个栏目,太多影响打开
                var shopmenudata = new B2bCompanyMenuData();
                menulist = shopmenudata.GetMenuList(comid, 1, 10, out menutotalcount, 1);
                if (menulist != null)
                {
                    for (int i = 0; i < menutotalcount; i++)
                    {
                        menulist[i].Imgurl_address = FileSerivce.GetImgUrl(menulist[i].Imgurl);
                    }
                }

                //如果没有栏目读取项目
                if (menutotalcount == 0)
                {
                    var prodata = new B2b_com_projectData();
                    projectlist = prodata.Projectpagelist(comid.ToString(), 1, 10, "1", out porjectcount, "");
                }
            }


            int totalcount = 0;

            if (Session["AccountId"] != null)
            {
                //账户信息
                AccountId   = Int32.Parse(Session["AccountId"].ToString());
                AccountName = Session["AccountName"].ToString();
                AccountCard = Session["AccountCard"].ToString();
                RequestUrl  = Request.ServerVariables["SERVER_NAME"].ToLower();
            }
        }
Ejemplo n.º 5
0
        public void Page_Load(object sender, EventArgs e)
        {
            string u  = Request.ServerVariables["HTTP_USER_AGENT"];
            bool   bo = detectmobilebrowser.HttpUserAgent(u);

            uid       = Request["uid"].ConvertTo <int>(0);
            menuindex = Request["menuindex"].ConvertTo <int>(0);

            //获取IP地址
            uip = CommonFunc.GetRealIP();

            key = Request["key"].ConvertTo <string>("");

            if (key != "")
            {
                biaoti = key;
            }

            proclass = Request["class"].ConvertTo <int>(0);
            price    = Request["price"].ConvertTo <int>(0);

            //获取随机用户ID
            if (Request.Cookies["temp_userid"] != null)
            {
                userid = Request.Cookies["temp_userid"].Value;
            }
            else
            {
                userid = Domain_def.HuoQu_Temp_UserId();
                //Response.Cookies("userid").val();

                HttpCookie cookie = new HttpCookie("temp_userid");     //实例化HttpCookie类并添加值
                cookie.Value   = userid;
                cookie.Expires = DateTime.Now.AddDays(365);
                Response.Cookies.Add(cookie);
            }



            if (proclass != 0)
            {
                var prodata = new B2bComProData();
                var result  = prodata.Proclassbyid(proclass);
                if (result != null)
                {
                    biaoti = result.Classname;
                }
            }



            buyuid  = Request["buyuid"].ConvertTo <int>(0);
            tocomid = Request["tocomid"].ConvertTo <int>(0);


            if (Domain_def.Domain_yanzheng(RequestUrl))//如果符合shop101.etown.cn的格式,则从多微信商户基本信息表中获取comid
            {
                //先通过正则表达式获取COMid
                comid = Int32.Parse(Domain_def.Domain_Huoqu(RequestUrl).ToString());
            }
            if (comid == 0)//如果非标准格式,查询 是否有绑定的域名
            {
                var domaincomid = B2bCompanyData.GetComId(RequestUrl);
                if (domaincomid != null)
                {
                    comid = domaincomid.Com_id;
                }
            }


            if (comid != 0)
            {
                var commodel = B2bCompanyData.GetCompany(comid);

                if (commodel != null)
                {
                    if (commodel.B2bcompanyinfo != null)
                    {
                        Wxfocus_url    = commodel.B2bcompanyinfo.Wxfocus_url;
                        Wxfocus_author = commodel.B2bcompanyinfo.Wxfocus_author;
                        weixinname     = commodel.B2bcompanyinfo.Weixinname;
                        Scenic_intro   = commodel.B2bcompanyinfo.Scenic_intro;
                    }

                    title     = commodel.Com_name;
                    setsearch = commodel.Setsearch;
                }


                B2b_company_saleset pro = B2bCompanySaleSetData.GetDirectSellByComid(comid.ToString());
                if (pro != null)
                {
                    if (pro.Smalllogo != null && pro.Smalllogo != "")
                    {
                        comlogo = FileSerivce.GetImgUrl(pro.Smalllogo.ConvertTo <int>(0));
                    }
                }

                //获取微信平台端code
                string weixincode = Request["code"].ConvertTo <string>("");
                //获取微信号和一次性密码
                openid = Request["openid"].ConvertTo <string>("");
                string weixinpass = Request["weixinpass"].ConvertTo <string>("");

                //获得会员信息
                GetCrmInfo(weixincode, openid, weixinpass);
            }



            //获取BANNER,及logo
            if (comid != 0)
            {
                //根据产品判断商家是否含有自己的微信支付:a.含有的话支付到商家;b.没有的话支付到平台的微信公众号账户中
                B2b_finance_paytype model = new B2b_finance_paytypeData().GetFinancePayTypeByComid(comid);
                //TxtHelper.WriteFile("D:\\site\\b2betown\\ETS2.WebApp\\Log.txt", "b");
                if (model != null)
                {
                    //TxtHelper.WriteFile("D:\\site\\b2betown\\ETS2.WebApp\\Log.txt", "c");
                    //商家微信支付的所有参数都存在
                    if (model.Wx_appid != "" && model.Wx_appkey != "" && model.Wx_partnerid != "" && model.Wx_paysignkey != "")
                    {
                        //appId = model.Wx_appid;
                        //appsecret = model.Wx_appkey;
                        //appkey = model.Wx_paysignkey;
                        //mchid = model.Wx_partnerid;
                        //TxtHelper.WriteFile("D:\\site\\b2betown\\ETS2.WebApp\\Log.txt", "d");
                        issetfinancepaytype = true;
                    }
                }



                var imagedata  = new B2bCompanyImageData();
                int totalcount = 0;
                List <B2b_company_image> list = imagedata.PageGetimageList(comid, 2, out totalcount);

                if (list != null)
                {
                    for (int i = 0; i < totalcount; i++)
                    {
                        bannerimg   = FileSerivce.GetImgUrl(list[i].Imgurl);
                        bannerlink  = list[i].Linkurl;
                        bannertitle = list[i].Title;
                    }
                }

                //根据公司id得到 直销设置
                B2b_company_saleset saleset = B2bCompanySaleSetData.GetDirectSellByComid(comid.ToString());
                if (saleset != null)
                {
                    logoimg = FileSerivce.GetImgUrl(saleset.Smalllogo.ConvertTo <int>(0));
                }


                //读取首页栏目,只读取前10个栏目,太多影响打开
                var shopmenudata = new B2bCompanyMenuData();
                menulist = shopmenudata.GetMenuList(comid, 1, 30, out menutotalcount, 1, menuindex);
                if (menulist != null)
                {
                    if (menutotalcount > 30)
                    {
                        menutotalcount = 30;
                    }

                    for (int i = 0; i < menutotalcount; i++)
                    {
                        if (menulist[i].Imgurl != 0)
                        {
                            menulist[i].Imgurl_address = FileSerivce.GetImgUrl(menulist[i].Imgurl);
                        }
                        else
                        {
                            menulist[i].Imgurl_address = "";
                        }
                    }
                }

                //如果没有栏目读取项目
                if (menutotalcount == 0)
                {
                    var prodata = new B2b_com_projectData();
                    projectlist = prodata.Projectpagelist(comid.ToString(), 1, 10, "1", out porjectcount, "");
                }
            }



            //微信转发访问归属渠道
            if (uid != 0)//必须记录转发用户信息才能继续统计
            {
                //判断有转发人的渠道
                var    crmdata       = new B2bCrmData();
                var    pro           = crmdata.Readuser(uid, comid);//读取转发人用户信息
                string zhuanfa_phone = "";
                if (pro != null)
                {
                    zhuanfa_phone = pro.Phone;
                }

                if (zhuanfa_phone != "")
                {                                                                                  //转发人手机存在
                    MemberChannelData channeldata = new MemberChannelData();
                    var channeinfo = channeldata.GetPhoneComIdChannelDetail(zhuanfa_phone, comid); //查询渠道
                    if (channeinfo != null)
                    {
                        //转发人渠道记录COOKI
                        HttpCookie cookie = new HttpCookie("ZF_ChanneId");     //实例化HttpCookie类并添加值
                        cookie.Value   = channeinfo.Id.ToString();
                        cookie.Expires = DateTime.Now.AddDays(120);
                        Response.Cookies.Add(cookie);
                    }
                }
            }
        }
Ejemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            RequestUrl = Request.ServerVariables["SERVER_NAME"].ToString();
            comid      = Request["comid"].ConvertTo <int>(0);
            id         = Request["id"].ConvertTo <int>(0);

            B2b_company_info companyinfo = B2bCompanyData.GetComId(RequestUrl);

            if (companyinfo != null)
            {
                comid = companyinfo.Com_id;
            }
            else
            { //判定是否为自助域名规则安 shop1.etown.cn
                if (Domain_def.Domain_yanzheng(RequestUrl))
                {
                    comid = Int32.Parse(Domain_def.Domain_Huoqu(RequestUrl));
                }
            }

            if (id != 0)
            {
                B2b_com_pro pro = new B2bComProData().GetProById(id.ToString());
                if (pro == null)
                {
                    return;
                }
                //绿野 不显示头部
                if (comid == 2553)
                {
                    viewtop_pro = 0;
                }


                if (pro != null)
                {
                    if (pro.Com_id != comid)
                    {
                        return;
                    }

                    Ispanicbuy       = pro.Ispanicbuy;       //是否抢购或限购
                    Limitbuytotalnum = pro.Limitbuytotalnum; //限购数量

                    manyspeci = pro.Manyspeci;               //
                    //票务产品,判断 是否抢购/限购,是的话 作废超时未支付订单,完成回滚操作
                    if (pro_servertype == 1)
                    {
                        if (pro.Ispanicbuy == 1 || pro.Ispanicbuy == 2)
                        {
                            int rs = new B2bComProData().CancelOvertimeOrder(pro);
                        }
                    }

                    iscanbook      = new B2bComProData().IsYouxiao(pro.Id, pro.Server_type, pro.Pro_start, pro.Pro_end, pro.Pro_state);//判断产品是否有效:1.票务,直接判断有效期 和产品上线状态2.酒店,跟团游,当地游 则判断是否含有有效的房态/团期 以及产品上下线状态
                    pro_servertype = pro.Server_type;
                    pickuppoint    = pro.pickuppoint;
                    dropoffpoint   = pro.dropoffpoint;


                    childreduce = pro.Childreduce;
                }
                if (pro.Ispanicbuy == 1)
                {
                    panic_begintime  = pro.Panic_begintime;
                    panicbuy_endtime = pro.Panicbuy_endtime;

                    nowtoday = DateTime.Now;
                    TimeSpan tss = pro.Panic_begintime - nowtoday;
                    var      day = tss.Days * 24 * 3600;;  //这是相差的天数
                    var      h   = tss.Hours * 3600;       //这是相差的小时数,
                    var      m   = tss.Minutes * 60;
                    var      s   = tss.Seconds;
                    shijiacha = day + h + m + s;
                }
                projectid  = pro.Projectid;
                comid      = pro.Com_id;
                pro_name   = pro.Pro_name;
                price      = pro.Advise_price;
                Face_price = pro.Face_price;

                //如果含有规格读取规格价格中最低价
                if (manyspeci == 1)
                {
                    gglist = new B2b_com_pro_SpeciData().Getgglist(pro.Id);

                    if (gglist != null)
                    {
                        price      = 0;
                        Face_price = 0;
                        for (int i = 0; i < gglist.Count(); i++)
                        {
                            if (price == 0 || price > gglist[i].speci_advise_price)
                            {
                                price      = gglist[i].speci_advise_price;
                                Face_price = gglist[i].speci_face_price;
                            }
                        }
                    }
                }


                imgurl = FileSerivce.GetImgUrl(pro.Imgurl);
                if (price == 0)
                {
                    price = 0;
                }
                else
                {
                    CommonFunc.OperTwoDecimal(price.ToString());
                    //price = price.IndexOf(".") != -1 ? price.Substring(0, price.IndexOf(".")) : price;
                }

                nowdate = DateTime.Now.ToString("yyyy-MM-dd");


                if (pro.Service_Contain != "")
                {
                    sumaryend = pro.Service_Contain;
                }

                if (pro.Service_NotContain != "")
                {
                    sumaryend = sumaryend + "</br> " + pro.Service_NotContain;
                }

                if (pro.Precautions != "")
                {
                    sumaryend = sumaryend + "</br> " + pro.Precautions;
                }


                //如果服务类型是 票务;  则备注信息中 显示 电子码使用限制
                if (pro.Server_type == 1)
                {
                    if (pro.Iscanuseonsameday == 0)//电子码当天不可用
                    {
                        sumaryend = "此产品当天预订不可用<br>" + sumaryend;
                    }
                    if (pro.Iscanuseonsameday == 1)//电子码当天可用
                    {
                        sumaryend = "此产品当天预订可用<br>" + sumaryend;
                    }
                    if (pro.Iscanuseonsameday == 2)//电子码出票2小时内不可用
                    {
                        sumaryend = "此产品出票2小时内不可用<br>" + sumaryend;
                    }
                }

                remark  = pro.Pro_Remark;
                pro_num = pro.Pro_number;
                if (pro_num == 0)
                {
                    pro_max = 100;
                    pro_min = 1;
                }
                else
                {
                    pro_min = 1;
                    pro_max = pro_num;
                }
                pro_explain = pro.Pro_explain;



                #region 产品有效期判定(微信模板--门票订单预订成功通知 中也有用到)
                provalidatemethod = pro.ProValidateMethod; //判断 1按产品有效期,2指定有效期
                appointdate       = pro.Appointdata;       //1=一星期,,2=1个月,3=3个月,4=6个月,5=一年
                iscanuseonsameday = pro.Iscanuseonsameday; //1当天可用,0当天不可用

                DateTime pro_end = pro.Pro_end;
                //返回有效期
                pro_youxiaoqi = new B2bComProData().GetPro_Youxiaoqi(pro.Pro_start, pro.Pro_end, provalidatemethod, appointdate, iscanuseonsameday);

                #endregion



                var commodel = B2bCompanyData.GetCompany(comid);
                if (commodel != null)
                {
                    if (commodel.B2bcompanyinfo != null)
                    {
                        Wxfocus_url    = commodel.B2bcompanyinfo.Wxfocus_url;
                        Wxfocus_author = commodel.B2bcompanyinfo.Wxfocus_author;;
                    }
                }



                //查询项目电话,如果有项目电话调取项目电话
                var projectdata  = new B2b_com_projectData();
                var projectmodel = projectdata.GetProject(projectid, comid);
                if (projectmodel != null)
                {
                    if (projectmodel.Mobile != "")
                    {
                        phone = projectmodel.Mobile;
                    }
                }


                //从cookie中得到微信号
                if (Request.Cookies["openid"] != null)
                {
                    openid = Request.Cookies["openid"].Value;
                }
                B2bCrmData b2b_crm = new B2bCrmData();
                if (openid != "")
                {
                    B2b_crm b2bmodle = b2b_crm.b2b_crmH5(openid, comid);
                    if (b2bmodle != null)
                    {
                        Imprest  = b2bmodle.Imprest;
                        Integral = b2bmodle.Integral;
                    }
                }
            }



            //判断商户ID(域名未绑定)
            if (comid != 0)
            {
                B2b_company modlecom = B2bCompanyData.GetAllComMsg(comid);
                if (modlecom != null)
                {
                    Com_name = modlecom.Com_name;
                    title    = modlecom.Com_name;

                    txtServiceInfo = modlecom.B2bcompanyinfo.Serviceinfo;
                    Scenic_name    = modlecom.Scenic_name;
                    scenic_address = modlecom.B2bcompanyinfo.Scenic_address;
                    coordinate     = modlecom.B2bcompanyinfo.Coordinate;
                    coordinatesize = modlecom.B2bcompanyinfo.Coordinatesize;
                    weixinimg      = modlecom.B2bcompanyinfo.Weixinimg;
                    weixinname     = modlecom.B2bcompanyinfo.Weixinname;
                    Qq             = modlecom.B2bcompanyinfo.Qq;
                }

                B2b_company_saleset pro = B2bCompanySaleSetData.GetDirectSellByComid(comid.ToString());
                if (pro != null)
                {
                    if (pro.Smalllogo != null && pro.Smalllogo != "")
                    {
                        comlogo = FileSerivce.GetImgUrl(pro.Smalllogo.ConvertTo <int>(0));
                    }
                    phone     = pro.Service_Phone;
                    Copyright = pro.Copyright;
                    Tel       = pro.Service_Phone;
                }



                //读取首页栏目,只读取前10个栏目,太多影响打开
                var shopmenudata = new B2bCompanyMenuData();
                menulist = shopmenudata.GetMenuList(comid, 1, 10, out menutotalcount, 1);
                if (menulist != null)
                {
                    for (int i = 0; i < menutotalcount; i++)
                    {
                        menulist[i].Imgurl_address = FileSerivce.GetImgUrl(menulist[i].Imgurl);
                    }
                }

                //如果没有栏目读取项目
                if (menutotalcount == 0)
                {
                    var prodata = new B2b_com_projectData();
                    projectlist = prodata.Projectpagelist(comid.ToString(), 1, 10, "1", out porjectcount, "");
                }
            }


            int totalcount = 0;
            if (Session["AccountId"] != null)
            {
                //账户信息
                AccountId   = Int32.Parse(Session["AccountId"].ToString());
                AccountName = Session["AccountName"].ToString();
                AccountCard = Session["AccountCard"].ToString();
                RequestUrl  = Request.ServerVariables["SERVER_NAME"].ToLower();

                //会员信息
                B2bCrmData dateuser  = new B2bCrmData();
                B2b_crm    modeluser = dateuser.Readuser(AccountId, comid);

                if (modeluser != null)
                {
                    AccountWeixin = modeluser.Weixin;
                    AccountEmail  = modeluser.Email;
                    Accountphone  = modeluser.Phone;
                    Imprest       = modeluser.Imprest;
                    Integral      = modeluser.Integral;
                    //密码
                    AccountPass = modeluser.Password1;
                    //微信关注
                    weixin = modeluser.Weixin == "" ? "未关注" : "已关注";
                }
            }
        }