Пример #1
0
        private string GetAppUrl(M_QrCode model, DeviceHelper.Agent agent, DeviceHelper.Brower brower)
        {
            string url = "";

            if (string.IsNullOrEmpty(model.Urls))
            {
                return(url);
            }
            url = codeBll.GetUrlByAgent(agent, model);
            switch (agent)
            {
            case DeviceHelper.Agent.iPhone:
            case DeviceHelper.Agent.iPad:
                switch (brower)
                {
                case DeviceHelper.Brower.Micro:        //如果是微信,并且是分发市场的Url,则提示其用外置浏览器打开
                    string html = SafeSC.ReadFileStr("/APP/AppStore.html");
                    //html = html.Replace("@Device", "");
                    Response.Clear();
                    Response.Write(html); Response.Flush(); Response.End();
                    break;
                }
                break;
            }
            return(url);
        }
Пример #2
0
 public string GetUrlByAgent(DeviceHelper.Agent agent, M_QrCode model)
 {
     string[] urls = model.Urls.Split(',');
     foreach (string urlstr in urls)
     {
         string name = urlstr.Split('$')[0];
         string url  = urlstr.Split('$')[1];
         if (agent.ToString().Equals(name))
         {
             return(url);
         }
     }
     return("");
 }