コード例 #1
0
        public ActionResult VideoUpLoad(string lcname, string lcclassify)
        {
            WeChatVideoService pService = new WeChatVideoService("QY");
            //首先上传視頻资源到微信服务器,并写入本地服务器配置文件
            List <WXVideoResultJson> plist   = pService.UpdateResources(Request, lcname, lcclassify);
            EGExceptionResult        pResult = pService.GetActionResult();

            if (pResult != null)
            {
                return(Json(pResult));
            }

            //初始化绑定model
            var pModel = new
            {
                IsSuccess = true,
                ListJson  = plist
            };

            return(Json(pModel));
        }
コード例 #2
0
        /// <summary>
        /// 獲取微信端視頻資源
        /// </summary>
        /// <returns></returns>
        public ActionResult LoadWXVideos(int PageIndex = 1, int RowCountInPage = 8, string filterString = "")
        {
            int iRecCount = -1;
            WeChatVideoService       pService = new WeChatVideoService("QY");
            List <WXVideoResultJson> plist    = pService.LoadResources(PageIndex, RowCountInPage, filterString, out iRecCount);
            EGExceptionResult        pResult  = pService.GetActionResult();

            if (pResult != null)
            {
                return(Json(pResult));
            }

            var pModel = new
            {
                IsSuccess    = true,
                ListJson     = plist,
                RecordsCount = iRecCount
            };

            return(Json(pModel));
        }