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'}) }