Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
SunWuyuan committed Nov 24, 2024
1 parent 162a7ab commit b7f38a0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/pages/account/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export default {
getResponse,
resetCaptcha,
userCardLoading: false,
localuserInfo: localuser.user,
localuser: localuser,
userInfo: {},
tab: null,
select: { state: "未知", abbr: "3" },
Expand Down Expand Up @@ -328,7 +328,11 @@ export default {
//initRecaptcha('recaptcha-div1');
},
async created() {
await this.getuserInfo();
if (this.localuser.islogin == false) {
this.$router.push("/account/login");
} else {
await this.getuserInfo();
}
},
methods: {
// 事件处理函数
Expand Down Expand Up @@ -426,7 +430,7 @@ export default {
async getuserInfo() {
this.userInfo = await request({
url: "/api/getuserInfo?id=" + this.localuserInfo.userid,
url: "/api/getuserInfo?id=" + this.localuser.user.userid,
method: "get",
});
this.userInfo = this.userInfo.info.user;
Expand Down

0 comments on commit b7f38a0

Please sign in to comment.