diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/weixin.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/weixin.js index f07110b6e6e5a918912462d56544a24f0449ce58..98eb37059398652887590a79f472b20274507f15 100644 --- a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/weixin.js +++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/weixin.js @@ -106,8 +106,8 @@ async function saveSecureNetworkCache ({ unionid, session_key: sessionKey }) - // 此处存储的是code的缓存,有效期三天即可 - const expiredSeconds = 3 * 24 * 60 * 60 + // 此处存储的是code的缓存,设置有效期和token一致 + const expiredSeconds = this.config.tokenExpiresIn || 3 * 24 * 60 * 60 await openDataCollection.doc(key).set({ value,