Exemplo n.º 1
0
        public static string GetURL(string code, string ParaStr, string url, string langcode)
        {
            Lebi_Site site = new Lebi_Site();

            if (ShopPage.IsAPP() || ShopPage.IsWechat() || ShopPage.IsWap())
            {
                site = B_Lebi_Site.GetModel("IsMobile = 1 order by Sort asc");
                if (site == null)
                {
                    site = B_Lebi_Site.GetModel("IsMobile = 0 order by Sort asc");
                }
            }
            else
            {
                site = B_Lebi_Site.GetModel("IsMobile = 0 order by Sort asc");
                if (site == null)
                {
                    site = B_Lebi_Site.GetModel("IsMobile = 1 order by Sort asc");
                }
            }
            Lebi_Language lang = B_Lebi_Language.GetModel("Site_id =" + site.id + " and Code = '" + langcode + "'");

            if (lang == null)
            {
                lang = new Lebi_Language();
            }
            return(GetURL(code, ParaStr, url, lang));
        }
Exemplo n.º 2
0
        public static string GetURL(string code, string ParaStr, string url, Lebi_Language lang)
        {
            if (lang == null)
            {
                lang = new Lebi_Language();
            }
            Lebi_Site site = B_Lebi_Site.GetModel(lang.Site_id);

            if (site == null)
            {
                if (ShopPage.IsAPP() || ShopPage.IsWechat() || ShopPage.IsWap())
                {
                    site = B_Lebi_Site.GetModel("IsMobile = 1 order by Sort asc");
                }
                else
                {
                    site = B_Lebi_Site.GetModel("IsMobile = 0 order by Sort asc");
                }
                if (site == null)
                {
                    site = new Lebi_Site();
                }
            }
            return(GetURL(code, ParaStr, url, site, lang));
        }