From 233cb66ef2e4dabcb3042f54da6f211f2ec1f6c5 Mon Sep 17 00:00:00 2001 From: pan <1029559041@qq.com> Date: Mon, 1 Jun 2020 05:42:21 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E7=94=A8=E6=88=B7=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=A2=9E=E5=8A=A0=E6=80=A7=E5=88=AB=EF=BC=8C=E5=B9=B4?= =?UTF-8?q?=E9=BE=84=E7=AD=89=E8=AF=A6=E7=BB=86=E4=BF=A1=E6=81=AF=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E9=A1=B9=202.=E6=B4=BB=E5=8A=A8=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=8F=AF=E4=BF=AE=E6=94=B9=E6=B4=BB=E5=8A=A8=E6=A0=87=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 +- src/Active.tsx | 107 ++++++++++++++++++++++++++++++++--- src/Main.tsx | 3 +- src/User.tsx | 135 ++++++++++++++++++++++++++++++++++++++++---- src/api.ts | 6 +- src/entity.ts | 15 ++++- src/ui/Address.tsx | 56 ++++++++++++++++++ src/ui/MyDialog.tsx | 8 ++- yarn.lock | 5 ++ 9 files changed, 313 insertions(+), 25 deletions(-) create mode 100644 src/ui/Address.tsx diff --git a/package.json b/package.json index 1990f14..40bef2b 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "@types/react-dom": "^16.9.0", "bootstrap": "^4.5.0", "http-proxy-middleware": "^1.0.4", + "moment": "^2.26.0", "react": "^16.13.1", "react-bootstrap": "^1.0.1", "react-cookie": "^4.0.3", @@ -22,7 +23,7 @@ "typescript": "~3.7.2" }, "scripts": { - "start": "react-scripts start", + "start": "set PORT=3000&&react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" diff --git a/src/Active.tsx b/src/Active.tsx index 28c0324..827ab77 100644 --- a/src/Active.tsx +++ b/src/Active.tsx @@ -1,10 +1,55 @@ import React from "react"; -import {Button, Tab, Table, Tabs} from "react-bootstrap"; -import {ActiveForm, ManagerActivity} from "./entity"; -import {Method, request} from "./interface"; +import {Button, Form, ListGroup, Tab, Table, Tabs} from "react-bootstrap"; +import {ManagerActivity} from "./entity"; +import {JSONResponse, Method, request} from "./interface"; import {API} from "./api"; -import {FindActivityRes, FindActivityTransform, PageDataMessage} from "./result"; +import {EmptyBodyTransform, FindActivityRes, FindActivityTransform, PageDataMessage, SimpleMessage} from "./result"; import {MyDialog} from "./ui/MyDialog"; +import moment from "moment"; +import {Input} from "./ui/InputGroup"; + +const contentMaxLength=50 + +class EditActive extends React.Component< + { + onClick:Function; + activity:ManagerActivity; + }, + { + activity:ManagerActivity; + }>{ + + + constructor(props: Readonly<{ onClick: Function; activity: ManagerActivity }>) { + super(props); + + this.state={ + activity:this.props.activity + } + } + + render() { + return ( +
+ ); + } + + private isNotEmpty(name: any) { + return String(name).length>0; + } +} /** * 活动管理 @@ -12,6 +57,7 @@ import {MyDialog} from "./ui/MyDialog"; export class Active extends React.Component