Exemplo n.º 1
0
        /// <summary>
        /// 客服回复
        /// </summary>
        /// <param name="outid"></param>
        /// <returns></returns>
        public ActionResult getkefuinfo(string outid = "-1")
        {
            outid = !string.IsNullOrEmpty(outid) ? outid : "-1";
            BaseInfoModel info = new BaseInfoModel()
            {
                Outid   = -1,
                Addtime = DateTime.Now,
                BaseId  = 0,
                Content = "",
                Title   = "异常报错"
            };

            try
            {
                List <BaseInfoModel> infolist = AdminBaseInfo.GetBaseInfoList(-1, " and outid='" + outid + "' ");
                if (infolist.Count > 0)
                {
                    info = infolist[0];
                }
            }
            catch (Exception ex)
            {
                Console.Write(ex.ToString());
            }
            StringBuilder strb = new StringBuilder();

            strb.Append("callback({\"Outid\":\"" + info.Outid + "\",\"Title\":\"" + info.Title + "\",\"Content\":\"" + info.Content + "\"})");
            return(Content(strb.ToString()));
        }
Exemplo n.º 2
0
        public ActionResult PosterBaseInfo()
        {
            List <BaseInfoModel> listbase = AdminBaseInfo.GetBaseInfoList(4);
            BaseInfoModel        baseinfo = listbase[0];

            return(View(baseinfo));
        }
Exemplo n.º 3
0
        public ActionResult BaseInfoList(int baseid = -1)
        {
            List <BaseInfoModel> listbase = AdminBaseInfo.GetBaseInfoList(baseid);

            ShopUtils.SetAdminRefererCookie(Url.Action("baseinfolist"));
            return(View(listbase));
        }
Exemplo n.º 4
0
        public ActionResult EditBaseInfo(int baseid = -1)
        {
            List <BaseInfoModel> listbase = AdminBaseInfo.GetBaseInfoList(baseid);

            ViewData["referer"] = ShopUtils.GetAdminRefererCookie();
            if (listbase.Count == 0)
            {
                return(View(new BaseInfoModel()));
            }
            BaseInfoModel baseinfo = listbase[0];

            return(View(baseinfo));
        }
Exemplo n.º 5
0
        public ActionResult PosterBaseInfo(BaseInfoModel baseinfo)
        {
            List <BaseInfoModel> listbase = AdminBaseInfo.GetBaseInfoList(4);

            BaseInfoModel hbinfo = listbase[0];

            hbinfo.Content = baseinfo.Content;
            bool result = AdminBaseInfo.UpdateBaseInfo(hbinfo.BaseId, hbinfo.Title, hbinfo.Content);

            if (result)
            {
                return(PromptView("保存成功"));
            }
            else
            {
                return(PromptView("保存失败"));
            }
        }
Exemplo n.º 6
0
        ///// <summary>
        ///// 提现条件
        ///// </summary>
        ///// <returns></returns>
        //public ActionResult DrawSet()
        //{

        //}
        #endregion

        #region 海报下载
        public ActionResult hbdownload()
        {
            try
            {
                List <BaseInfoModel> infolist = AdminBaseInfo.GetBaseInfoList(4);
                if (infolist.Count == 0)
                {
                    return(APIResult("error", "没有海报信息"));
                }
                BaseInfoModel binfo   = AdminBaseInfo.GetBaseInfoList(4)[0];
                string        content = binfo.Content;
                string[]      list    = CommonHelper.GetHtmlImageUrlList(content);
                string        img     = list[0];
                return(APIResult("success", BSPConfig.ShopConfig.SiteUrl + img));
            }
            catch (Exception ex)
            {
                return(APIResult("error", "获取海报信息失败"));
            }
        }
Exemplo n.º 7
0
        /// <summary>
        /// 帮助信息
        /// </summary>
        /// <returns></returns>
        public ActionResult Help()
        {
            List <BaseInfoModel> listbase = AdminBaseInfo.GetBaseInfoList(-1, "  and title='帮助信息'");

            return(View(listbase));
        }