From ab5c7273008c5235dff532b4102bf445a40d6539 Mon Sep 17 00:00:00 2001 From: Tony Date: Wed, 10 Apr 2024 11:47:22 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20Login=E8=AF=B7=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/login/index.tsx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/pages/login/index.tsx b/src/pages/login/index.tsx index 264691e..30a21bc 100644 --- a/src/pages/login/index.tsx +++ b/src/pages/login/index.tsx @@ -6,6 +6,20 @@ import { useEffect, useState } from "react" import { request } from "../../config/axios" const login = (data, tenantId = '1') => { + return new Promise((resolve, reject) => { + Taro.showLoading({ title: '加载中...' }) + setTimeout(() => { + resolve({ + data: { + accessToken: "e41e9440229c4849b8ed1a9e574a3175", + expiresTime: 1712722539858, + refreshToken: "d80ccfe3a03942a2a197535de7d6cd93", + userId: 137, + } + }) + Taro.hideLoading() + }, 300) + }) return request({ url: '/system/auth/login', method: 'POST', @@ -16,6 +30,15 @@ const login = (data, tenantId = '1') => { } const getTenantId = (data) => { + return new Promise((resolve, reject) => { + Taro.showLoading({ title: '加载中...' }) + setTimeout(() => { + resolve({ + data: '158' + }) + Taro.hideLoading() + }, 300) + }) return request({ url: '/system/tenant/get-id-by-name', method: 'GET',