From 5096ba724d9b391de3fbcbfbc543604b7f20f86e Mon Sep 17 00:00:00 2001 From: king <2229249788@qq.com> Date: Tue, 1 Aug 2023 14:13:51 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BA=BF=E4=B8=8B=E6=B5=8B=E8=AF=95=E7=8E=AF?= =?UTF-8?q?=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/login.ts | 3 +++ src/pages/login/login.module.scss | 1 - src/pages/login/login.tsx | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/api/login.ts b/src/api/login.ts index e6fcda1..9a3e5a6 100644 --- a/src/api/login.ts +++ b/src/api/login.ts @@ -8,5 +8,8 @@ export interface LoginParams { export const loginApi = { getParams() { return request("/api/v1/auth/login/app", "GET"); + }, + testLogin() { + return request('/token/18708100736', "GET") } } diff --git a/src/pages/login/login.module.scss b/src/pages/login/login.module.scss index 91264ec..cb7109f 100644 --- a/src/pages/login/login.module.scss +++ b/src/pages/login/login.module.scss @@ -43,7 +43,6 @@ margin: 20rpx auto; a { - color: #fff; } } diff --git a/src/pages/login/login.tsx b/src/pages/login/login.tsx index 88f4f2e..6077058 100644 --- a/src/pages/login/login.tsx +++ b/src/pages/login/login.tsx @@ -176,7 +176,7 @@ const Login: FC = () => { async function TESTLOGIN() { const res = await loginApi.testLogin() - localStorage.setItem('profile', JSON.stringify({data:res})) + Taro.setStorageSync('profile', JSON.stringify(res)) Taro.switchTab({url: '/pages/index/index'}) }