活动报名接口对接

master
pan 5 years ago
parent e91f3d26de
commit 0a23d09ce4
  1. 26
      src/App.tsx
  2. 37
      src/Main.tsx
  3. 1
      src/account/PropCookie.ts
  4. 6
      src/account/Register.tsx
  5. 11
      src/entity.ts
  6. 9
      src/interface.ts
  7. 73
      src/my/MyHelp.tsx
  8. 15
      src/my/MyLeaveWord.tsx
  9. 27
      src/my/SeekHelp.tsx
  10. 133
      src/result.ts
  11. 49
      src/sub/IndexMenu.tsx
  12. 10
      src/sub/SendHelp.tsx
  13. 8
      src/sub/Volunteer.tsx
  14. 27
      src/ui/TestData.ts

@ -5,11 +5,18 @@ import {Login} from './account/Login';
import {Cookies, withCookies} from 'react-cookie';
import {Main} from "./Main";
import {Register} from "./account/Register";
import {user_cookie, user_type_cookie} from "./account/PropCookie";
import {user_cookie, user_type_cookie, welcome_cookie} from "./account/PropCookie";
import {UserType} from "./entity";
class App extends React.Component<{ allCookies:any;cookies:Cookies },
{ page?:JSX.Element;}> {
class App extends React.Component<
{
allCookies:any;
cookies:Cookies
},
{
page?:JSX.Element;
welcome?:boolean;
}> {
constructor(props: Readonly<any>) {
@ -20,10 +27,13 @@ class App extends React.Component<{ allCookies:any;cookies:Cookies },
}
componentDidMount() {
const { cookies } = this.props
if((cookies.get(user_cookie)||"").length>0){
if((this.props.cookies.get(user_cookie)||"").length>0){
this.setState({
page:<Main userType={cookies.get(user_type_cookie)} user={cookies.get(user_cookie)} logout={()=>this.logout()} />
welcome:this.props.cookies.get(welcome_cookie)!==undefined
})
this.setState({
page:<Main cookies={this.props.cookies} logout={()=>this.logout()}/>
})
}else{
this.toLogin()
@ -33,6 +43,7 @@ class App extends React.Component<{ allCookies:any;cookies:Cookies },
//注销登录
logout(){
this.props.cookies.remove(user_cookie)
this.props.cookies.remove(user_type_cookie)
this.toLogin()
}
@ -53,8 +64,9 @@ class App extends React.Component<{ allCookies:any;cookies:Cookies },
page:<Login toRegister={()=>this.toRegister()} onLoginSuccess={(userId:string,userType:UserType)=> {
this.props.cookies.set(user_cookie,userId)
this.props.cookies.set(user_type_cookie,userType)
this.props.cookies.set(welcome_cookie,userId)
this.setState({
page:<Main logout={()=>this.logout()} user={userId} userType={userType}/>
page:<Main logout={()=>this.logout()} cookies={this.props.cookies}/>
})
}}/>
})

@ -8,6 +8,8 @@ import {MyDialog} from "./ui/MyDialog";
import {MyLeaveWord} from "./my/MyLeaveWord";
import {MyMessage} from "./my/MyMessage";
import {User, UserEdit, UserType} from "./entity";
import {Cookies} from "react-cookie";
import {user_cookie, user_type_cookie, welcome_cookie} from "./account/PropCookie";
/**
*
@ -31,10 +33,12 @@ enum DialogType {
*
*/
export class Main extends React.Component<
{
logout:Function;
//
cookies:Cookies;
},
{ user:string;
userType?:string;
logout:Function;},
{
//菜单
menu:Menu;
@ -49,7 +53,8 @@ export class Main extends React.Component<
},
//用户身份
userType?:string;
result:boolean
//显示欢迎信息
result:boolean;
}
>{
@ -57,15 +62,15 @@ export class Main extends React.Component<
super(props);
//默认菜单
this.state={
result: true,
//一级菜单
menu:Menu.index,
//二级菜单
subMenu:<IndexMenu user={this.props.user}/>,
subMenu:<IndexMenu user={this.props.cookies.get(user_cookie)}/>,
//我的好友信息
friendList:[],
//我的菜单
my:{menuName: "",content:null,open:false}
my:{menuName: "",content:null,open:false},
result:Boolean(this.props.cookies.get(welcome_cookie))
}
}
@ -96,7 +101,7 @@ export class Main extends React.Component<
switch (menu) {
case Menu.index:
this.setState({
subMenu:<IndexMenu user={this.props.user}/>
subMenu:<IndexMenu user={this.props.cookies.get(user_cookie)}/>
});break;
case Menu.volunteer:
this.setState({
@ -131,17 +136,18 @@ export class Main extends React.Component<
switch (dialogType) {
case DialogType.friend:
this.setState({
my:{menuName:dialogType,content:<MyFriend user={this.props.user}/>,open:true}
my:{menuName:dialogType,content:<MyFriend user={this.props.cookies.get(user_cookie)}/>,open:true}
})
break;
case DialogType.leaveWord:
this.setState({
my:{menuName:dialogType,content:<MyLeaveWord user={this.props.user}/>,open:true}
my:{menuName:dialogType,content:<MyLeaveWord user={this.props.cookies.get(user_cookie)}/>,open:true}
})
break;
case DialogType.message:
this.setState({
my:{menuName:dialogType,content:<MyMessage onUserUpdate={(user:UserEdit)=>this.setState({userType:user.userType})} user={this.props.user}/>,open:true}
my:{menuName:dialogType,content:<MyMessage onUserUpdate={(user:UserEdit)=>this.setState({userType:user.userType})}
user={this.props.cookies.get(user_cookie)}/>,open:true}
})
break;
}
@ -166,7 +172,7 @@ export class Main extends React.Component<
<Dropdown>
<Dropdown.Toggle variant="secondary" id="dropdown-basic">
{this.props.user}
{this.props.cookies.get(user_cookie)}
</Dropdown.Toggle>
<Dropdown.Menu>
@ -178,14 +184,17 @@ export class Main extends React.Component<
{(this.state.userType||this.props.userType)?<Navbar.Brand className="ml-3">{(this.state.userType||this.props.userType)===UserType.help.toString()?"等待接受帮助":"等待前往帮助"}</Navbar.Brand>:null}
{(this.state.userType||this.props.cookies.get(user_type_cookie))?<Navbar.Brand className="ml-3">{(this.state.userType||this.props.cookies.get(user_type_cookie))===UserType.help.toString()?"等待接受帮助":"等待前往帮助"}</Navbar.Brand>:null}
<MyDialog titleId="my-dialog" menuName={this.state.my.menuName} content={this.state.my.content} open={this.state.my.open} onClose={()=>this.closeDialog()}/>
</Nav>
</Navbar>
<MyDialog content={<h1 className="text-info text-center">{this.props.user}</h1>} open={this.state.result} titleId="login-tip" menuName="登录提示" onClose={()=>this.setState({result:false})}/>
<MyDialog content={<h1 className="text-info text-center">{this.props.cookies.get(user_cookie)}</h1>} open={this.state.result} titleId="login-tip" menuName="登录提示" onClose={()=>{
this.setState({result:false})
this.props.cookies.remove(welcome_cookie)
}}/>
{this.state.subMenu}
</div>

@ -4,3 +4,4 @@
*/
export const user_cookie="user_cookie"
export const user_type_cookie="user_type_cookie"
export const welcome_cookie="welcome_cookie"

@ -4,8 +4,8 @@ import {Button, Form} from 'react-bootstrap'
import {RegisterProps, RegisterState, UserType} from "../entity";
import {UploadImg} from "../ui/UploadImg";
import {Address} from "../ui/Address";
import {API, Method, request} from "../interface"
import {RegisterMessage, RegisterRes, RegisterTransform} from "../result";
import {API, JSONResponse, Method, request} from "../interface"
import {RegisterMessage, RegisterTransform} from "../result";
import {MyDialog} from "../ui/MyDialog";
/**
@ -57,7 +57,7 @@ export class Register extends React.Component<RegisterProps, RegisterState>{
email:this.state.email,
info:this.state.info
},new RegisterTransform(),function(res:RegisterRes){
},new RegisterTransform(),function(res:JSONResponse<RegisterMessage>){
let message
switch (res.customResult) {
case RegisterMessage.ok:message="注册成功";

@ -63,6 +63,8 @@ export interface ActivityId {
//活动详情
export interface ActivityDetail extends BaseHelp,ActivityId{
//用户id
userId:string;
//活动开始时间
activityStartTime:number;
//活动结束时间
@ -308,3 +310,12 @@ export interface LoginState{
//
result:JSX.Element|null
}
/**
*
*/
export enum VolunteerStatus {
apply = "apply",
join = "join",
complete = "complete"
}

@ -22,7 +22,9 @@ export const API={
//发布求助信息
help: prefix.activity + "/sendHelp",
//查找活动列表
find: prefix.activity + "/find"
find: prefix.activity + "/find",
//报名活动
apply:prefix.activity+ "/apply"
}
}
}
@ -42,7 +44,7 @@ export enum Result {
/**
*
*/
export abstract class JSONResponse<Q> {
export class JSONResponse<Q> {
result?:Result
customResult?:Q
}
@ -93,7 +95,8 @@ export function request<Q,E extends JSONResponse<Q>,T extends TransformData<Q,E>
}
fetch(server+api,{
method:method,
body:formData
body:formData,
credentials: 'include',
})
.then(
response=>{if(response.status===200){

@ -2,6 +2,7 @@ import React from "react";
import {Button, Col, Container, Image, Row} from "react-bootstrap";
import {MyHelpState} from "../entity";
import moment from "moment";
import {myActivityObj} from "../ui/TestData";
const classList="border-info border d-flex justify-content-center align-items-center"
@ -69,77 +70,7 @@ export class MyHelp extends React.Component<{ undefined?:undefined }, { data:Arr
loadMyHelp(){
this.setState({
data:[{
//活动Id
activityId:123,
//活动标题
title:"活动标题",
//活动内容
content:"活动内容",
//活动背景图
activityImg: "logo512.png",
//求助时间
seekHelpTime:new Date().getTime(),
//活动开始时间
activityStartTime:new Date().getTime(),
//活动结束时间
activityEndTime:new Date().getTime(),
//报名时间
applyTime:new Date().getTime(),
//参与时间
joinTime:new Date().getTime(),
//完成时间
completeTime:new Date().getTime(),
//活动评价分
score: Math.ceil(Math.random()*10),
},
{
//活动Id
activityId:123,
//活动标题
title:"活动标题",
//活动内容
content:"活动内容",
//活动背景图
activityImg: "logo512.png",
//求助时间
seekHelpTime:new Date().getTime(),
//活动开始时间
activityStartTime:new Date().getTime(),
//活动结束时间
activityEndTime:new Date().getTime(),
//报名时间
applyTime:new Date().getTime(),
//参与时间
joinTime:null,
//完成时间
completeTime:new Date().getTime(),
//活动评价分
score: Math.ceil(Math.random()*10),
},{
//活动Id
activityId:123,
//活动标题
title:"活动标题",
//活动内容
content:"活动内容",
//活动背景图
activityImg: "logo512.png",
//求助时间
seekHelpTime:new Date().getTime(),
//活动开始时间
activityStartTime:new Date().getTime(),
//活动结束时间
activityEndTime:new Date().getTime(),
//报名时间
applyTime:new Date().getTime(),
//参与时间
joinTime:new Date().getTime(),
//完成时间
completeTime:null,
//活动评价分
score: Math.ceil(Math.random()*10),
}]
data:[myActivityObj,myActivityObj,myActivityObj]
})
}

@ -8,11 +8,16 @@ import {Activity} from "../ui/Activity";
import {activityObj, userObj} from "../ui/TestData";
enum LeaveWordType {
recommend,
apply,
join,
complete,
friend
//推荐
recommend="recommend",
//报名
apply="apply",
//参与
join="join",
//完成
complete="complete",
//好友验证
friend="friend"
}
interface Type1{

@ -1,6 +1,6 @@
import React from "react";
import {Button, ButtonGroup, Col, Container, Image, ListGroup, Row} from "react-bootstrap";
import {SeekHelpState, User} from "../entity";
import {SeekHelpState, User, VolunteerStatus} from "../entity";
import moment from "moment";
import Dialog from "@material-ui/core/Dialog";
import {CloseDialog} from "../ui/CloseDialog";
@ -10,15 +10,6 @@ import {MyDialog} from "../ui/MyDialog";
import {MyInfo} from "./MyInfo";
import {userObj} from "../ui/TestData";
/**
*
*/
enum VolunteerStatus {
apply="报名",
join="参加",
complete="完成"
}
const titleId="seek-help-dialog"
/**
@ -28,7 +19,7 @@ export class SeekHelp extends React.Component<{ user:string },
{
data:Array<SeekHelpState>;
open:boolean;
status?:VolunteerStatus;
status?:string;
volunteerList?:Array<User>;
openUserInfo:boolean;
userId?:string;
@ -93,6 +84,14 @@ export class SeekHelp extends React.Component<{ user:string },
}
getStatus(status:VolunteerStatus){
switch (status) {
case VolunteerStatus.apply:return "报名"
case VolunteerStatus.join:return "参加"
case VolunteerStatus.complete:return "完成"
}
}
render() {
return (
<div className="overflow-auto seek-help-height">
@ -114,9 +113,9 @@ export class SeekHelp extends React.Component<{ user:string },
</Col>
<Col>
<ButtonGroup>
<Button variant={"primary"} disabled={help.applyVolunteerList.length===0} onClick={()=>this.setState({open:true,status:VolunteerStatus.apply,volunteerList:help.applyVolunteerList})}>:{help.applyVolunteerList.length}</Button>
<Button variant={"success"} disabled={help.joinVolunteerList.length===0} onClick={()=>this.setState({open:true,status:VolunteerStatus.join,volunteerList:help.joinVolunteerList})}>:{help.joinVolunteerList.length}</Button>
<Button variant={"light"} disabled={help.completeVolunteerList.length===0} onClick={()=>this.setState({open:true,status:VolunteerStatus.complete,volunteerList:help.completeVolunteerList})}>:{help.completeVolunteerList.length}</Button>
<Button variant={"primary"} disabled={help.applyVolunteerList.length===0} onClick={()=>this.setState({open:true,status:this.getStatus(VolunteerStatus.apply),volunteerList:help.applyVolunteerList})}>:{help.applyVolunteerList.length}</Button>
<Button variant={"success"} disabled={help.joinVolunteerList.length===0} onClick={()=>this.setState({open:true,status:this.getStatus(VolunteerStatus.join),volunteerList:help.joinVolunteerList})}>:{help.joinVolunteerList.length}</Button>
<Button variant={"light"} disabled={help.completeVolunteerList.length===0} onClick={()=>this.setState({open:true,status:this.getStatus(VolunteerStatus.complete),volunteerList:help.completeVolunteerList})}>:{help.completeVolunteerList.length}</Button>
</ButtonGroup>
</Col>
</Row>

@ -4,6 +4,27 @@
import {JSONResponse, Result, TransformData} from "./interface";
import {ActivityDetail, PageProps, User, UserType} from "./entity";
/**
* body响应
*/
export enum SimpleMessage {
//操作失败
ok="ok",
//操作成功
fail="fail"
}
/**
* body响应
*/
export class EmptyBodyTransform extends TransformData<SimpleMessage, JSONResponse<SimpleMessage>>{
protected newObject(): JSONResponse<SimpleMessage> {
return new JSONResponse<SimpleMessage>();
}
}
export abstract class EmptyBodyDiffMsg<T> extends TransformData<T, JSONResponse<T>>{}
/**
*
*/
@ -18,21 +39,13 @@ export enum RegisterMessage {
form_parse_error = "form_parse_error"
}
/**
*
*/
export class RegisterRes implements JSONResponse<RegisterMessage> {
customResult?: RegisterMessage;
result?: Result;
}
/**
*
*/
export class RegisterTransform extends TransformData<RegisterMessage, RegisterRes> {
protected newObject(): RegisterRes {
return new RegisterRes();
export class RegisterTransform extends EmptyBodyDiffMsg<RegisterMessage>{
protected newObject(): JSONResponse<RegisterMessage> {
return new JSONResponse<RegisterMessage>();
}
}
@ -74,59 +87,24 @@ export class LoginTransform extends TransformData<LoginResMessage,LoginRes>{
}
}
/**
*
*/
export enum ActivityMessage {
//发布成功
ok="ok",
//发布失败请联系管理员
fail="fail"
}
/**
*
*/
export class SendHelpRes extends JSONResponse<ActivityMessage>{
}
/**
*
*/
export class SendHelpTransform extends TransformData<ActivityMessage, SendHelpRes>{
protected newObject(): SendHelpRes {
return new SendHelpRes();
}
}
/**
*
*
*/
export enum FindActivityMessage {
export enum PageDataMessage {
ok="ok",
fail="fail",
// 空数据
//空数据
empty="empty"
}
/**
*
*/
export class FindActivityRes extends JSONResponse<FindActivityMessage>{
dataList?:Array<Array<ActivityDetail>>
page?:PageProps
export abstract class PageDataRes extends JSONResponse<PageDataMessage>{
dataList?:any;
page?:PageProps;
}
/**
*
*/
export class FindActivityTransform extends TransformData<FindActivityMessage, FindActivityRes>{
protected newObject(): FindActivityRes {
return new FindActivityRes();
}
export abstract class PageDataTransform<T extends PageDataRes> extends TransformData<PageDataMessage, T>{
protected transformBody(data: any) {
if(data.body!==null){
@ -141,19 +119,29 @@ export class FindActivityTransform extends TransformData<FindActivityMessage, Fi
}
}
/**
*
*
*/
export enum FindUserMessage {
ok="ok",
fail="fail",
empty="empty"
export class FindActivityRes extends PageDataRes{
dataList?:Array<Array<ActivityDetail>>
page?:PageProps
}
/**
*
*/
export class FindActivityTransform extends PageDataTransform<FindActivityRes>{
protected newObject(): FindActivityRes {
return new FindActivityRes();
}
}
/**
*
*/
export class FindUserRes extends JSONResponse<FindUserMessage>{
export class FindUserRes extends PageDataRes{
dataList?:Array<Array<User>>
page?:PageProps
}
@ -161,42 +149,27 @@ export class FindUserRes extends JSONResponse<FindUserMessage>{
/**
*
*/
export class FindUserTransform extends TransformData<FindUserMessage, FindUserRes>{
export class FindUserTransform extends PageDataTransform<FindUserRes>{
protected newObject(): FindUserRes {
return new FindUserRes();
}
protected transformBody(data: any) {
if(data.body!==null){
this.target.dataList=data.body.body
this.target.page={
currentPage:data.body.currentPage,
totalPage:data.body.totalPage,
pageSize:data.body.pageSize
}
}
}
}
export enum ActivityDetailMessage {
ok="ok",
fail="fail"
}
export class ActivityDetailRes extends JSONResponse<ActivityDetailMessage>{
export class ActivityDetailRes extends JSONResponse<SimpleMessage>{
activity?:ActivityDetail
}
export class ActivityDetailTransform extends TransformData<ActivityDetailMessage, ActivityDetailRes>{
export class ActivityDetailTransform extends TransformData<SimpleMessage, ActivityDetailRes>{
protected newObject(): ActivityDetailRes {
return new ActivityDetailRes();
}
protected transformBody(data: any) {
this.target.activity=data.body
}
}

@ -2,18 +2,19 @@ import React from "react";
import {Button, Card, Col, Container, Image, ListGroup, Row} from "react-bootstrap";
import {Page} from "../ui/Page";
import {ActivityDetail, PageProps} from "../entity";
import {ActivityDetail, PageProps, VolunteerStatus} from "../entity";
import {MyDialog} from "../ui/MyDialog";
import {Activity} from "../ui/Activity";
import {Input} from "../ui/InputGroup";
import {API, Method, prefix, request} from "../interface";
import {API, JSONResponse, Method, prefix, request} from "../interface";
import {
ActivityDetailMessage,
ActivityDetailRes,
ActivityDetailTransform,
FindActivityMessage,
EmptyBodyTransform,
FindActivityRes,
FindActivityTransform
FindActivityTransform,
PageDataMessage,
SimpleMessage
} from "../result";
/**
@ -57,6 +58,32 @@ export class IndexMenu extends React.Component<{ user:string },
console.debug("报名活动"+activityId)
}
/**
*
* @param activityId id
*/
apply(activityId:number){
console.debug("报名id"+activityId)
let that=this
request(API.main.activity.apply,Method.POST,{
activityId:activityId+"",
activityStatus:VolunteerStatus.join.toString()
},new EmptyBodyTransform(),function (res:JSONResponse<SimpleMessage>) {
switch (res.customResult) {
case SimpleMessage.ok:
that.setState({
result:<h3 className="text-info text-center"></h3>
});break
case SimpleMessage.fail:
that.setState({
result:<h3 className="text-danger text-center"></h3>
});break
}
})
}
/**
*
* @param activityId
@ -67,11 +94,11 @@ export class IndexMenu extends React.Component<{ user:string },
let that=this
request(API.main.activity.find+"/"+activityId,Method.GET,{},new ActivityDetailTransform(),function(res:ActivityDetailRes){
switch (res.customResult) {
case ActivityDetailMessage.fail:
case SimpleMessage.fail:
that.setState({
result:<h3 className="text-danger text-center"></h3>
});break;
case ActivityDetailMessage.ok:
case SimpleMessage.ok:
that.setState({
openActivity:true,
activity:res.activity
@ -91,16 +118,16 @@ export class IndexMenu extends React.Component<{ user:string },
switch(res.customResult){
case FindActivityMessage.fail:
case PageDataMessage.fail:
that.setState({
result:<h3 className="text-danger text-center"></h3>
});break;
case FindActivityMessage.ok:
case PageDataMessage.ok:
that.setState({
activityList:res.dataList,
page:res.page
});break
case FindActivityMessage.empty:
case PageDataMessage.empty:
that.setState({
page:res.page,
result:<h3 className="text-info text-center"></h3>
@ -130,7 +157,7 @@ export class IndexMenu extends React.Component<{ user:string },
</Card.Body>
<Card.Footer>
<Button variant={"info"} onClick={()=>this.loadActivityWithId(activity.activityId)} className="mr-2"></Button>
<Button variant="primary" ></Button>
<Button variant="primary" onClick={()=>this.apply(activity.activityId)}></Button>
</Card.Footer>
</Card>
</Col>)}

@ -8,8 +8,8 @@ import moment from 'moment';
import {Address} from "../ui/Address";
import {UploadImg} from "../ui/UploadImg";
import {userObj} from "../ui/TestData";
import {API, Method, request} from "../interface"
import {ActivityMessage, SendHelpRes, SendHelpTransform} from "../result";
import {API, JSONResponse, Method, request} from "../interface"
import {EmptyBodyTransform, SimpleMessage} from "../result";
import {MyDialog} from "../ui/MyDialog";
/**
@ -91,13 +91,13 @@ export class SendHelp extends React.Component<{ onSendActivityOK:Function }, Sen
activityEndTime:this.state.activityEndTime,
activityImgFile:this.state.activityImgFile,
serviceAddress:this.state.serviceAddress
},new SendHelpTransform(),function (res:SendHelpRes) {
},new EmptyBodyTransform(),function (res:JSONResponse<SimpleMessage>) {
switch (res.customResult) {
case ActivityMessage.ok:
case SimpleMessage.ok:
that.setState({
result:<div className="text-center"><Button variant="info" onClick={()=>that.props.onSendActivityOK()}></Button></div>
});break
case ActivityMessage.fail:
case SimpleMessage.fail:
that.setState({
result:<h3 className="text-center text-danger"></h3>
});break

@ -5,7 +5,7 @@ import {PageProps, User} from "../entity";
import {Page} from "../ui/Page";
import {Address} from "../ui/Address";
import {API, Method, request} from "../interface"
import {FindUserMessage, FindUserRes, FindUserTransform} from "../result";
import {FindUserRes, FindUserTransform, PageDataMessage} from "../result";
import {MyDialog} from "../ui/MyDialog";
/**
@ -48,7 +48,7 @@ export class Volunteer extends React.Component<{ undefined?:undefined },
request(API.account.find+'?info='+this.state.form.keyword+'&serviceAddress='+this.state.form.serviceAddress
+'&currentPage='+page+'&userTypes=seekHelp',Method.GET,{},new FindUserTransform(),function(res:FindUserRes){
switch (res.customResult) {
case FindUserMessage.ok:
case PageDataMessage.ok:
that.setState({
volunteerList:res.dataList,
form:{
@ -57,7 +57,7 @@ export class Volunteer extends React.Component<{ undefined?:undefined },
}
})
break
case FindUserMessage.fail:
case PageDataMessage.fail:
that.setState({
form:{
keyword:that.state.form.keyword,
@ -65,7 +65,7 @@ export class Volunteer extends React.Component<{ undefined?:undefined },
},
result:<h3 className="text-center text-danger"></h3>
});break
case FindUserMessage.empty:
case PageDataMessage.empty:
that.setState({
result:<h3 className="text-center text-info"></h3>
});break

@ -24,9 +24,36 @@ export const userObj={
export const activityObj={
activityId:0,
userId:"123",
title:"活动标题1",
content:"活动内容活动内容活动活动内容活动内容活动活动内容活动内容活动活动内容活动内容活动活动内容活动内容活动活动内容活动内容活动活动内容活动内容活动活动内容活动内容活动活动内容活动内容活动",
activityImg:"logo512.png",
activityStartTime:new Date().getTime(),
activityEndTime:new Date().getTime()
}
export const myActivityObj={
//活动Id
activityId:123,
userId:"123",
//活动标题
title:"活动标题",
//活动内容
content:"活动内容",
//活动背景图
activityImg: "logo512.png",
//求助时间
seekHelpTime:new Date().getTime(),
//活动开始时间
activityStartTime:new Date().getTime(),
//活动结束时间
activityEndTime:new Date().getTime(),
//报名时间
applyTime:new Date().getTime(),
//参与时间
joinTime:new Date().getTime(),
//完成时间
completeTime:new Date().getTime(),
//活动评价分
score: Math.ceil(Math.random()*10),
}

Loading…
Cancel
Save