From 6f7322628e589cc4dd6aa971646cbd845c9f83ef Mon Sep 17 00:00:00 2001 From: luyuan <1162963624@qq.com> Date: Tue, 10 Nov 2020 09:55:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E8=AF=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.ts | 2 +- src/store/index.ts | 1 + src/types/index.d.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/api/index.ts b/src/api/index.ts index 16b6b0c..ebd766f 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -31,7 +31,7 @@ export async function loginpass(phone: string, password: string,type?: number,sm }else{ setToken(); store.commit("login", true); - store.dispatch("setUserInfo"); + await store.dispatch("setUserInfo"); await router.push("/mine/archives") location.reload(); } diff --git a/src/store/index.ts b/src/store/index.ts index e0241a9..3f300b6 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -97,6 +97,7 @@ export default createStore({ async setUserInfo({ commit }){ const user = await userinfo(); if(user != '未登录'){ + saveValue("Lanvuage", user.languageValue); commit('setUserInfo', user); } else { const info = await getaddr(); diff --git a/src/types/index.d.ts b/src/types/index.d.ts index 8c9ac7c..d90fcd0 100644 --- a/src/types/index.d.ts +++ b/src/types/index.d.ts @@ -58,7 +58,7 @@ export interface UserInfo { video: string; desc: string; money: string; - + languageValue: number; }