|
@@ -18,10 +18,15 @@ export default {
|
|
|
async created() {
|
|
|
try {
|
|
|
let Authorization = this.getQueryVariable('Authorization')
|
|
|
- Authorization = Authorization ? Authorization.split('+')[1] : null
|
|
|
+ if(window.location.hash.indexOf("+") >= 0) {
|
|
|
+ Authorization = Authorization ? Authorization.split('+')[1] : null
|
|
|
+ Authorization = ('bearer ' + Authorization)
|
|
|
+ } else {
|
|
|
+ Authorization = decodeURI(Authorization)
|
|
|
+ }
|
|
|
if (Authorization) {
|
|
|
- localStorage.setItem("Authorization", ('bearer ' + Authorization));
|
|
|
- localStorage.setItem("userInfo", ('bearer ' + Authorization));
|
|
|
+ localStorage.setItem("Authorization", Authorization);
|
|
|
+ localStorage.setItem("userInfo", Authorization);
|
|
|
}
|
|
|
const auth = localStorage.getItem("Authorization");
|
|
|
const userInfo = localStorage.getItem("userInfo");
|