首次完整推送,
V:1.20240808.006
This commit is contained in:
@ -0,0 +1,24 @@
|
||||
/**
|
||||
* 刷新token
|
||||
* @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#refresh-token
|
||||
*/
|
||||
module.exports = async function () {
|
||||
const refreshTokenRes = await this.uniIdCommon.refreshToken({
|
||||
token: this.getUniversalUniIdToken()
|
||||
})
|
||||
const {
|
||||
errCode,
|
||||
token,
|
||||
tokenExpired
|
||||
} = refreshTokenRes
|
||||
if (errCode) {
|
||||
throw refreshTokenRes
|
||||
}
|
||||
return {
|
||||
errCode: 0,
|
||||
newToken: {
|
||||
token,
|
||||
tokenExpired
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user