1.系统推荐对接服务端

2.用户名下拉菜单增加切换到管理后台
3.活动列表+志愿者列表搜索接口对接服务端
4.我的留言那里椭圆换成矩形
master
pan 5 years ago
parent 61581a56f9
commit d2e4eed8ba
  1. 2
      package.json
  2. 2
      src/Main.tsx
  3. 2
      src/account/Register.tsx
  4. 2
      src/api.ts
  5. 2
      src/my/MyLeaveWord.tsx
  6. 4
      src/sub/Volunteer.tsx
  7. 2
      src/ui/Address.tsx

@ -24,7 +24,7 @@
"typescript": "~3.7.2"
},
"scripts": {
"start": "react-scripts start",
"start": "set PORT=3001&&react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"

@ -10,6 +10,7 @@ import {MyMessage} from "./my/MyMessage";
import {User, UserType} from "./entity";
import {Cookies} from "react-cookie";
import {time_score, user_cookie, user_type_cookie, welcome_cookie} from "./account/PropCookie";
import {backEnd} from "./api";
/**
*
@ -190,6 +191,7 @@ export class Main extends React.Component<
<Dropdown.Item>:<span className="text-center text-info">{this.state.timeScore}</span></Dropdown.Item>
{[DialogType.friend,DialogType.leaveWord,DialogType.message].map((type:DialogType,index:number)=><Dropdown.Item disabled={this.state.my.open} key={"dropdown"+index} onClick={()=>this.openDialog(type)}>{type}</Dropdown.Item>)}
<Dropdown.Item onClick={()=>this.props.logout()}></Dropdown.Item>
<Dropdown.Item onClick={()=>window.location.href=backEnd}></Dropdown.Item>
</Dropdown.Menu>
</Dropdown>

@ -162,7 +162,7 @@ export class Register extends React.Component<RegisterProps, RegisterState>{
this.setState({imgFile:imgObj})
}} tip={"请上传头像"} />
<Input name="address" desc="住址" onChange={(value:string)=>this.setState({address:value})}/>
<Input name="address" desc="住址" onChange={(value:string)=>this.setState({address:value})} valid={{check:this.state.address.length>0}}/>
<div className="mt-3">
<Address value={this.state.serviceAddress} onChange={(value:string)=>this.setState({serviceAddress:value})}/>
</div>

@ -6,6 +6,8 @@ export const prefix = {
activity: "/api/activity",
image: "/image/"
}
//管理后台地址
export const backEnd="http://localhost:3000"
//接口地址
export const Api = {
account: {

@ -169,7 +169,7 @@ export class MyLeaveWord extends React.Component<
}
return (
<Container key={"Container"+index} className="mt-3 pt-2 pb-2 border-info border rounded-pill">
<Container key={"Container"+index} className="mt-3 pt-2 pb-2 border-info border rounded">
<Row>
<Col>
<h3 className="text-center">{this.getType(data.type)}</h3>

@ -96,13 +96,13 @@ export class Volunteer extends React.Component<{ undefined?:undefined },
})}/>
</div>
<Button className="col-1 mt-3 mb-3" variant="info" onClick={()=>console.info(this.state.form)}></Button>
<Button className="col-1 mt-3 mb-3" variant="info" onClick={()=>this.loadVolunteerList(1)}></Button>
{/*<Page onClick={(page:number)=>this.loadVolunteerList(page)} currentPage={this.state.page.currentPage} totalPage={this.state.page.totalPage} pageSize={this.state.page.pageSize}/>*/}
{this.state.volunteerList?this.state.volunteerList.length===0?<h3 className="text-info text-center"></h3>:this.state.volunteerList.map((volunteers:Array<User>, index:number)=>
<div className="p-3 d-flex ml-auto mr-auto volunteer overflow-auto" key={"row"+index}>{volunteers.map((volunteer:User, subIndex:number)=>
<div className="p-3 d-flex ml-auto mr-auto volunteer overflow-auto justify-content-center" key={"row"+index}>{volunteers.map((volunteer:User, subIndex:number)=>
<div key={"col"+subIndex} className="mr-3">
<div className="border-info border">

@ -5,7 +5,7 @@ import React from "react";
/**
*
*/
export class Address extends React.Component<OnChangeAddress, { addressList:Array<any> }>{
export class Address extends React.Component<OnChangeAddress, { addressList:Array<{ address:string }> }>{
constructor(props: Readonly<OnChangeAddress>) {

Loading…
Cancel
Save