提交 166357db 作者: ZhangLingKun

测试

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