From a9159db7610fc4d4efcaf6e27ec79749ccb457b4 Mon Sep 17 00:00:00 2001 From: wangyaqi Date: Wed, 1 Mar 2023 18:22:07 +0800 Subject: [PATCH] feat: update weixin code cache expire --- .../uniCloud/cloudfunctions/uni-id-co/lib/utils/weixin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 f07110b..98eb370 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, -- GitLab