提交 166357db 作者: ZhangLingKun

测试

上级 97225fb3
......@@ -4,6 +4,7 @@
/node_modules
/.pnp
.pnp.js
/.idea
# testing
/coverage
......@@ -18,6 +19,7 @@
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
......@@ -2,21 +2,11 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="449bb119-753b-455c-bc48-817b4f4462f0" name="默认变更列表" comment="">
<change afterPath="$PROJECT_DIR$/.eslintrc" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/api/index.ts" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/api/modules/common/api.ts" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/api/modules/common/interface.ts" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/api/request.ts" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/pages/testPage/index.tsx" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/router/index.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/package-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/package-lock.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/App.css" beforeDir="false" afterPath="$PROJECT_DIR$/src/assets/css/App.css" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/App.test.tsx" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/App.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/App.tsx" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/index.css" beforeDir="false" afterPath="$PROJECT_DIR$/src/assets/css/index.css" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/index.tsx" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/logo.svg" beforeDir="false" afterPath="$PROJECT_DIR$/src/assets/image/logo.svg" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/api/modules/common/api.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/api/modules/common/api.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/pages/testPage/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/testPage/index.tsx" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/router/index.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/router/index.ts" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -36,7 +26,7 @@
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/src/router" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../../rn/react-native-ts" />
<property name="node.js.detected.package.eslint" value="true" />
<property name="node.js.detected.package.standard" value="true" />
<property name="node.js.detected.package.tslint" value="true" />
......@@ -102,6 +92,8 @@
<workItem from="1658916775971" duration="1437000" />
<workItem from="1658918510762" duration="708000" />
<workItem from="1658993729518" duration="3844000" />
<workItem from="1658997888565" duration="35000" />
<workItem from="1658997931871" duration="3323000" />
</task>
<servers />
</component>
......
......@@ -4,6 +4,6 @@ import {PlatformLogin} from './interface';
export class commonAPI {
//登录接口
static platformLogin(data: PlatformLogin) {
return Axios.post('/userservlet/auth/platformLogin1', data);
return Axios.post('/userservlet/auth/platformLogin', data);
}
}
import React from "react";
import {commonAPI} from '../../api'
const Home = () => {
export const Home = () => {
const [token, setToken] = React.useState('');
const GetLogin = async () => {
const res: any = await commonAPI.platformLogin({
......@@ -15,21 +15,18 @@ const Home = () => {
React.useEffect(()=>{
console.log('首页 !!!');
GetLogin();
})
},[])
// const list = [1,2,3,4,5]
const list = [1,2,3,4,5]
return (
<div>
<div style={{ padding: "1rem 0" }}>
<div>home !</div>
<div>{token}</div>
{list.map((i,j)=>{
return(
<h2 key={j}>{j} Home {i}</h2>
)
})}
</div>
// <div style={{ padding: "1rem 0" }}>
// {list.map((i,j)=>{
// return(
// <h2 key={j}>{j} Home {i}</h2>
// )
// })}
// </div>
);
}
export default Home
import Home from "../pages/testPage";
import {Home} from "../pages/testPage";
// import About from "../pages/test/About";
......@@ -7,8 +7,8 @@ export const router = [
path: 'home',
element: Home,
},
{
path: 'about',
element: Home,
}
// {
// path: 'about',
// element: Home,
// }
];
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论