Beispiel #1
0
        /// <summary>
        /// 获取微信JsTicket
        /// </summary>
        public static ModelWxJsTicket GetWxJsTicket(ModelWxToken token)
        {
            // 设置API路径及参数
            String          wxApiUrl = String.Format(mWxSetting.Api_GetTicket, "&", token.access_token);
            ModelWxJsTicket ticket   = WebApiHelper.GetWxResponse <ModelWxJsTicket>(mWxSetting.Api_BaseUrl, wxApiUrl);

            return(ticket);
        }
Beispiel #2
0
        /// <summary>
        /// 获取微信Token
        /// </summary>
        public static ModelWxToken GetWxToken(string appId, string appSecret)
        {
            // 设置API路径及参数
            String       wxApiUrl = String.Format(mWxSetting.Api_GetToken, "&", appId, appSecret);
            ModelWxToken token    = WebApiHelper.GetWxResponse <ModelWxToken>(mWxSetting.Api_BaseUrl, wxApiUrl);

            return(token);
        }