nili
8 months ago
37 changed files with 10970 additions and 5079 deletions
@ -1,15 +1,15 @@ |
|||
{ |
|||
"files": { |
|||
"main.css": "/static/css/main.6464b9b7.css", |
|||
"main.js": "/static/js/main.d0f8649a.js", |
|||
"main.css": "/static/css/main.31676e70.css", |
|||
"main.js": "/static/js/main.f7930c69.js", |
|||
"static/js/453.1d641cba.chunk.js": "/static/js/453.1d641cba.chunk.js", |
|||
"index.html": "/index.html", |
|||
"main.6464b9b7.css.map": "/static/css/main.6464b9b7.css.map", |
|||
"main.d0f8649a.js.map": "/static/js/main.d0f8649a.js.map", |
|||
"main.31676e70.css.map": "/static/css/main.31676e70.css.map", |
|||
"main.f7930c69.js.map": "/static/js/main.f7930c69.js.map", |
|||
"453.1d641cba.chunk.js.map": "/static/js/453.1d641cba.chunk.js.map" |
|||
}, |
|||
"entrypoints": [ |
|||
"static/css/main.6464b9b7.css", |
|||
"static/js/main.d0f8649a.js" |
|||
"static/css/main.31676e70.css", |
|||
"static/js/main.f7930c69.js" |
|||
] |
|||
} |
@ -1 +1 @@ |
|||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>奇迹畅玩</title><script defer="defer" src="/static/js/main.d0f8649a.js"></script><link href="/static/css/main.6464b9b7.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html> |
|||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>奇迹畅玩</title><script defer="defer" src="/static/js/main.f7930c69.js"></script><link href="/static/css/main.31676e70.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html> |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,89 +0,0 @@ |
|||
/*! |
|||
Copyright (c) 2018 Jed Watson. |
|||
Licensed under the MIT License (MIT), see |
|||
http://jedwatson.github.io/classnames |
|||
*/ |
|||
|
|||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ |
|||
|
|||
/** |
|||
* @license React |
|||
* react-dom.production.min.js |
|||
* |
|||
* Copyright (c) Facebook, Inc. and its affiliates. |
|||
* |
|||
* This source code is licensed under the MIT license found in the |
|||
* LICENSE file in the root directory of this source tree. |
|||
*/ |
|||
|
|||
/** |
|||
* @license React |
|||
* react-is.production.min.js |
|||
* |
|||
* Copyright (c) Facebook, Inc. and its affiliates. |
|||
* |
|||
* This source code is licensed under the MIT license found in the |
|||
* LICENSE file in the root directory of this source tree. |
|||
*/ |
|||
|
|||
/** |
|||
* @license React |
|||
* react-jsx-runtime.production.min.js |
|||
* |
|||
* Copyright (c) Facebook, Inc. and its affiliates. |
|||
* |
|||
* This source code is licensed under the MIT license found in the |
|||
* LICENSE file in the root directory of this source tree. |
|||
*/ |
|||
|
|||
/** |
|||
* @license React |
|||
* react.production.min.js |
|||
* |
|||
* Copyright (c) Facebook, Inc. and its affiliates. |
|||
* |
|||
* This source code is licensed under the MIT license found in the |
|||
* LICENSE file in the root directory of this source tree. |
|||
*/ |
|||
|
|||
/** |
|||
* @license React |
|||
* scheduler.production.min.js |
|||
* |
|||
* Copyright (c) Facebook, Inc. and its affiliates. |
|||
* |
|||
* This source code is licensed under the MIT license found in the |
|||
* LICENSE file in the root directory of this source tree. |
|||
*/ |
|||
|
|||
/** |
|||
* @license React |
|||
* use-sync-external-store-shim.production.min.js |
|||
* |
|||
* Copyright (c) Facebook, Inc. and its affiliates. |
|||
* |
|||
* This source code is licensed under the MIT license found in the |
|||
* LICENSE file in the root directory of this source tree. |
|||
*/ |
|||
|
|||
/** |
|||
* @remix-run/router v1.16.0 |
|||
* |
|||
* Copyright (c) Remix Software Inc. |
|||
* |
|||
* This source code is licensed under the MIT license found in the |
|||
* LICENSE.md file in the root directory of this source tree. |
|||
* |
|||
* @license MIT |
|||
*/ |
|||
|
|||
/** |
|||
* React Router v6.23.0 |
|||
* |
|||
* Copyright (c) Remix Software Inc. |
|||
* |
|||
* This source code is licensed under the MIT license found in the |
|||
* LICENSE.md file in the root directory of this source tree. |
|||
* |
|||
* @license MIT |
|||
*/ |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,103 @@ |
|||
/*! |
|||
Copyright (c) 2018 Jed Watson. |
|||
Licensed under the MIT License (MIT), see |
|||
http://jedwatson.github.io/classnames |
|||
*/ |
|||
|
|||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ |
|||
|
|||
/** |
|||
* @license React |
|||
* react-dom.production.min.js |
|||
* |
|||
* Copyright (c) Facebook, Inc. and its affiliates. |
|||
* |
|||
* This source code is licensed under the MIT license found in the |
|||
* LICENSE file in the root directory of this source tree. |
|||
*/ |
|||
|
|||
/** |
|||
* @license React |
|||
* react-is.production.min.js |
|||
* |
|||
* Copyright (c) Facebook, Inc. and its affiliates. |
|||
* |
|||
* This source code is licensed under the MIT license found in the |
|||
* LICENSE file in the root directory of this source tree. |
|||
*/ |
|||
|
|||
/** |
|||
* @license React |
|||
* react-jsx-runtime.production.min.js |
|||
* |
|||
* Copyright (c) Facebook, Inc. and its affiliates. |
|||
* |
|||
* This source code is licensed under the MIT license found in the |
|||
* LICENSE file in the root directory of this source tree. |
|||
*/ |
|||
|
|||
/** |
|||
* @license React |
|||
* react.production.min.js |
|||
* |
|||
* Copyright (c) Facebook, Inc. and its affiliates. |
|||
* |
|||
* This source code is licensed under the MIT license found in the |
|||
* LICENSE file in the root directory of this source tree. |
|||
*/ |
|||
|
|||
/** |
|||
* @license React |
|||
* scheduler.production.min.js |
|||
* |
|||
* Copyright (c) Facebook, Inc. and its affiliates. |
|||
* |
|||
* This source code is licensed under the MIT license found in the |
|||
* LICENSE file in the root directory of this source tree. |
|||
*/ |
|||
|
|||
/** |
|||
* @license React |
|||
* use-sync-external-store-shim.production.min.js |
|||
* |
|||
* Copyright (c) Facebook, Inc. and its affiliates. |
|||
* |
|||
* This source code is licensed under the MIT license found in the |
|||
* LICENSE file in the root directory of this source tree. |
|||
*/ |
|||
|
|||
/** |
|||
* @license qrcode.react |
|||
* Copyright (c) Paul O'Shannessy |
|||
* SPDX-License-Identifier: ISC |
|||
*/ |
|||
|
|||
/** |
|||
* @remix-run/router v1.16.0 |
|||
* |
|||
* Copyright (c) Remix Software Inc. |
|||
* |
|||
* This source code is licensed under the MIT license found in the |
|||
* LICENSE.md file in the root directory of this source tree. |
|||
* |
|||
* @license MIT |
|||
*/ |
|||
|
|||
/** |
|||
* React Router v6.23.0 |
|||
* |
|||
* Copyright (c) Remix Software Inc. |
|||
* |
|||
* This source code is licensed under the MIT license found in the |
|||
* LICENSE.md file in the root directory of this source tree. |
|||
* |
|||
* @license MIT |
|||
*/ |
|||
|
|||
/**![alipay](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIGZpbGwtcnVsZT0iZXZlbm9kZCIgdmlld0JveD0iNjQgNjQgODk2IDg5NiIgZm9jdXNhYmxlPSJmYWxzZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNTU3LjIgMTI5YTYuNjggNi42OCAwIDAxNi43MiA2LjY1VjI1MC4yaDI0My44YTYuNzQgNi43NCAwIDAxNi42NSA2Ljg0Yy4wMiAyMy45Mi02LjA1IDU0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jYgMjQuNy0yNS4zIDU3LjktMzkuMSA5My4yLTM4LjcgMzEuOS4zIDYyLjcgMTIuNiA4NiAzNC40IDcuOSA3LjQgMTQuNyAxNS42IDIwLjQgMjQuNCAyIDMuMSA1LjkgNC40IDkuMyAzLjIgMTcuNi02LjEgMzYuMi0xMC40IDU1LjMtMTIuNCA1LjYtLjYgOC44LTYuNiA2LjMtMTEuNi0zMi41LTY0LjMtOTguOS0xMDguNy0xNzUuNy0xMDkuOS0xMTAuOS0xLjctMjAzLjMgODkuMi0yMDMuMyAxOTkuOSAwIDYyLjggMjguOSAxMTguOCA3NC4yIDE1NS41LTMxLjggMTQuNy02MS4xIDM1LTg2LjUgNjAuNC01NC44IDU0LjctODUuOCAxMjYuOS04Ny44IDIwNGE4IDggMCAwMDggOC4yaDU2LjFjNC4zIDAgNy45LTMuNCA4LTcuNyAxLjktNTggMjUuNC0xMTIuMyA2Ni43LTE1My41IDI5LjQtMjkuNCA2NS40LTQ5LjggMTA0LjctNTkuNyAzLjktMSA2LjUtNC43IDYtOC43eiIgLz48L3N2Zz4=) */ |
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
@ -0,0 +1,14 @@ |
|||
import { FC, ReactNode } from "react"; |
|||
import { Navigate } from "react-router-dom"; |
|||
|
|||
interface PrivateRouteProps { |
|||
children: ReactNode; |
|||
} |
|||
|
|||
const PrivateRoute: FC<PrivateRouteProps> = ({ children }) => { |
|||
const isLoggedIn = localStorage.getItem("isLoggedIn"); // 假设登录状态存储在
|
|||
|
|||
return isLoggedIn ? <>{children}</> : <Navigate to="/login" replace />; |
|||
}; |
|||
|
|||
export default PrivateRoute; |
@ -0,0 +1,423 @@ |
|||
/* tslint:disable */ |
|||
/* eslint-disable */ |
|||
/** |
|||
* matrix后台 |
|||
* 乌啦啦 |
|||
* |
|||
* The version of the OpenAPI document: v1.0.0 |
|||
* |
|||
* |
|||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|||
* https://openapi-generator.tech
|
|||
* Do not edit the class manually. |
|||
*/ |
|||
|
|||
|
|||
import type { Configuration } from '../configuration'; |
|||
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; |
|||
import globalAxios from 'axios'; |
|||
// Some imports not used depending on template conditions
|
|||
// @ts-ignore
|
|||
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; |
|||
// @ts-ignore
|
|||
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; |
|||
// @ts-ignore
|
|||
import { LoginReq } from '../model'; |
|||
// @ts-ignore
|
|||
import { RMatrixAppBo } from '../model'; |
|||
// @ts-ignore
|
|||
import { RString } from '../model'; |
|||
// @ts-ignore
|
|||
import { RVoid } from '../model'; |
|||
// @ts-ignore
|
|||
import { RegisterBo } from '../model'; |
|||
/** |
|||
* OpenControllerApi - axios parameter creator |
|||
* @export |
|||
*/ |
|||
export const OpenControllerApiAxiosParamCreator = function (configuration?: Configuration) { |
|||
return { |
|||
/** |
|||
* |
|||
* @param {string} [inviteCode] |
|||
* @param {string} [appCode] |
|||
* @param {*} [options] Override http request option. |
|||
* @throws {RequiredError} |
|||
*/ |
|||
getApp: async (inviteCode?: string, appCode?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { |
|||
const localVarPath = `/api/citrus/register/getApp`; |
|||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); |
|||
let baseOptions; |
|||
if (configuration) { |
|||
baseOptions = configuration.baseOptions; |
|||
} |
|||
|
|||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; |
|||
const localVarHeaderParameter = {} as any; |
|||
const localVarQueryParameter = {} as any; |
|||
|
|||
if (inviteCode !== undefined) { |
|||
localVarQueryParameter['inviteCode'] = inviteCode; |
|||
} |
|||
|
|||
if (appCode !== undefined) { |
|||
localVarQueryParameter['appCode'] = appCode; |
|||
} |
|||
|
|||
|
|||
|
|||
setSearchParams(localVarUrlObj, localVarQueryParameter); |
|||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; |
|||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; |
|||
|
|||
return { |
|||
url: toPathString(localVarUrlObj), |
|||
options: localVarRequestOptions, |
|||
}; |
|||
}, |
|||
/** |
|||
* |
|||
* @param {LoginReq} loginReq |
|||
* @param {*} [options] Override http request option. |
|||
* @throws {RequiredError} |
|||
*/ |
|||
loginByCode: async (loginReq: LoginReq, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { |
|||
// verify required parameter 'loginReq' is not null or undefined
|
|||
assertParamExists('loginByCode', 'loginReq', loginReq) |
|||
const localVarPath = `/api/citrus/loginByCode`; |
|||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); |
|||
let baseOptions; |
|||
if (configuration) { |
|||
baseOptions = configuration.baseOptions; |
|||
} |
|||
|
|||
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; |
|||
const localVarHeaderParameter = {} as any; |
|||
const localVarQueryParameter = {} as any; |
|||
|
|||
|
|||
|
|||
localVarHeaderParameter['Content-Type'] = 'application/json'; |
|||
|
|||
setSearchParams(localVarUrlObj, localVarQueryParameter); |
|||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; |
|||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; |
|||
localVarRequestOptions.data = serializeDataIfNeeded(loginReq, localVarRequestOptions, configuration) |
|||
|
|||
return { |
|||
url: toPathString(localVarUrlObj), |
|||
options: localVarRequestOptions, |
|||
}; |
|||
}, |
|||
/** |
|||
* |
|||
* @param {LoginReq} loginReq |
|||
* @param {*} [options] Override http request option. |
|||
* @throws {RequiredError} |
|||
*/ |
|||
loginByPwd: async (loginReq: LoginReq, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { |
|||
// verify required parameter 'loginReq' is not null or undefined
|
|||
assertParamExists('loginByPwd', 'loginReq', loginReq) |
|||
const localVarPath = `/api/citrus/loginByPwd`; |
|||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); |
|||
let baseOptions; |
|||
if (configuration) { |
|||
baseOptions = configuration.baseOptions; |
|||
} |
|||
|
|||
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; |
|||
const localVarHeaderParameter = {} as any; |
|||
const localVarQueryParameter = {} as any; |
|||
|
|||
|
|||
|
|||
localVarHeaderParameter['Content-Type'] = 'application/json'; |
|||
|
|||
setSearchParams(localVarUrlObj, localVarQueryParameter); |
|||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; |
|||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; |
|||
localVarRequestOptions.data = serializeDataIfNeeded(loginReq, localVarRequestOptions, configuration) |
|||
|
|||
return { |
|||
url: toPathString(localVarUrlObj), |
|||
options: localVarRequestOptions, |
|||
}; |
|||
}, |
|||
/** |
|||
* |
|||
* @param {string} mobile |
|||
* @param {string} scene |
|||
* @param {*} [options] Override http request option. |
|||
* @throws {RequiredError} |
|||
*/ |
|||
sendCode: async (mobile: string, scene: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { |
|||
// verify required parameter 'mobile' is not null or undefined
|
|||
assertParamExists('sendCode', 'mobile', mobile) |
|||
// verify required parameter 'scene' is not null or undefined
|
|||
assertParamExists('sendCode', 'scene', scene) |
|||
const localVarPath = `/api/citrus/register/sendCode`; |
|||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); |
|||
let baseOptions; |
|||
if (configuration) { |
|||
baseOptions = configuration.baseOptions; |
|||
} |
|||
|
|||
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; |
|||
const localVarHeaderParameter = {} as any; |
|||
const localVarQueryParameter = {} as any; |
|||
|
|||
if (mobile !== undefined) { |
|||
localVarQueryParameter['mobile'] = mobile; |
|||
} |
|||
|
|||
if (scene !== undefined) { |
|||
localVarQueryParameter['scene'] = scene; |
|||
} |
|||
|
|||
|
|||
|
|||
setSearchParams(localVarUrlObj, localVarQueryParameter); |
|||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; |
|||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; |
|||
|
|||
return { |
|||
url: toPathString(localVarUrlObj), |
|||
options: localVarRequestOptions, |
|||
}; |
|||
}, |
|||
/** |
|||
* |
|||
* @param {RegisterBo} registerBo |
|||
* @param {*} [options] Override http request option. |
|||
* @throws {RequiredError} |
|||
*/ |
|||
submitRegister: async (registerBo: RegisterBo, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { |
|||
// verify required parameter 'registerBo' is not null or undefined
|
|||
assertParamExists('submitRegister', 'registerBo', registerBo) |
|||
const localVarPath = `/api/citrus/register/submitRegister`; |
|||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); |
|||
let baseOptions; |
|||
if (configuration) { |
|||
baseOptions = configuration.baseOptions; |
|||
} |
|||
|
|||
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; |
|||
const localVarHeaderParameter = {} as any; |
|||
const localVarQueryParameter = {} as any; |
|||
|
|||
|
|||
|
|||
localVarHeaderParameter['Content-Type'] = 'application/json'; |
|||
|
|||
setSearchParams(localVarUrlObj, localVarQueryParameter); |
|||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; |
|||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; |
|||
localVarRequestOptions.data = serializeDataIfNeeded(registerBo, localVarRequestOptions, configuration) |
|||
|
|||
return { |
|||
url: toPathString(localVarUrlObj), |
|||
options: localVarRequestOptions, |
|||
}; |
|||
}, |
|||
} |
|||
}; |
|||
|
|||
/** |
|||
* OpenControllerApi - functional programming interface |
|||
* @export |
|||
*/ |
|||
export const OpenControllerApiFp = function(configuration?: Configuration) { |
|||
const localVarAxiosParamCreator = OpenControllerApiAxiosParamCreator(configuration) |
|||
return { |
|||
/** |
|||
* |
|||
* @param {string} [inviteCode] |
|||
* @param {string} [appCode] |
|||
* @param {*} [options] Override http request option. |
|||
* @throws {RequiredError} |
|||
*/ |
|||
async getApp(inviteCode?: string, appCode?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RMatrixAppBo>> { |
|||
const localVarAxiosArgs = await localVarAxiosParamCreator.getApp(inviteCode, appCode, options); |
|||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0; |
|||
const localVarOperationServerBasePath = operationServerMap['OpenControllerApi.getApp']?.[localVarOperationServerIndex]?.url; |
|||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); |
|||
}, |
|||
/** |
|||
* |
|||
* @param {LoginReq} loginReq |
|||
* @param {*} [options] Override http request option. |
|||
* @throws {RequiredError} |
|||
*/ |
|||
async loginByCode(loginReq: LoginReq, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RString>> { |
|||
const localVarAxiosArgs = await localVarAxiosParamCreator.loginByCode(loginReq, options); |
|||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0; |
|||
const localVarOperationServerBasePath = operationServerMap['OpenControllerApi.loginByCode']?.[localVarOperationServerIndex]?.url; |
|||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); |
|||
}, |
|||
/** |
|||
* |
|||
* @param {LoginReq} loginReq |
|||
* @param {*} [options] Override http request option. |
|||
* @throws {RequiredError} |
|||
*/ |
|||
async loginByPwd(loginReq: LoginReq, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RString>> { |
|||
const localVarAxiosArgs = await localVarAxiosParamCreator.loginByPwd(loginReq, options); |
|||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0; |
|||
const localVarOperationServerBasePath = operationServerMap['OpenControllerApi.loginByPwd']?.[localVarOperationServerIndex]?.url; |
|||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); |
|||
}, |
|||
/** |
|||
* |
|||
* @param {string} mobile |
|||
* @param {string} scene |
|||
* @param {*} [options] Override http request option. |
|||
* @throws {RequiredError} |
|||
*/ |
|||
async sendCode(mobile: string, scene: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RVoid>> { |
|||
const localVarAxiosArgs = await localVarAxiosParamCreator.sendCode(mobile, scene, options); |
|||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0; |
|||
const localVarOperationServerBasePath = operationServerMap['OpenControllerApi.sendCode']?.[localVarOperationServerIndex]?.url; |
|||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); |
|||
}, |
|||
/** |
|||
* |
|||
* @param {RegisterBo} registerBo |
|||
* @param {*} [options] Override http request option. |
|||
* @throws {RequiredError} |
|||
*/ |
|||
async submitRegister(registerBo: RegisterBo, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RVoid>> { |
|||
const localVarAxiosArgs = await localVarAxiosParamCreator.submitRegister(registerBo, options); |
|||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0; |
|||
const localVarOperationServerBasePath = operationServerMap['OpenControllerApi.submitRegister']?.[localVarOperationServerIndex]?.url; |
|||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); |
|||
}, |
|||
} |
|||
}; |
|||
|
|||
/** |
|||
* OpenControllerApi - factory interface |
|||
* @export |
|||
*/ |
|||
export const OpenControllerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { |
|||
const localVarFp = OpenControllerApiFp(configuration) |
|||
return { |
|||
/** |
|||
* |
|||
* @param {string} [inviteCode] |
|||
* @param {string} [appCode] |
|||
* @param {*} [options] Override http request option. |
|||
* @throws {RequiredError} |
|||
*/ |
|||
getApp(inviteCode?: string, appCode?: string, options?: any): AxiosPromise<RMatrixAppBo> { |
|||
return localVarFp.getApp(inviteCode, appCode, options).then((request) => request(axios, basePath)); |
|||
}, |
|||
/** |
|||
* |
|||
* @param {LoginReq} loginReq |
|||
* @param {*} [options] Override http request option. |
|||
* @throws {RequiredError} |
|||
*/ |
|||
loginByCode(loginReq: LoginReq, options?: any): AxiosPromise<RString> { |
|||
return localVarFp.loginByCode(loginReq, options).then((request) => request(axios, basePath)); |
|||
}, |
|||
/** |
|||
* |
|||
* @param {LoginReq} loginReq |
|||
* @param {*} [options] Override http request option. |
|||
* @throws {RequiredError} |
|||
*/ |
|||
loginByPwd(loginReq: LoginReq, options?: any): AxiosPromise<RString> { |
|||
return localVarFp.loginByPwd(loginReq, options).then((request) => request(axios, basePath)); |
|||
}, |
|||
/** |
|||
* |
|||
* @param {string} mobile |
|||
* @param {string} scene |
|||
* @param {*} [options] Override http request option. |
|||
* @throws {RequiredError} |
|||
*/ |
|||
sendCode(mobile: string, scene: string, options?: any): AxiosPromise<RVoid> { |
|||
return localVarFp.sendCode(mobile, scene, options).then((request) => request(axios, basePath)); |
|||
}, |
|||
/** |
|||
* |
|||
* @param {RegisterBo} registerBo |
|||
* @param {*} [options] Override http request option. |
|||
* @throws {RequiredError} |
|||
*/ |
|||
submitRegister(registerBo: RegisterBo, options?: any): AxiosPromise<RVoid> { |
|||
return localVarFp.submitRegister(registerBo, options).then((request) => request(axios, basePath)); |
|||
}, |
|||
}; |
|||
}; |
|||
|
|||
/** |
|||
* OpenControllerApi - object-oriented interface |
|||
* @export |
|||
* @class OpenControllerApi |
|||
* @extends {BaseAPI} |
|||
*/ |
|||
export class OpenControllerApi extends BaseAPI { |
|||
/** |
|||
* |
|||
* @param {string} [inviteCode] |
|||
* @param {string} [appCode] |
|||
* @param {*} [options] Override http request option. |
|||
* @throws {RequiredError} |
|||
* @memberof OpenControllerApi |
|||
*/ |
|||
public getApp(inviteCode?: string, appCode?: string, options?: RawAxiosRequestConfig) { |
|||
return OpenControllerApiFp(this.configuration).getApp(inviteCode, appCode, options).then((request) => request(this.axios, this.basePath)); |
|||
} |
|||
|
|||
/** |
|||
* |
|||
* @param {LoginReq} loginReq |
|||
* @param {*} [options] Override http request option. |
|||
* @throws {RequiredError} |
|||
* @memberof OpenControllerApi |
|||
*/ |
|||
public loginByCode(loginReq: LoginReq, options?: RawAxiosRequestConfig) { |
|||
return OpenControllerApiFp(this.configuration).loginByCode(loginReq, options).then((request) => request(this.axios, this.basePath)); |
|||
} |
|||
|
|||
/** |
|||
* |
|||
* @param {LoginReq} loginReq |
|||
* @param {*} [options] Override http request option. |
|||
* @throws {RequiredError} |
|||
* @memberof OpenControllerApi |
|||
*/ |
|||
public loginByPwd(loginReq: LoginReq, options?: RawAxiosRequestConfig) { |
|||
return OpenControllerApiFp(this.configuration).loginByPwd(loginReq, options).then((request) => request(this.axios, this.basePath)); |
|||
} |
|||
|
|||
/** |
|||
* |
|||
* @param {string} mobile |
|||
* @param {string} scene |
|||
* @param {*} [options] Override http request option. |
|||
* @throws {RequiredError} |
|||
* @memberof OpenControllerApi |
|||
*/ |
|||
public sendCode(mobile: string, scene: string, options?: RawAxiosRequestConfig) { |
|||
return OpenControllerApiFp(this.configuration).sendCode(mobile, scene, options).then((request) => request(this.axios, this.basePath)); |
|||
} |
|||
|
|||
/** |
|||
* |
|||
* @param {RegisterBo} registerBo |
|||
* @param {*} [options] Override http request option. |
|||
* @throws {RequiredError} |
|||
* @memberof OpenControllerApi |
|||
*/ |
|||
public submitRegister(registerBo: RegisterBo, options?: RawAxiosRequestConfig) { |
|||
return OpenControllerApiFp(this.configuration).submitRegister(registerBo, options).then((request) => request(this.axios, this.basePath)); |
|||
} |
|||
} |
|||
|
@ -0,0 +1,120 @@ |
|||
/* tslint:disable */ |
|||
/* eslint-disable */ |
|||
/** |
|||
* matrix后台 |
|||
* 乌啦啦 |
|||
* |
|||
* The version of the OpenAPI document: v1.0.0 |
|||
* |
|||
* |
|||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|||
* https://openapi-generator.tech
|
|||
* Do not edit the class manually. |
|||
*/ |
|||
|
|||
|
|||
import type { Configuration } from '../configuration'; |
|||
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; |
|||
import globalAxios from 'axios'; |
|||
// Some imports not used depending on template conditions
|
|||
// @ts-ignore
|
|||
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; |
|||
// @ts-ignore
|
|||
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; |
|||
// @ts-ignore
|
|||
import { RUserBo } from '../model'; |
|||
/** |
|||
* UserControllerApi - axios parameter creator |
|||
* @export |
|||
*/ |
|||
export const UserControllerApiAxiosParamCreator = function (configuration?: Configuration) { |
|||
return { |
|||
/** |
|||
* |
|||
* @param {*} [options] Override http request option. |
|||
* @throws {RequiredError} |
|||
*/ |
|||
currentUser1: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { |
|||
const localVarPath = `/api/citrus/user/current`; |
|||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); |
|||
let baseOptions; |
|||
if (configuration) { |
|||
baseOptions = configuration.baseOptions; |
|||
} |
|||
|
|||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; |
|||
const localVarHeaderParameter = {} as any; |
|||
const localVarQueryParameter = {} as any; |
|||
|
|||
|
|||
|
|||
setSearchParams(localVarUrlObj, localVarQueryParameter); |
|||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; |
|||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; |
|||
|
|||
return { |
|||
url: toPathString(localVarUrlObj), |
|||
options: localVarRequestOptions, |
|||
}; |
|||
}, |
|||
} |
|||
}; |
|||
|
|||
/** |
|||
* UserControllerApi - functional programming interface |
|||
* @export |
|||
*/ |
|||
export const UserControllerApiFp = function(configuration?: Configuration) { |
|||
const localVarAxiosParamCreator = UserControllerApiAxiosParamCreator(configuration) |
|||
return { |
|||
/** |
|||
* |
|||
* @param {*} [options] Override http request option. |
|||
* @throws {RequiredError} |
|||
*/ |
|||
async currentUser1(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RUserBo>> { |
|||
const localVarAxiosArgs = await localVarAxiosParamCreator.currentUser1(options); |
|||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0; |
|||
const localVarOperationServerBasePath = operationServerMap['UserControllerApi.currentUser1']?.[localVarOperationServerIndex]?.url; |
|||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); |
|||
}, |
|||
} |
|||
}; |
|||
|
|||
/** |
|||
* UserControllerApi - factory interface |
|||
* @export |
|||
*/ |
|||
export const UserControllerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { |
|||
const localVarFp = UserControllerApiFp(configuration) |
|||
return { |
|||
/** |
|||
* |
|||
* @param {*} [options] Override http request option. |
|||
* @throws {RequiredError} |
|||
*/ |
|||
currentUser1(options?: any): AxiosPromise<RUserBo> { |
|||
return localVarFp.currentUser1(options).then((request) => request(axios, basePath)); |
|||
}, |
|||
}; |
|||
}; |
|||
|
|||
/** |
|||
* UserControllerApi - object-oriented interface |
|||
* @export |
|||
* @class UserControllerApi |
|||
* @extends {BaseAPI} |
|||
*/ |
|||
export class UserControllerApi extends BaseAPI { |
|||
/** |
|||
* |
|||
* @param {*} [options] Override http request option. |
|||
* @throws {RequiredError} |
|||
* @memberof UserControllerApi |
|||
*/ |
|||
public currentUser1(options?: RawAxiosRequestConfig) { |
|||
return UserControllerApiFp(this.configuration).currentUser1(options).then((request) => request(this.axios, this.basePath)); |
|||
} |
|||
} |
|||
|
@ -0,0 +1,45 @@ |
|||
/* tslint:disable */ |
|||
/* eslint-disable */ |
|||
/** |
|||
* matrix后台 |
|||
* 乌啦啦 |
|||
* |
|||
* The version of the OpenAPI document: v1.0.0 |
|||
* |
|||
* |
|||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|||
* https://openapi-generator.tech
|
|||
* Do not edit the class manually. |
|||
*/ |
|||
|
|||
|
|||
// May contain unused imports in some cases
|
|||
// @ts-ignore
|
|||
import { STSInfo } from './stsinfo'; |
|||
|
|||
/** |
|||
* |
|||
* @export |
|||
* @interface RSTSInfo |
|||
*/ |
|||
export interface RSTSInfo { |
|||
/** |
|||
* |
|||
* @type {number} |
|||
* @memberof RSTSInfo |
|||
*/ |
|||
'code'?: number; |
|||
/** |
|||
* |
|||
* @type {string} |
|||
* @memberof RSTSInfo |
|||
*/ |
|||
'message'?: string; |
|||
/** |
|||
* |
|||
* @type {STSInfo} |
|||
* @memberof RSTSInfo |
|||
*/ |
|||
'data'?: STSInfo; |
|||
} |
|||
|
@ -0,0 +1,45 @@ |
|||
/* tslint:disable */ |
|||
/* eslint-disable */ |
|||
/** |
|||
* matrix后台 |
|||
* 乌啦啦 |
|||
* |
|||
* The version of the OpenAPI document: v1.0.0 |
|||
* |
|||
* |
|||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|||
* https://openapi-generator.tech
|
|||
* Do not edit the class manually. |
|||
*/ |
|||
|
|||
|
|||
// May contain unused imports in some cases
|
|||
// @ts-ignore
|
|||
import { UserBo } from './user-bo'; |
|||
|
|||
/** |
|||
* |
|||
* @export |
|||
* @interface RUserBo |
|||
*/ |
|||
export interface RUserBo { |
|||
/** |
|||
* |
|||
* @type {number} |
|||
* @memberof RUserBo |
|||
*/ |
|||
'code'?: number; |
|||
/** |
|||
* |
|||
* @type {string} |
|||
* @memberof RUserBo |
|||
*/ |
|||
'message'?: string; |
|||
/** |
|||
* |
|||
* @type {UserBo} |
|||
* @memberof RUserBo |
|||
*/ |
|||
'data'?: UserBo; |
|||
} |
|||
|
@ -0,0 +1,66 @@ |
|||
/* tslint:disable */ |
|||
/* eslint-disable */ |
|||
/** |
|||
* matrix后台 |
|||
* 乌啦啦 |
|||
* |
|||
* The version of the OpenAPI document: v1.0.0 |
|||
* |
|||
* |
|||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|||
* https://openapi-generator.tech
|
|||
* Do not edit the class manually. |
|||
*/ |
|||
|
|||
|
|||
|
|||
/** |
|||
* |
|||
* @export |
|||
* @interface STSInfo |
|||
*/ |
|||
export interface STSInfo { |
|||
/** |
|||
* |
|||
* @type {string} |
|||
* @memberof STSInfo |
|||
*/ |
|||
'securityToken'?: string; |
|||
/** |
|||
* |
|||
* @type {string} |
|||
* @memberof STSInfo |
|||
*/ |
|||
'expiration'?: string; |
|||
/** |
|||
* |
|||
* @type {string} |
|||
* @memberof STSInfo |
|||
*/ |
|||
'accessKeySecret'?: string; |
|||
/** |
|||
* |
|||
* @type {string} |
|||
* @memberof STSInfo |
|||
*/ |
|||
'accessKeyId'?: string; |
|||
/** |
|||
* |
|||
* @type {string} |
|||
* @memberof STSInfo |
|||
*/ |
|||
'stsRole'?: string; |
|||
/** |
|||
* |
|||
* @type {string} |
|||
* @memberof STSInfo |
|||
*/ |
|||
'bucket'?: string; |
|||
/** |
|||
* |
|||
* @type {string} |
|||
* @memberof STSInfo |
|||
*/ |
|||
'endpoint'?: string; |
|||
} |
|||
|
@ -0,0 +1,84 @@ |
|||
/* tslint:disable */ |
|||
/* eslint-disable */ |
|||
/** |
|||
* matrix后台 |
|||
* 乌啦啦 |
|||
* |
|||
* The version of the OpenAPI document: v1.0.0 |
|||
* |
|||
* |
|||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|||
* https://openapi-generator.tech
|
|||
* Do not edit the class manually. |
|||
*/ |
|||
|
|||
|
|||
|
|||
/** |
|||
* |
|||
* @export |
|||
* @interface UserBo |
|||
*/ |
|||
export interface UserBo { |
|||
/** |
|||
* |
|||
* @type {number} |
|||
* @memberof UserBo |
|||
*/ |
|||
'id'?: number; |
|||
/** |
|||
* |
|||
* @type {string} |
|||
* @memberof UserBo |
|||
*/ |
|||
'mobile'?: string; |
|||
/** |
|||
* |
|||
* @type {string} |
|||
* @memberof UserBo |
|||
*/ |
|||
'name'?: string; |
|||
/** |
|||
* |
|||
* @type {string} |
|||
* @memberof UserBo |
|||
*/ |
|||
'nickname'?: string; |
|||
/** |
|||
* |
|||
* @type {string} |
|||
* @memberof UserBo |
|||
*/ |
|||
'avatar'?: string; |
|||
/** |
|||
* |
|||
* @type {number} |
|||
* @memberof UserBo |
|||
*/ |
|||
'money'?: number; |
|||
/** |
|||
* |
|||
* @type {string} |
|||
* @memberof UserBo |
|||
*/ |
|||
'aliPayAccount'?: string; |
|||
/** |
|||
* |
|||
* @type {number} |
|||
* @memberof UserBo |
|||
*/ |
|||
'income'?: number; |
|||
/** |
|||
* |
|||
* @type {string} |
|||
* @memberof UserBo |
|||
*/ |
|||
'inviteCode'?: string; |
|||
/** |
|||
* |
|||
* @type {string} |
|||
* @memberof UserBo |
|||
*/ |
|||
'inviteUrl'?: string; |
|||
} |
|||
|
@ -0,0 +1,82 @@ |
|||
import { Avatar, List } from "antd-mobile"; |
|||
import * as htmlToImage from "html-to-image"; |
|||
import { QRCodeSVG } from "qrcode.react"; |
|||
import { useEffect, useRef, useState } from "react"; |
|||
import { useNavigate } from "react-router-dom"; |
|||
|
|||
import { userApi } from "../api"; |
|||
import { UserBo } from "../api/generated"; |
|||
|
|||
const MyQRCodePage = () => { |
|||
const pageRef = useRef<HTMLDivElement>(null); |
|||
const [user, setUser] = useState<UserBo>(); |
|||
const navigate = useNavigate(); |
|||
// const [imageUrl, setImageUrl] = useState("");
|
|||
|
|||
const convertToImage = async () => { |
|||
if (pageRef.current) { |
|||
const dataUrl = await htmlToImage.toJpeg(pageRef.current, { |
|||
quality: 0.95, |
|||
backgroundColor: "white", |
|||
}); |
|||
// setImageUrl(dataUrl);
|
|||
|
|||
//下载
|
|||
const link = document.createElement("a"); |
|||
link.download = "page.jpeg"; |
|||
link.href = dataUrl; |
|||
link.click(); |
|||
} |
|||
}; |
|||
|
|||
useEffect(() => { |
|||
const getUser = async () => { |
|||
const res = await userApi.currentUser1(); |
|||
if (res.data.code !== 0) { |
|||
if (res.data.code === -88888) { |
|||
navigate("/home"); |
|||
return; |
|||
} |
|||
} |
|||
setUser(res.data.data); |
|||
}; |
|||
getUser(); |
|||
}, [navigate]); |
|||
|
|||
return ( |
|||
<div> |
|||
<div ref={pageRef} style={{ padding: 20 }}> |
|||
<List |
|||
style={{ |
|||
border: "none", |
|||
marginBottom: 20, |
|||
}} |
|||
> |
|||
<List.Item |
|||
style={{ |
|||
display: "flex", |
|||
flexDirection: "column", |
|||
alignItems: "center", |
|||
border: "none", |
|||
}} |
|||
prefix={<Avatar src={user?.avatar || ""} />} |
|||
description="邀请你一起玩" |
|||
> |
|||
{user?.nickname} |
|||
</List.Item> |
|||
</List> |
|||
<div |
|||
style={{ width: "100%", display: "flex", justifyContent: "center" }} |
|||
> |
|||
<QRCodeSVG value={user?.inviteUrl || ""} /> |
|||
</div> |
|||
</div> |
|||
|
|||
<p style={{ textAlign: "center" }} onClick={convertToImage}> |
|||
点击下载 |
|||
</p> |
|||
</div> |
|||
); |
|||
}; |
|||
|
|||
export default MyQRCodePage; |
@ -0,0 +1,95 @@ |
|||
import React, { useEffect } from "react"; |
|||
import { UserBo } from "../api/generated/model/user-bo"; |
|||
import { userApi } from "../api"; |
|||
import { useNavigate } from "react-router-dom"; |
|||
import { Avatar, List } from "antd-mobile"; |
|||
import { |
|||
PayCircleOutline, |
|||
SetOutline, |
|||
UnorderedListOutline, |
|||
} from "antd-mobile-icons"; |
|||
import { cent2Yuan, formatIncome } from "../utils/numberUtils"; |
|||
import { |
|||
AlipayOutlined, |
|||
GiftOutlined, |
|||
LineChartOutlined, |
|||
TeamOutlined, |
|||
} from "@ant-design/icons"; |
|||
|
|||
const UserPage = () => { |
|||
const [user, setUser] = React.useState<UserBo>(); |
|||
const navigate = useNavigate(); |
|||
|
|||
useEffect(() => { |
|||
const getUser = async () => { |
|||
const res = await userApi.currentUser1(); |
|||
if (res.data.code !== 0) { |
|||
if (res.data.code === -88888) { |
|||
navigate("/home"); |
|||
return; |
|||
} |
|||
} |
|||
setUser(res.data.data); |
|||
}; |
|||
getUser(); |
|||
}, [navigate]); |
|||
|
|||
return ( |
|||
<div |
|||
style={{ |
|||
height: "100%", |
|||
maxWidth: 500, |
|||
margin: "auto", |
|||
// paddingTop: 20,
|
|||
}} |
|||
> |
|||
<List> |
|||
<List.Item |
|||
prefix={<Avatar src={user?.avatar || ""} />} |
|||
description={"uid:" + user?.id} |
|||
> |
|||
{user?.nickname} |
|||
</List.Item> |
|||
</List> |
|||
<List mode="card" header="提现数据"> |
|||
<List.Item |
|||
prefix={<LineChartOutlined />} |
|||
extra={formatIncome(user?.income) + "元"} |
|||
> |
|||
总资产 |
|||
</List.Item> |
|||
<List.Item |
|||
prefix={<PayCircleOutline />} |
|||
extra={cent2Yuan(user?.money) + "元"} |
|||
> |
|||
已提现 |
|||
</List.Item> |
|||
<List.Item prefix={<UnorderedListOutline />} onClick={() => {}}> |
|||
提现记录 |
|||
</List.Item> |
|||
<List.Item prefix={<AlipayOutlined />} extra="修改" onClick={() => {}}> |
|||
支付宝账号 |
|||
</List.Item> |
|||
</List> |
|||
|
|||
<List mode="card" header="个人信息"> |
|||
<List.Item |
|||
prefix={<GiftOutlined />} |
|||
onClick={() => { |
|||
navigate("/myCode"); |
|||
}} |
|||
> |
|||
我的邀请码 |
|||
</List.Item> |
|||
<List.Item prefix={<TeamOutlined />} onClick={() => {}}> |
|||
我的好友 |
|||
</List.Item> |
|||
<List.Item prefix={<SetOutline />} onClick={() => {}}> |
|||
设置 |
|||
</List.Item> |
|||
</List> |
|||
</div> |
|||
); |
|||
}; |
|||
|
|||
export default UserPage; |
@ -0,0 +1,106 @@ |
|||
import { Button, Form, Input, Toast } from "antd-mobile"; |
|||
import React, { FC } from "react"; |
|||
import { useParams } from "react-router-dom"; |
|||
|
|||
import { api } from "../../api"; |
|||
import { LoginReq } from "../../api/generated"; |
|||
|
|||
interface LoginByCodeProps { |
|||
appCode: string; |
|||
onSuccess: () => void; |
|||
} |
|||
const LoginByCode: FC<LoginByCodeProps> = (params: LoginByCodeProps) => { |
|||
const [count, setCount] = React.useState(60); |
|||
const [form] = Form.useForm(); |
|||
const { appCode } = useParams(); |
|||
|
|||
const onFinish = async (values: LoginReq) => { |
|||
const res = await api.loginByCode(values); |
|||
if (res.data.code !== 0) { |
|||
Toast.show({ content: res.data.message }); |
|||
return; |
|||
} |
|||
params.onSuccess(); |
|||
}; |
|||
|
|||
const send = async () => { |
|||
const values = form.getFieldsValue(); |
|||
const mobile: string = values.mobile; |
|||
if (!mobile) { |
|||
Toast.show({ |
|||
content: "请输入手机号", |
|||
}); |
|||
return; |
|||
} |
|||
const res = await api.sendCode(mobile, "login"); |
|||
if (res.data.code !== 0) { |
|||
Toast.show({ |
|||
content: res.data.message, |
|||
}); |
|||
return; |
|||
} |
|||
Toast.show({ |
|||
content: "验证码发送成功:" + mobile, |
|||
}); |
|||
startCountdown(); |
|||
}; |
|||
|
|||
const startCountdown = () => { |
|||
setCount(60); |
|||
const timer = setInterval(() => { |
|||
setCount((count) => count - 1); |
|||
}, 1000); |
|||
setTimeout(() => { |
|||
clearInterval(timer); |
|||
setCount(60); |
|||
}, 60000); |
|||
}; |
|||
|
|||
return ( |
|||
<Form |
|||
onFinish={onFinish} |
|||
layout="horizontal" |
|||
mode="card" |
|||
form={form} |
|||
initialValues={{ appCode: appCode }} |
|||
> |
|||
<Form.Item |
|||
name="mobile" |
|||
label="手机号" |
|||
rules={[ |
|||
{ required: true, message: "请输入手机号" }, |
|||
{ pattern: /^1\d{10}$/, message: "手机号格式错误" }, |
|||
]} |
|||
> |
|||
<Input placeholder="请输入手机号" maxLength={11} /> |
|||
</Form.Item> |
|||
<Form.Item |
|||
name="code" |
|||
label="短信验证码" |
|||
extra={ |
|||
<Button |
|||
size="small" |
|||
color="primary" |
|||
onClick={send} |
|||
disabled={count !== 60} |
|||
> |
|||
{count === 60 ? "发送验证码" : `${count}s`} |
|||
</Button> |
|||
} |
|||
rules={[{ required: true, message: "请输入短信验证码!" }]} |
|||
> |
|||
<Input /> |
|||
</Form.Item> |
|||
<Form.Item hidden name="appCode" label="邀请码" disabled> |
|||
<Input /> |
|||
</Form.Item> |
|||
<Form.Item> |
|||
<Button color="primary" block type="submit"> |
|||
登录 |
|||
</Button> |
|||
</Form.Item> |
|||
</Form> |
|||
); |
|||
}; |
|||
|
|||
export default LoginByCode; |
@ -0,0 +1,64 @@ |
|||
import { Button, Form, Input, Toast } from "antd-mobile"; |
|||
import { FC } from "react"; |
|||
|
|||
import { api } from "../../api"; |
|||
import { LoginReq } from "../../api/generated/model/login-req"; |
|||
|
|||
interface LoginByPwdProps { |
|||
appCode: string; |
|||
onSuccess: () => void; |
|||
} |
|||
|
|||
const LoginByPwd: FC<LoginByPwdProps> = (params: LoginByPwdProps) => { |
|||
const [form] = Form.useForm(); |
|||
const { appCode } = params; |
|||
|
|||
const onFinish = async (values: LoginReq) => { |
|||
const res = await api.loginByPwd(values); |
|||
if (res.data.code !== 0) { |
|||
Toast.show({ content: res.data.message }); |
|||
return; |
|||
} |
|||
params.onSuccess(); |
|||
}; |
|||
|
|||
return ( |
|||
<Form |
|||
onFinish={onFinish} |
|||
layout="horizontal" |
|||
mode="card" |
|||
form={form} |
|||
initialValues={{ appCode: appCode }} |
|||
> |
|||
<Form.Item |
|||
name="mobile" |
|||
label="手机号" |
|||
rules={[ |
|||
{ required: true, message: "请输入手机号" }, |
|||
{ pattern: /^1\d{10}$/, message: "手机号格式错误" }, |
|||
]} |
|||
> |
|||
<Input placeholder="请输入手机号" maxLength={11} /> |
|||
</Form.Item> |
|||
|
|||
<Form.Item |
|||
name="pwd" |
|||
label="密码" |
|||
rules={[{ required: true, message: "请输入密码" }]} |
|||
> |
|||
<Input type="password" placeholder="请输入密码" /> |
|||
</Form.Item> |
|||
|
|||
<Form.Item hidden name="appCode" label="appCode" disabled> |
|||
<Input /> |
|||
</Form.Item> |
|||
<Form.Item> |
|||
<Button color="primary" block type="submit"> |
|||
登录 |
|||
</Button> |
|||
</Form.Item> |
|||
</Form> |
|||
); |
|||
}; |
|||
|
|||
export default LoginByPwd; |
@ -0,0 +1,98 @@ |
|||
import { Image, Swiper, SwiperRef, Tabs, Toast } from "antd-mobile"; |
|||
import React, { useEffect, useRef, useState } from "react"; |
|||
import { useNavigate, useParams } from "react-router-dom"; |
|||
|
|||
import { api } from "../../api"; |
|||
import { MatrixAppBo } from "../../api/generated"; |
|||
import LoginByCode from "./LoginByCode"; |
|||
import LoginByPwd from "./LoginByPwd"; |
|||
|
|||
const tabItems = [ |
|||
{ key: "pwd", title: "密码登录" }, |
|||
{ key: "code", title: "验证码登录" }, |
|||
// { key: 'weixin', title: '微信授权' },
|
|||
]; |
|||
|
|||
const LoginPage = () => { |
|||
const swiperRef = useRef<SwiperRef>(null); |
|||
const [activeIndex, setActiveIndex] = useState(0); |
|||
const [app, setApp] = React.useState<MatrixAppBo>(); |
|||
const isLoggedIn = localStorage.getItem("isLoggedIn"); // 假设登录状态存储在
|
|||
|
|||
const navigate = useNavigate(); |
|||
const { appCode } = useParams(); |
|||
|
|||
useEffect(() => { |
|||
if (isLoggedIn) { |
|||
navigate("/home"); |
|||
} |
|||
const getApp = async () => { |
|||
if (!appCode) { |
|||
return; |
|||
} |
|||
const res = await api.getApp(undefined, appCode); |
|||
if (res.data.code !== 0) { |
|||
Toast.show({ |
|||
content: res.data.message, |
|||
}); |
|||
return; |
|||
} |
|||
setApp(res.data.data); |
|||
}; |
|||
getApp(); |
|||
}, [appCode, isLoggedIn, navigate]); |
|||
|
|||
const onSuccess = () => { |
|||
localStorage.setItem("isLoggedIn", "true"); |
|||
navigate("/home"); |
|||
}; |
|||
|
|||
return ( |
|||
<> |
|||
{app && appCode && ( |
|||
<div style={{ maxWidth: 500, margin: "auto" }}> |
|||
<Image |
|||
style={{ margin: "auto", paddingTop: 20 }} |
|||
src={app?.img} |
|||
width={100} |
|||
height={100} |
|||
/> |
|||
<p style={{ textAlign: "center", fontSize: 20, fontWeight: "bold" }}> |
|||
{app?.name} |
|||
</p> |
|||
<Tabs |
|||
activeKey={tabItems[activeIndex].key} |
|||
onChange={(key) => { |
|||
const index = tabItems.findIndex((item) => item.key === key); |
|||
setActiveIndex(index); |
|||
swiperRef.current?.swipeTo(index); |
|||
}} |
|||
> |
|||
{tabItems.map((item) => ( |
|||
<Tabs.Tab title={item.title} key={item.key} /> |
|||
))} |
|||
</Tabs> |
|||
<Swiper |
|||
direction="horizontal" |
|||
loop |
|||
indicator={() => null} |
|||
ref={swiperRef} |
|||
defaultIndex={activeIndex} |
|||
onIndexChange={(index) => { |
|||
setActiveIndex(index); |
|||
}} |
|||
> |
|||
<Swiper.Item> |
|||
<LoginByPwd appCode={appCode} onSuccess={onSuccess} /> |
|||
</Swiper.Item> |
|||
<Swiper.Item> |
|||
<LoginByCode appCode={appCode} onSuccess={onSuccess} /> |
|||
</Swiper.Item> |
|||
</Swiper> |
|||
</div> |
|||
)} |
|||
</> |
|||
); |
|||
}; |
|||
|
|||
export default LoginPage; |
@ -0,0 +1,13 @@ |
|||
export const formatIncome = (v: number | undefined) => { |
|||
if (!v) { |
|||
return 0; |
|||
} |
|||
return parseFloat((v / 1000_00).toFixed(2)); |
|||
}; |
|||
|
|||
export const cent2Yuan = (v: number | undefined) => { |
|||
if (!v) { |
|||
return 0; |
|||
} |
|||
return parseFloat((v / 100).toFixed(2)); |
|||
}; |
Loading…
Reference in new issue