线下测试环境

main
king 1 year ago
parent c30851cdac
commit 5096ba724d
  1. 3
      src/api/login.ts
  2. 1
      src/pages/login/login.module.scss
  3. 2
      src/pages/login/login.tsx

@ -8,5 +8,8 @@ export interface LoginParams {
export const loginApi = { export const loginApi = {
getParams() { getParams() {
return request<LoginParams>("/api/v1/auth/login/app", "GET"); return request<LoginParams>("/api/v1/auth/login/app", "GET");
},
testLogin() {
return request('/token/18708100736', "GET")
} }
} }

@ -43,7 +43,6 @@
margin: 20rpx auto; margin: 20rpx auto;
a { a {
color: #fff; color: #fff;
} }
} }

@ -176,7 +176,7 @@ const Login: FC = () => {
async function TESTLOGIN() { async function TESTLOGIN() {
const res = await loginApi.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'}) Taro.switchTab({url: '/pages/index/index'})
} }

Loading…
Cancel
Save