Esempio n. 1
0
        public FuncResult SaveCurrentSelfMenuInfoUrl(string param)
        {
            var result = GetAccessToken();

            if (!result.IsSeccess)
            {
                return(new FuncResult()
                {
                    IsSuccess = false, Message = result.ErrMsg
                });
            }
            string url  = string.Format(WxApiRequestUrl.SaveCurrentSelfMenuInfoUrl + "?ACCESS_TOKEN={0}", result.Access_Token);
            var    data = HttpServices <WeChatResult> .Post(url, param);

            return(new FuncResult()
            {
                Data = data.ErrCode, Message = data.ErrMsg
            });
        }
Esempio n. 2
0
        /// <summary>
        /// 获取微信公众号菜单
        /// </summary>
        /// <returns></returns>
        public FuncResult <Root> GetCurrentSelfMenu()
        {
            var result = GetAccessToken();

            if (!result.IsSeccess)
            {
                return(new FuncResult <Root>()
                {
                    IsSuccess = false, Message = result.ErrMsg
                });
            }
            string url  = string.Format(WxApiRequestUrl.GetCurrentSelfMenuInfoUrl + "?ACCESS_TOKEN={0}", result.Access_Token);
            var    data = HttpServices <Root> .Post(url);

            return(new FuncResult <Root>()
            {
                IsSuccess = true, Data = data
            });
        }