structure user and izitoast and add medicalcenter

This commit is contained in:
saeid_01
2019-04-20 01:32:52 +04:30
parent a4eb09fb67
commit 5831a29686
42 changed files with 7424 additions and 4948 deletions
+17 -2
View File
@@ -1,6 +1,8 @@
import qs from 'qs';
const TOKEN_KEY = 'access_token'
const REFRESH_TOKEN_KEY = 'refresh_token'
const INFO = 'info'
/**
* Manage the how Access Tokens are being stored and retreived from storage.
*
@@ -30,7 +32,20 @@ const TokenService = {
removeRefreshToken() {
localStorage.removeItem(REFRESH_TOKEN_KEY)
}
},
getInfo() {
return qs.parse(localStorage.getItem(INFO))
},
saveInfo(info = null) {
info = qs.stringify(info);
localStorage.setItem(INFO, info)
},
removeInfo() {
localStorage.removeItem(INFO)
},
}