联调实时数据页面
This commit is contained in:
@@ -54,8 +54,15 @@ export function getUserById() {
|
||||
}
|
||||
|
||||
// 刷新token
|
||||
// 导出一个名为refreshToken的函数,该函数返回一个Promise对象
|
||||
export function refreshToken(): Promise<any> {
|
||||
// 调用useAdminInfo函数获取管理员信息,并将其赋值给adminInfo变量
|
||||
const adminInfo = useAdminInfo()
|
||||
// 调用login函数,传入一个对象作为参数,该对象包含grant_type、refresh_token和username三个属性
|
||||
// grant_type设置为'refresh_token',表示使用刷新令牌的方式获取新的访问令牌
|
||||
// refresh_token使用adminInfo中的refresh_token属性
|
||||
// username使用adminInfo中的loginName属性
|
||||
// 返回login函数的调用结果,即一个Promise对象
|
||||
return login({
|
||||
grant_type: 'refresh_token',
|
||||
refresh_token: adminInfo.refresh_token,
|
||||
|
||||
Reference in New Issue
Block a user