@yelon/bis 15.2.1 → 15.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/fesm2020/layout.mjs
CHANGED
|
@@ -1908,6 +1908,11 @@ class YunzaiAuthService {
|
|
|
1908
1908
|
switch (response.errcode) {
|
|
1909
1909
|
case 2000:
|
|
1910
1910
|
const { access_token, expires_in, refresh_token, scope, token_type } = response.data;
|
|
1911
|
+
// 如果token不一致,清除缓存
|
|
1912
|
+
const token = this.tokenService.get()?.token;
|
|
1913
|
+
if (token && access_token && token !== access_token) {
|
|
1914
|
+
this.cacheService.clear();
|
|
1915
|
+
}
|
|
1911
1916
|
return {
|
|
1912
1917
|
token: access_token,
|
|
1913
1918
|
expired: expires_in,
|