Commit c6a085cc authored by leiqingsong's avatar leiqingsong

测试设置页获取用户信息

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