diff --git a/.gitignore b/.gitignore index 32ae8faf2236293b8df288687c0ea0ba2439421d..9efd31908016e54425644a9912aea1afc1bd80e4 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,7 @@ node_modules/ uni_modules_tools/copy /uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json /uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-id/custom-password.js - +/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-uni-cloud-s2s/config.json .idea .vscode uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/.eslintrc.js diff --git a/uni_modules/uni-id-pages/changelog.md b/uni_modules/uni-id-pages/changelog.md index f80c2512477fc5ac80f3e809190331115f78574e..fcf5c143e5c5f465d58218477eaa562953115384 100644 --- a/uni_modules/uni-id-pages/changelog.md +++ b/uni_modules/uni-id-pages/changelog.md @@ -1,8 +1,11 @@ -## 1.1.11(2023-03-24) -- 修复 tabbar页面因为token无效而强制跳转至登录页面(url参数包含`uniIdRedirectUrl`)后无法返回的问题 -## 1.1.10(2023-03-24) -- 修复 PC微信扫码登录跳转地址错误 -- uni-id-co 新增 请求鉴权支持 uni-cloud-s2s 模块验证签名 [uni-cloud-s2s文档](https://uniapp.dcloud.net.cn/uniCloud/uni-cloud-s2s.html) +## 1.1.12(2023-03-29) +- uni-id-co 修复 更新push_clientid时因device_id没有变化导致无法更新 +- uni-id-co 新增 自无unionid到有unionid状态进行登录时为用户补充unionid字段 +## 1.1.11(2023-03-24) +- 修复 tabbar页面因为token无效而强制跳转至登录页面(url参数包含`uniIdRedirectUrl`)后无法返回的问题 +## 1.1.10(2023-03-24) +- 修复 PC微信扫码登录跳转地址错误 +- uni-id-co 新增 请求鉴权支持 uni-cloud-s2s 模块验证签名 [uni-cloud-s2s文档](https://uniapp.dcloud.net.cn/uniCloud/uni-cloud-s2s.html) ## 1.1.9(2023-03-24) - 修复 跳转至登录页面的url参数包含`uniIdRedirectUrl`后无法返回的问题 ## 1.1.8(2023-03-02) diff --git a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/utils/set-push-cid.js b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/utils/set-push-cid.js index 669a6d57788273ff490bf9906695b550caafd785..54f8ed6836028c5ec272516b40b8e64ba4794b3b 100644 --- a/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/utils/set-push-cid.js +++ b/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/utils/set-push-cid.js @@ -117,25 +117,16 @@ module.exports = async function (params = {}) { errCode: 0 } } - // 同一用户允许更新token_expired,不同用户在token_expired小于Date.now()时允许更新。搭配逻辑:用户退出登录时将token_expired置0 - if ( - deviceRecord.user_id === uid || - (deviceRecord.token_expired < Date.now()) - ) { - await deviceCollection.where({ - device_id: deviceId - }).update({ - user_id: uid, - token_expired: tokenExpired, - push_clientid: pushClientId, - appid: appId - }) - return { - errCode: 0 - } - } + await deviceCollection.where({ + device_id: deviceId + }).update({ + user_id: uid, + token_expired: tokenExpired, + push_clientid: pushClientId, + appid: appId + }) return { - errCode: ERROR.SYSTEM_ERROR + errCode: 0 } }