Ejemplo n.º 1
0
        public JsonResult GetWelcomeWords(string enterID)
        {
            List <string> words = new List <string>();

            try
            {
                int eid = 9999;
                int.TryParse(enterID, out eid);
                string queueName = SoftPhone.Business.EnterID2SkillBLL.GetSkillName(eid);
                words = SPhone_ChatBLL.GetChatTextList(queueName, "欢迎话术");
                if (words.Count == 0)
                {
                    string defaultWelcomeText = System.Configuration.ConfigurationManager.AppSettings["welcomeText"];
                    if (string.IsNullOrEmpty(defaultWelcomeText))
                    {
                        defaultWelcomeText = "用户,您好!";
                    }
                    words.Add(defaultWelcomeText);
                }
            }
            catch { }
            // 替换时间
            string        dataKey   = Tele.Common.Utils.GetDateKey();
            List <string> realWords = new List <string>();

            words.ForEach(w =>
            {
                string item = w.Replace("$$DataKey$$", dataKey);
                realWords.Add(item);
            });
            return(Jsonp(realWords, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取常用链接列表
        /// </summary>
        public JsonResult GetChatLinks(string queueName)
        {
            List <string> texts = new List <string>();

            try
            {
                texts = SPhone_ChatBLL.GetChatTextList(queueName, "常用链接");
            }
            catch { }
            return(Jsonp(texts, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 获取话术列表
        /// typeName 先进行UrlEncode转码
        /// </summary>
        public JsonResult GetChatTexts(string queueName, string typeName)
        {
            List <string> texts = new List <string>();

            try
            {
                typeName = HttpUtility.UrlDecode(typeName);
                texts    = SPhone_ChatBLL.GetChatTextList(queueName, typeName);
            }
            catch { }
            return(Jsonp(texts, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 查询常用语
        /// </summary>
        /// <param name="category">常用语类别</param>
        /// <returns></returns>
        public JsonResult GetCommonWords(string queueName)
        {
            List <string> words = SPhone_ChatBLL.GetChatTextList(queueName, "常用话术");

            return(Jsonp(words, JsonRequestBehavior.AllowGet));
        }