From d2e4eed8badbd55f948c39d913c019a716ea350b Mon Sep 17 00:00:00 2001 From: pan <1029559041@qq.com> Date: Mon, 1 Jun 2020 05:44:27 +0800 Subject: [PATCH] =?UTF-8?q?1.=E7=B3=BB=E7=BB=9F=E6=8E=A8=E8=8D=90=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5=E6=9C=8D=E5=8A=A1=E7=AB=AF=202.=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=90=8D=E4=B8=8B=E6=8B=89=E8=8F=9C=E5=8D=95=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=88=B0=E7=AE=A1=E7=90=86=E5=90=8E=E5=8F=B0?= =?UTF-8?q?=203.=E6=B4=BB=E5=8A=A8=E5=88=97=E8=A1=A8+=E5=BF=97=E6=84=BF?= =?UTF-8?q?=E8=80=85=E5=88=97=E8=A1=A8=E6=90=9C=E7=B4=A2=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E6=9C=8D=E5=8A=A1=E7=AB=AF=204.=E6=88=91?= =?UTF-8?q?=E7=9A=84=E7=95=99=E8=A8=80=E9=82=A3=E9=87=8C=E6=A4=AD=E5=9C=86?= =?UTF-8?q?=E6=8D=A2=E6=88=90=E7=9F=A9=E5=BD=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/Main.tsx | 2 ++ src/account/Register.tsx | 4 ++-- src/api.ts | 2 ++ src/my/MyLeaveWord.tsx | 2 +- src/sub/Volunteer.tsx | 4 ++-- src/ui/Address.tsx | 2 +- 7 files changed, 11 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 7dd1edf..8c845b2 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/src/Main.tsx b/src/Main.tsx index 2d4145e..f6cf91c 100644 --- a/src/Main.tsx +++ b/src/Main.tsx @@ -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< 时间币:{this.state.timeScore} {[DialogType.friend,DialogType.leaveWord,DialogType.message].map((type:DialogType,index:number)=>this.openDialog(type)}>{type})} this.props.logout()}>注销登录 + window.location.href=backEnd}>切换后台 diff --git a/src/account/Register.tsx b/src/account/Register.tsx index 2b11cc7..33503c6 100644 --- a/src/account/Register.tsx +++ b/src/account/Register.tsx @@ -162,9 +162,9 @@ export class Register extends React.Component{ this.setState({imgFile:imgObj}) }} tip={"请上传头像"} /> - this.setState({address:value})}/> + this.setState({address:value})} valid={{check:this.state.address.length>0}}/>
-
this.setState({serviceAddress:value})}/> +
this.setState({serviceAddress:value})}/>
this.setState({userType:value})} options={[,,]}/> diff --git a/src/api.ts b/src/api.ts index 6511c9b..7921cc3 100644 --- a/src/api.ts +++ b/src/api.ts @@ -6,6 +6,8 @@ export const prefix = { activity: "/api/activity", image: "/image/" } +//管理后台地址 +export const backEnd="http://localhost:3000" //接口地址 export const Api = { account: { diff --git a/src/my/MyLeaveWord.tsx b/src/my/MyLeaveWord.tsx index 3aa75ed..5fe9d33 100644 --- a/src/my/MyLeaveWord.tsx +++ b/src/my/MyLeaveWord.tsx @@ -169,7 +169,7 @@ export class MyLeaveWord extends React.Component< } return ( - +

{this.getType(data.type)}

diff --git a/src/sub/Volunteer.tsx b/src/sub/Volunteer.tsx index 01cf8b3..c9b6055 100644 --- a/src/sub/Volunteer.tsx +++ b/src/sub/Volunteer.tsx @@ -96,13 +96,13 @@ export class Volunteer extends React.Component<{ undefined?:undefined }, })}/> - + {/*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?

当前没有志愿者

:this.state.volunteerList.map((volunteers:Array, index:number)=> -
{volunteers.map((volunteer:User, subIndex:number)=> +
{volunteers.map((volunteer:User, subIndex:number)=>
志愿者个人简介 diff --git a/src/ui/Address.tsx b/src/ui/Address.tsx index af3dfc2..d7c8bd9 100644 --- a/src/ui/Address.tsx +++ b/src/ui/Address.tsx @@ -5,7 +5,7 @@ import React from "react"; /** * 加载服务地点信息 */ -export class Address extends React.Component }>{ +export class Address extends React.Component }>{ constructor(props: Readonly) {