Commit a31b0b52 authored by Xuguangxing's avatar Xuguangxing

feat: 更改api地址

parent 0ba37e09
...@@ -10,14 +10,15 @@ export default { ...@@ -10,14 +10,15 @@ export default {
}, },
methods: { methods: {
getToken() { getToken() {
const that = this; // const that = this;
window.xyqbNativeEvent = function(res) { window.xyqbNativeEvent = function(res) {
const json = typeof res === 'string' ? JSON.parse(res) : res; const json = typeof res === 'string' ? JSON.parse(res) : res;
if (json.event === 'getTokenSuccess') { if (json.event === 'getTokenSuccess') {
const appData = json.data || {}; const appData = json.data || {};
if (appData && appData.token) { if (appData && appData.token) {
localStorage.set('vccToken', appData.token); localStorage.set('vccToken', appData.token);
that.$router.go(0); const location = window.location;
window.location.href = location.href;
} }
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment