Beispiel #1
0
        public CustomJsonResult <JsApiConfigParams> GetJsApiConfigParams(string url)
        {
            string jsApiTicket = WxUntil.GetInstance().GetJsApiTicket(wxConfig.AppId, wxConfig.AppSecret, this.GetApiAccessToken());

            JsApiConfigParams parms = new JsApiConfigParams(wxConfig.AppId, url, jsApiTicket);

            return(new CustomJsonResult <JsApiConfigParams>(ResultType.Success, ResultCode.Success, "", parms));
        }
Beispiel #2
0
        public static WxUntil GetInstance()
        {
            if (instance == null)
            {
                lock (padlock)
                {
                    if (instance == null)
                    {
                        instance = new WxUntil();
                    }
                }
            }

            return(instance);
        }
Beispiel #3
0
 public string GetApiAccessToken()
 {
     return(WxUntil.GetInstance().GetAccessToken(wxConfig.AppId, wxConfig.AppSecret));
 }
Beispiel #4
0
 public List <WxUserCard> GetUserCards(string opendid, string cardid)
 {
     return(WxUntil.GetInstance().GetUserCartList(this.GetApiAccessToken(), opendid, cardid));
 }
Beispiel #5
0
 public string UploadMultimediaImage(string imageUrl)
 {
     return(WxUntil.GetInstance().UploadMultimediaImage(this.GetApiAccessToken(), imageUrl));
 }
Beispiel #6
0
        public string GetCardApiTicket()
        {
            string cardApiTicket = WxUntil.GetInstance().GetCardApiTicket(wxConfig.AppId, wxConfig.AppSecret, this.GetApiAccessToken());

            return(cardApiTicket);
        }
Beispiel #7
0
 public WxApiUserInfoResult GetUserInfoByApiToken(string openId)
 {
     return(WxUntil.GetInstance().GetUserInfoByApiToken(this.GetApiAccessToken(), openId));
 }
Beispiel #8
0
 public string CardCodeDecrypt(string encrypt_code)
 {
     return(WxUntil.GetInstance().CardCodeDecrypt(this.GetApiAccessToken(), encrypt_code));
 }