Ejemplo n.º 1
0
        /// <summary>
        /// 刷新access_token
        /// </summary>
        /// <returns></returns>
        public void RefreshToken()
        {
            var rel = QyAPI.GetToken(CorpID, Secret);

            if (!string.IsNullOrEmpty(rel.access_token))
            {
                //QyAppDao qyAppDao = new QyAppDao();
                //qyAppDao.UpdateAccessToken(wechat.ID, rel.access_token);
            }
            else
            {
                throw new Exception("RefreshToken 系统异常");
            }
            access_token = rel.access_token;
        }