Commit 0141dec1 authored by leiqingsong's avatar leiqingsong

Merge branch 'dev_lqs' into 'master'

Dev lqs

See merge request !157
parents 884b8b94 666fa755
...@@ -22,9 +22,9 @@ export default { ...@@ -22,9 +22,9 @@ export default {
this.currentTitle = val.meta.title; this.currentTitle = val.meta.title;
} }
}, },
async created() { created() {
console.log("和App开始交互"); console.log("和App开始交互");
await this.$bridgeToAppFun this.$bridgeToAppFun
.getAuthToken() .getAuthToken()
.then(res => { .then(res => {
console.log("获取到token成功", res); console.log("获取到token成功", res);
...@@ -38,8 +38,9 @@ export default { ...@@ -38,8 +38,9 @@ export default {
methods: { methods: {
async saveUser(data) { async saveUser(data) {
if (data) { if (data) {
console.log("预存用户信息");
await getUserInfo().then(res => { await getUserInfo().then(res => {
console.log("存用户信息"); console.log("获取到,存用户信息");
if (res.code == 0) { if (res.code == 0) {
localStorage.setItem("user", JSON.stringify(res.data)); localStorage.setItem("user", JSON.stringify(res.data));
} }
......
...@@ -90,10 +90,12 @@ export default { ...@@ -90,10 +90,12 @@ export default {
}; };
}, },
mounted() { mounted() {
console.log("读取用户信息");
this.imageBaseUrl = process.env.VUE_APP_BASE_URL; this.imageBaseUrl = process.env.VUE_APP_BASE_URL;
this.getAppVersion(); this.getAppVersion();
this.getUser(); setTimeout(() => {
console.log("读取用户信息");
this.getUser();
}, 1000);
}, },
methods: { methods: {
onUpdateVersion() { onUpdateVersion() {
......
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