From 4091d215b4fd35f975dd09cc8824026087ede9b6 Mon Sep 17 00:00:00 2001 From: unknown <1162963624@qq.com> Date: Mon, 30 Nov 2020 14:21:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E6=B3=A8=E5=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.ts | 3 ++- src/views/login/Login.vue | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/api/index.ts b/src/api/index.ts index ba392bd..84241b6 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -913,7 +913,8 @@ export async function register(data: any){ mtongue: data.muyu, tlanguage: data.jiaoshou, language: getValue("Lanvuage") || 'zh', - zoneid: days.tz.guess() + zoneid: days.tz.guess(), + memberid: sessionStorage.getItem('mid') }) if(res.code == 0){ diff --git a/src/views/login/Login.vue b/src/views/login/Login.vue index 30b9cc8..807dd64 100644 --- a/src/views/login/Login.vue +++ b/src/views/login/Login.vue @@ -271,7 +271,12 @@ export default defineComponent({ window.FB.login(function(response: any){ console.log(response, 121212) // handle the response - authLogin(response.authResponse.userID, index) + authLogin(response.authResponse.userID, index).then((res: any)=>{ + if(res.redirect == 1){ + sessionStorage.setItem('mid',res.memberid); + router.push("/sign") + } + }) }); }