shangfutong-ui/jeepay-ui-uapp-agent/hooks/user.js

33 lines
509 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import appConfig from '@/config/appConfig.js'
import storageManage from '@/util/storageManage.js';
import { $userInfo, $logout } from '@/http/apiManager.js'
let USER_INFO = null
const user = {
// 退出登录清空token
logout() {
// 退出登录接口
$logout()
// 清空用户信息
USER_INFO = null
// 清空token
storageManage.token('', true)
uni.reLaunch({
url: '/pages/login/login'
})
}
}
function reqUserInfo() {
return $userInfo()
}
export default user