Ejemplo n.º 1
0
        /// <summary>
        ///  选定模板
        /// </summary>
        /// <param name="order"></param>
        /// <returns></returns>
        public static string SelectModel(int modelid, int comid)
        {
            using (var helper = new SqlHelper())
            {
                int totalcount  = 0;
                int totalcount1 = 0;
                try
                {
                    B2bModelData modeldata    = new B2bModelData();
                    var          b2bmodel     = modeldata.GetModelById(modelid);
                    var          b2bmodelmenu = modeldata.ModelMenuPageList(modelid, 1, 100, out totalcount);

                    if (b2bmodel != null)
                    {
                        var delemodel = modeldata.DeleteSelectModel(comid);//删除已选择模板

                        H5_html model = new H5_html();
                        model.Comid     = comid;
                        model.Modelid   = modelid;
                        model.Style_str = b2bmodel.Style_str;
                        model.Html_str  = b2bmodel.Html_str;

                        //插入模板
                        int orderid = modeldata.SelectModel(model);

                        //原有图片都下线
                        var saledata   = new B2bCompanyImageData();
                        var bannerlist = saledata.UpAllDownState(comid);


                        //插入默认banner(也用于背景图片),重新选择模板后可能重复插入
                        B2bCompanyImageData modedata = new B2bCompanyImageData();
                        var imglist = modedata.GettypemodelidimageLibraryList(1, modelid, 1, 3, out totalcount1);
                        if (imglist != null)
                        {
                            for (int i = 0; i < imglist.Count; i++)
                            {
                                B2b_company_image imagemodel = new B2b_company_image()
                                {
                                    Id               = 0,
                                    Com_id           = comid,
                                    Typeid           = 0,
                                    Imgurl           = imglist[i].Imgurl,
                                    Linkurl          = "#",
                                    Title            = "#",
                                    Channelcompanyid = 0,
                                };
                                var crmid = saledata.InsertOrUpdate(imagemodel);
                            }
                        }


                        if (b2bmodelmenu != null)//首先判断模板里是否有默认栏目
                        {
                            var insertmenu = 0;
                            var imagedata  = new B2bCompanyMenuData();
                            var list       = imagedata.GetMenuList(comid, 1, 10, out totalcount);//如果已经有菜单的模板将不删除菜单,以后可增加判断是否删除菜单,有利于方便切换模板导航不需要重复修改,但容易出现因栏目图片不符新模板而影响使用。可先删除已有模板再进行切换

                            if (totalcount == 0)
                            {
                                insertmenu = modeldata.InsertSelectModelMenu(modelid, comid);//插入已选择模板菜单
                            }

                            //var deletemenu= modeldata.DeleteSelectModelMenu(comid);//删除已选择模板菜单
                            return(JsonConvert.SerializeObject(new { type = 100, msg = insertmenu }));
                        }
                    }

                    return(JsonConvert.SerializeObject(new { type = 1, msg = "选择模板错误,请重新尝试" }));
                }
                catch (Exception ex)
                {
                    helper.Rollback();
                    return(JsonConvert.SerializeObject(new { type = 1, msg = ex.Message }));
                }
            }
        }
Ejemplo n.º 2
0
        public int isrightwxset = 1;  //微信接口设置信息是否正确
        #endregion
        protected void Page_Load(object sender, EventArgs e)
        {
            MasterId = Request["MasterId"].ConvertTo <int>(0);
            come     = Request["come"].ConvertTo <string>("");
            B2b_company_manageuser manageruser = B2bCompanyManagerUserData.GetUser(MasterId);

            if (manageruser != null)
            {
                MasterId = manageruser.Id;

                MasterName  = manageruser.Employeename;
                CompanyName = B2bCompanyData.GetCompanyByUid(manageruser.Id).Com_name;
                Tel         = manageruser.Tel;
                Viewtel     = manageruser.Viewtel;
                comid       = manageruser.Com_id;
                B2bCrmData crmdata  = new B2bCrmData();
                var        crmmodel = crmdata.GetB2bCrmByPhone(manageruser.Com_id, Tel);
                if (crmmodel != null)
                {
                    if (crmmodel.Weixin != "")
                    {
                        zaixianzhuangtai = "我在线上";
                        guwenweixin      = crmmodel.Weixin;
                    }
                    else
                    {
                        zaixianzhuangtai = "未在线";
                    }
                }

                var commodel = B2bCompanyData.GetCompany(comid);

                if (commodel != null)
                {
                    title = commodel.Com_name;
                }

                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));
                    }
                }



                ChannelCompanyId = manageruser.Channelcompanyid;
                ChannelCompany   = new MemberChannelcompanyData().GetCompanyById(manageruser.Channelcompanyid.ToString().ConvertTo <int>(0));

                if (ChannelCompany != null)
                {
                    ChannelCompanyName = ChannelCompany.Companyname;
                }

                //获取渠道ID
                MemberChannelData channeldata = new MemberChannelData();
                var channelmodel = channeldata.GetPhoneComIdChannelDetail(Tel, comid);
                if (channelmodel != null)
                {
                    channelid = channelmodel.Id;
                }



                Channelsource = manageruser.Channelsource;
                CreateUserId  = manageruser.Createuserid;
                EmployeState  = manageruser.Employeestate;
                Job           = manageruser.Job;
                Selfbrief     = manageruser.Selfbrief;
                if (Selfbrief != "" && Selfbrief != null)
                {
                    if (Selfbrief.Length > 21)
                    {
                        Selfbrief = Selfbrief.Substring(0, 21) + "...";
                    }
                }


                //Headimg=manageruser.Headimg;
                Headimgurl   = FileSerivce.GetImgUrl(manageruser.Headimg);
                Workingyears = manageruser.Workingyears;
                Workdays     = manageruser.Workdays;

                WorkdaysView = crmdata.WorkDay(Workdays);//判断是否在工作日内,1为在,0为不在



                Workdaystime           = manageruser.Workdaystime;
                Workendtime            = manageruser.Workendtime;
                Fixphone               = manageruser.Fixphone;
                Email                  = manageruser.Email;
                Homepage               = manageruser.Homepage;
                Weibopage              = manageruser.Weibopage;
                QQ                     = manageruser.QQ;
                Weixin                 = manageruser.Weixin;
                Selfhomepage_qrcordurl = manageruser.Selfhomepage_qrcordurl;

                //获取公司信息(微信连接地址)
                cominfo = B2bCompanyData.GetAllComMsg(comid);
                if (cominfo != null)
                {
                    linkguanzhu = cominfo.B2bcompanyinfo.Wxfocus_url;
                    author      = cominfo.B2bcompanyinfo.Wxfocus_author;
                }

                //导航
                var imagedata  = new B2bCompanyMenuData();
                int totalcount = 0;

                List <B2b_company_menu> list = imagedata.GetconsultantList(manageruser.Com_id, 1, 10, out totalcount);
                if (list != null)
                {
                    for (int i = 0; i < list.Count; i++)
                    {
                        var imageurl = FileSerivce.GetImgUrl(list[i].Imgurl);



                        if (firstmenuid == 0)
                        {
                            firstdaohang = list[i].Linktype;
                            firstmenuid  = list[i].Id;
                            isoutpro     = list[i].Outdata;
                        }
                        if (daohang_html == "")
                        {
                            daohang_html += "<li class=\"curr\" menu-id=\"" + list[i].Id + "\"  data-id=\"" + list[i].Linktype + "\"  data-isoutpro=\"" + list[i].Outdata + "\"><!--<img src=\"" + imageurl + "\" height=\"60px\">--><span>" + list[i].Name + "</span></li>";
                        }
                        else
                        {
                            daohang_html += "<li class=\"\" menu-id=\"" + list[i].Id + "\"  data-id=\"" + list[i].Linktype + "\"   data-isoutpro=\"" + list[i].Outdata + "\"><!--<img src=\"" + imageurl + "\" height=\"60px\">--><span>" + list[i].Name + "</span></li>";
                        }
                        //daohang_Imgurl_address = FileSerivce.GetImgUrl(list.Imgurl);
                        //daohang_Imgurl = list.Imgurl;
                        ///daohang_Linkurl = list.Linkurl;
                        //daohang_Name = list.Name;
                        //daohang_Fonticon = list.Fonticon;
                    }
                }
            }
            ;


            //获取微信平台端code
            string weixincode = Request["code"].ConvertTo <string>("");

            if (weixincode != "")
            {
                int questtype = 2;//1=微信授权验证
                DealUserinfo1("", weixincode, comid, questtype);
            }
            else
            {
                string openid     = Request["openid"].ConvertTo <string>("");
                string weixinpass = Request["weixinpass"].ConvertTo <string>("");
                int    questtype  = 1;                               //1=一次性密码验证
                DealUserinfo1(openid, weixinpass, comid, questtype); //判断用户微信号(1,点击的转发链接进来的2,点击微信菜单进来的);使用户处于登录状态(不包括点击转发链接的)
            }



            //创建新的微信一次性密码
            new_weixinpass = new B2bCrmData().WeixinGetPass(weixinopenid, comid);


            #region  微信语音播放接口会用到
            string url = Request.Url.ToString();

            //根据传入参数openid、comid 得到 access_token、jsapi_ticket、noncestr、timestamp、 url(当前网页的URL,不包含#及其后面部分)
            WeiXinBasic basic = new WeiXinBasicData().GetWxBasicByComId(comid);
            if (basic != null)
            {
                appId     = basic.AppId;
                timestamp = new WeixinVoiceUtil().CreatenTimestamp();
                nonceStr  = new WeixinVoiceUtil().CreatenNonce_str();

                WXAccessToken maccesstoken = new WeixinVoiceUtil().GetAccessToken(comid, basic.AppId, basic.AppSecret);
                if (maccesstoken != null)
                {
                    string jsapi_ticket = new WeixinVoiceUtil().GetTickect(maccesstoken.ACCESS_TOKEN, comid);
                    if (jsapi_ticket == "")
                    {
                        isrightwxset = 0;
                    }
                    else
                    {
                        string beforesha1_signature = "";
                        signature = new WeixinVoiceUtil().GetSignature(jsapi_ticket, nonceStr, timestamp, url, out beforesha1_signature);
                    }
                }
                else
                {
                    isrightwxset = 0;
                }
            }
            else
            {
                isrightwxset = 0;
            }
            #endregion
        }
Ejemplo n.º 3
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.º 4
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 == "" ? "未关注" : "已关注";
                }
            }
        }