Closed huixisheng closed 3 years ago
大致实现的伪代码:
const qyApiConfig = new ApiConfig(agentId, appScrect, 'anytoken', true, '', corpId); QyApiConfigKit.putApiConfig(qyApiConfig); QyApiConfigKit.devMode = true; QyApiConfigKit.setCurrentAppId(qyApiConfig.getAppId, qyApiConfig.getCorpId); await QyAccessTokenApi.getAccessToken(); ... const jssdkConfig = await this.appSerice.fetchQyJsSdkConfig(currentUrl); async fetchQyJsSdkConfig(url) { const corpId = 'xxx'; const timestamp = new Date().getTime().toString(); const nonceStr: string = uuid.v1(); const signature = await QyWeChat.jssdkSignature(nonceStr, timestamp, url, QyJsApiType.CORP); ... }
如上代码调用,隔段时间使用缓存中的 accesstoken 就会有问题
https://github.com/Javen205/TNWX/issues/24 重复
版本信息
报错信息 (注意格式化)
大致实现的伪代码:
问题描述(包括回显步骤、截图 )
如上代码调用,隔段时间使用缓存中的 accesstoken 就会有问题