type: 定义全局返回值类型

This commit is contained in:
奔跑的面条
2022-06-01 22:41:11 +08:00
parent 2fcd3b1132
commit 0b04bf4929
12 changed files with 25 additions and 24 deletions
+1 -1
View File
@@ -106,7 +106,7 @@ export const reloadRoutePage = () => {
*/
export const logout = async () => {
try {
const res:any = await logoutApi()
const res = await logoutApi() as unknown as MyResponseType
if(res.code === ResultEnum.SUCCESS) {
window['$message'].success(window['$t']('global.logout_success'))
clearCookie(RequestHttpHeaderEnum.COOKIE)