feat: Login请求

This commit is contained in:
Tony 2024-04-10 11:47:22 +08:00
parent 2893ce249f
commit ab5c727300

View File

@ -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',