对接服务端

1.我的好友-获取好友列表以及查找陌生人
master
pan 4 years ago
parent 83401e7396
commit b7e821a70f
  1. 5
      src/entity.ts
  2. 8
      src/interface.ts
  3. 161
      src/my/MyFriend.tsx
  4. 180
      src/my/MyInfo.tsx
  5. 4
      src/my/MyLeaveWord.tsx
  6. 4
      src/my/MyMessage.tsx
  7. 2
      src/my/SeekHelp.tsx
  8. 17
      src/result.ts

@ -191,7 +191,9 @@ export interface User{
//身份
userType:string;
//用户状态
status?:boolean;
chatStatus?:boolean;
//是否我的好友
isMyFriend?:boolean;
}
/**
@ -230,7 +232,6 @@ export interface UserEdit{
newPassword:string;
//确认新密码
confirmNewPwd:string;
result:JSX.Element|null;
//缓存用户身份
oldUserType?:String;
}

@ -27,7 +27,13 @@ export const API={
//拒绝好友邀请
refuse:prefix.user+"/refuse",
//同意好友邀请
agree:prefix.user+"/agree"
agree:prefix.user+"/agree",
//我的好友
myFriend:prefix.user+"/friend/list",
//刷新聊天室状态
refreshChat:prefix.user+"/chat/status",
//查找用户
findUser:prefix.user+"/find/name"
},
main:{
activity: {

@ -6,20 +6,25 @@ import moment from "moment";
import {MyInfo} from "./MyInfo";
import {MyDialog} from "../ui/MyDialog";
import {userObj} from "../ui/TestData";
import {API, JSONResponse, Method, request} from "../interface";
import {EmptyBodyTransform, PageDataMessage, SimpleMessage, UserRes, UserTransform} from "../result";
const maxLength=150
/**
*
*/
export class MyFriend extends React.Component<{ user:string },
export class MyFriend extends React.Component<
{ user:string },
{
//好友列表
friendList:Array<User>;
friendList?:Array<User>;
//查找好友关键字
queryFriend:string;
//查找用户关键字
queryUser:string;
//用户列表
userList:Array<User>;
userList?:Array<User>;
//聊天记录
chatList:Array<Chat>;
//当前选中好友
@ -28,6 +33,9 @@ export class MyFriend extends React.Component<{ user:string },
sendContent:String;
//查看用户ID
userId:string|null;
//操作反馈
result:JSX.Element|null;
//
}
>{
@ -40,37 +48,100 @@ export class MyFriend extends React.Component<{ user:string },
friendList:[],
//查找好友关键字
queryFriend:"",
//用户列表
userList:[],
queryUser:"",
//聊天记录
chatList:[],
//当前选中好友
friendIndex:null,
//发送内容
sendContent:'',
userId:null
userId:null,
result:null
}
}
componentDidMount() {
this.loadMyFriend("")
this.loadMyFriend()
this.joinChat()
}
componentWillUnmount() {
this.leaveChat()
}
/**
*
* @param keyword
*
*/
queryUser(keyword:string){
this.setState({
userList:[userObj,userObj,userObj]
joinChat(){
this.refreshStatus(true)
}
/**
*
*/
refreshStatus(chatStatus:boolean){
let that=this
request(API.account.refreshChat,Method.POST, {chatStatus:String(chatStatus)},new EmptyBodyTransform(),function (res:JSONResponse<SimpleMessage>) {
switch (res.customResult) {
case SimpleMessage.fail:
that.setState({
result:<h3 className="text-danger text-center">{chatStatus?"进入":"退出"}</h3>
})
break
}
})
}
/**
*
*/
leaveChat(){
this.refreshStatus(false)
}
/**
*
*/
queryUser(name:string){
if(!name){
this.setState({
userList:[]
})
}else {
let that = this
request(API.account.findUser + "?name=" + name, Method.GET, {}, new UserTransform(), function (res: UserRes) {
switch (res.customResult) {
case PageDataMessage.ok:
that.setState({
userList: res.dataList
})
break
}
})
}
}
//查找我的好友
loadMyFriend(keyword:string){
this.setState({
friendList:[userObj,userObj,userObj]
loadMyFriend(){
let that=this
request(API.account.myFriend+"?currentPage=1",Method.GET, {},new UserTransform(),function (res:UserRes) {
switch (res.customResult) {
case PageDataMessage.ok:
that.setState({
friendList:res.dataList
})
break
case PageDataMessage.fail:
that.setState({
result:<h3 className="text-danger text-center"></h3>
})
}
})
}
//加载聊天记录
@ -90,35 +161,51 @@ export class MyFriend extends React.Component<{ user:string },
<ListGroup className="overflow-auto bg-light friend-list">
<ListGroup.Item variant="primary"></ListGroup.Item>
<ListGroup.Item>
<FormControl placeholder="查找好友" onChange={(e)=>this.loadMyFriend(e.target.value)}/>
<FormControl placeholder="查找好友" onChange={(e)=>{
this.setState({
queryFriend:e.target.value
})
this.loadMyFriend()
}}/>
</ListGroup.Item>
{this.state.friendList.map((friend:User,index:number)=>
<Tooltip key={"tooltip"+index} title={"点击查看和"+friend.name+"的聊天记录"} placement={"right"}>
<ListGroup.Item onClick={()=>
{
this.setState({
friendIndex:index
})
this.loadMyChat(friend)
}} className={index===this.state.friendIndex?"text-success":"text-dark"}
style={{cursor:"pointer"}} variant={friend.status?"info":"secondary"}>{friend.name}
{this.state.friendList?this.state.friendList.map((friend:User,index:number)=>
<ListGroup.Item key={"tooltip"+index} className={"d-flex justify-content-between "+(index===this.state.friendIndex?"text-success":"text-dark")}
style={{cursor:"pointer"}} variant={friend.chatStatus?"info":"secondary"}>
<Tooltip title={"点击查看和"+friend.name+"的聊天记录"} placement={"right"}>
<span onClick={()=>
{
this.setState({
friendIndex:index
})
this.loadMyChat(friend)
}}>{friend.name}</span>
</Tooltip>
<Tooltip title="查看用户信息" placement="right">
<img src="user.svg" alt="查看用户信息" className="userIcon" onClick={()=>this.setState({userId:friend.userId})}/>
</Tooltip>
</ListGroup.Item>
</Tooltip>)}
):null}
</ListGroup>
<ListGroup className="overflow-auto bg-light friend-list">
<ListGroup.Item variant="primary"></ListGroup.Item>
<ListGroup.Item>
<FormControl placeholder="查找用户" onChange={(e)=>this.queryUser(e.target.value)}/>
<FormControl placeholder="查找用户" onChange={(e)=>{
this.setState({
queryUser:e.target.value
})
this.queryUser(e.target.value)
}}/>
</ListGroup.Item>
{this.state.userList.map((user:User,index:number)=>
{this.state.userList?this.state.userList.length>0?this.state.userList.map((user:User,index:number)=>
<ListGroup.Item key={"list"+index} className="d-flex justify-content-between" variant="info">
<span>{user.name}</span>
<Tooltip title="查看用户信息" placement="right">
<img src="user.svg" alt="查看用户信息" className="userIcon" onClick={()=>this.setState({userId:user.userId})}/>
</Tooltip>
</ListGroup.Item>)}
</ListGroup.Item>):<ListGroup.Item></ListGroup.Item>:null}
</ListGroup>
</Col>
@ -127,7 +214,7 @@ export class MyFriend extends React.Component<{ user:string },
<Container className="bg-light chat-history overflow-auto">
{this.state.chatList.map((chat:Chat,index:number)=>
this.props.user===chat.userId?
<Row>
<Row key={"row"+index}>
<Col xs={4}>
<Image roundedCircle={true} src={chat.headImg} className="chat-headImg"/>
<span className="d-block text-center user-name">{chat.name}</span>
@ -137,7 +224,7 @@ export class MyFriend extends React.Component<{ user:string },
<p>{chat.content}</p>
</Col>
</Row>:
<Row>
<Row key={"row"+index}>
<Col xs={7}>
<h6 className="text-center">{moment(chat.time).format("YYYY-MM-DD HH:mm:ss")}</h6>
<p>{chat.content}</p>
@ -149,7 +236,7 @@ export class MyFriend extends React.Component<{ user:string },
</Row>
)}
</Container>
<Container className={"bg-white chat-send p-3 border-info border "+(this.state.friendIndex!==-1?"":"d-none")}>
<Container className={"bg-white chat-send p-3 border-info border "+(this.state.friendIndex!==null?"":"d-none")}>
<Row>
<Col xs={12} className="chat-send-content" contentEditable={true} onKeyPress={(e:any)=>{
if(e.target.innerText.length>=maxLength){
@ -174,8 +261,12 @@ export class MyFriend extends React.Component<{ user:string },
</Col>
</Row>
<MyDialog content={this.state.result} open={this.state.result!=null} titleId="my-friend-dialog" menuName="提示信息" onClose={()=>this.setState({
result:null
})}/>
<MyDialog titleId="view-user" menuName="用户信息"
content={<MyInfo isOwn={false} isMyFriend={false} isAdd={true} userId={this.state.userId?this.state.userId:""}/>}
content={<MyInfo isOwn={false} isAdd={true} userId={this.state.userId?this.state.userId:""}/>}
open={this.state.userId!==null} onClose={()=>this.setState({userId:null})}/>
</Container>
);

@ -1,6 +1,6 @@
import React from "react";
import {Button, Col, Container, Form, FormControl, Image, Row} from "react-bootstrap";
import {UserEdit, UserType} from "../entity";
import {User, UserEdit, UserType} from "../entity";
import {Input} from "../ui/InputGroup";
import {API, JSONResponse, Method, prefix, request} from "../interface";
import {
@ -21,12 +21,14 @@ import {user_type_cookie} from "../account/PropCookie";
*/
export class MyInfo extends React.Component<
{
//查看用户id
userId:string;
//查看本人
isOwn:boolean;
isMyFriend:boolean;
//是否添加好友
isAdd:boolean;
cookies?:Cookies;
}, UserEdit>{
}, { userEdit:UserEdit,userInfo?:User,result:JSX.Element|null }>{
private ages:Array<number>
@ -36,12 +38,14 @@ export class MyInfo extends React.Component<
this.ages=this.createAge()
this.state={
contentEditable:false,
modifyPassword:false,
oldPassword:"",
newPassword:"",
confirmNewPwd:"",
result:null
userEdit:{
contentEditable:false,
modifyPassword:false,
oldPassword:"",
newPassword:"",
confirmNewPwd:"",
},
result:null,
}
}
@ -59,6 +63,9 @@ export class MyInfo extends React.Component<
*/
loadInfo(){
if(!this.props.userId){
return
}
let that=this
request(API.account.find+"/"+this.props.userId,Method.GET, {},new FindUserInfoTransform(),function(res:FindUserInfo){
@ -69,17 +76,26 @@ export class MyInfo extends React.Component<
});break
case SimpleMessage.ok:
that.setState({
headImg:res.info?.headImg,
userId:res.info?.userId,
name:res.info?.name,
age:res.info?.age,
mobile:res.info?.mobile,
email:res.info?.email,
serviceAddress:res.info?.serviceAddress,
info:res.info?.info,
userType:res.info?.userType,
sex:res.info?.sex,
oldUserType:res.info?.userType
userInfo:res.info,
userEdit: {
headImg:res.info?.headImg,
userId:res.info?.userId,
name:res.info?.name,
age:res.info?.age,
mobile:+(res.info?.mobile||""),
email:res.info?.email,
serviceAddress:res.info?.serviceAddress,
info:res.info?.info,
userType:res.info?.userType,
sex:res.info?.sex,
oldUserType:res.info?.userType,
contentEditable:false,
modifyPassword:false,
oldPassword:"",
newPassword:"",
confirmNewPwd:"",
}
});break
}
@ -95,7 +111,7 @@ export class MyInfo extends React.Component<
*/
openEdit(){
this.setState({
contentEditable:true
userEdit:{...this.state.userEdit,...{contentEditable:true}}
})
}
@ -104,7 +120,7 @@ export class MyInfo extends React.Component<
*/
openModifyPwd(){
this.setState({
modifyPassword:true
userEdit:{...this.state.userEdit,...{ modifyPassword:true}}
})
}
@ -113,14 +129,14 @@ export class MyInfo extends React.Component<
*/
modifyPwd(){
this.setState({
modifyPassword:false
userEdit:{...this.state.userEdit,...{ modifyPassword:false}}
})
let that=this
request(API.account.updatePwd,Method.POST, {
newPassword:this.state.newPassword,
oldPassword:this.state.oldPassword
newPassword:this.state.userEdit.newPassword,
oldPassword:this.state.userEdit.oldPassword
},new ModifyPwdTransform(),function (res:JSONResponse<ModifyPwdMessage>) {
switch (res.customResult) {
case ModifyPwdMessage.fail:
@ -144,24 +160,24 @@ export class MyInfo extends React.Component<
*/
doSave(){
this.setState({
contentEditable:false
userEdit:{...this.state.userEdit,...{ contentEditable:false}}
})
let that=this
let isUpdateUserType=this.state.userType!==this.state.oldUserType
let isUpdateUserType=this.state.userEdit.userType!==this.state.userEdit.oldUserType
if(isUpdateUserType&&this.props.cookies){
this.props.cookies.set(user_type_cookie,this.state.userType)
this.props.cookies.set(user_type_cookie,this.state.userEdit.userType)
}
request(API.account.update,Method.POST, {
headImg:this.state.headImg||"",
name:this.state.name||"",
age:this.state.age+""||"",
mobile:this.state.mobile+""||"",
email:this.state.email||"",
serviceAddress:this.state.serviceAddress||"",
info:this.state.info||"",
userType:this.state.userType||"",
sex:this.state.sex||""
headImg:this.state.userEdit.headImg||"",
name:this.state.userEdit.name||"",
age:this.state.userEdit.age+""||"",
mobile:this.state.userEdit.mobile+""||"",
email:this.state.userEdit.email||"",
serviceAddress:this.state.userEdit.serviceAddress||"",
info:this.state.userEdit.info||"",
userType:this.state.userEdit.userType||"",
sex:this.state.userEdit.sex||""
},new EmptyBodyTransform(),function (res:JSONResponse<SimpleMessage>) {
switch (res.customResult) {
case SimpleMessage.fail:
@ -217,74 +233,96 @@ export class MyInfo extends React.Component<
<Container className="overflow-auto">
<Row>
<Col className="p-3 text-center">
<Image className="chat-headImg" src={this.state.headImg?prefix.image+this.state.headImg:""}/>
<Image className="chat-headImg" src={this.state.userInfo?.headImg?prefix.image+this.state.userInfo.headImg:""}/>
</Col>
</Row>
{/*TODO 表单校验*/}
<Row>
<Col className="border-info border p-3 d-flex justify-content-center align-items-center">
{this.state.userId}
{this.state.userInfo?.userId}
</Col>
<Col className="border-info border p-3 text-center">
{this.state.contentEditable?
<FormControl value={this.state.name} onChange={(e)=>this.setState({name:e.target.value})}/>
:this.state.name}</Col>
{this.state.userEdit.contentEditable?
<FormControl value={this.state.userEdit.name} onChange={(e)=>this.setState({
userEdit:{...this.state.userEdit,...{ name:e.target.value}}
})}/>
:this.state.userInfo?.name}</Col>
<Col className="border-info border p-3 text-center">
{this.state.contentEditable?
<FormControl as={"select"} value={this.state.age} onChange={(e)=>this.setState({age:+e.target.value})}>
{this.state.userEdit.contentEditable?
<FormControl as={"select"} value={this.state.userEdit.age} onChange={(e)=>this.setState({
userEdit:{...this.state.userEdit,...{ age:+e.target.value}}
})}>
{this.ages.map(value=><option key={value} value={value}>{value}</option>)}
</FormControl>
:this.state.age}</Col>
:this.state.userInfo?.age}</Col>
</Row>
<Row>
<Col className="border-info border p-3 text-center">
{this.state.contentEditable?
<FormControl value={this.state.mobile} type={"number"} onChange={(e)=>this.setState({mobile:+e.target.value})}/>
:this.state.mobile}
{this.state.userEdit.contentEditable?
<FormControl value={this.state.userEdit.mobile} type={"number"} onChange={(e)=>this.setState({
userEdit:{...this.state.userEdit,...{ mobile:+e.target.value}}
})}/>
:this.state.userInfo?.mobile}
</Col>
<Col className="border-info border p-3 text-center">
{this.state.contentEditable?
<FormControl value={this.state.email} onChange={(e)=>this.setState({email:e.target.value})}/>
:this.state.email}
{this.state.userEdit.contentEditable?
<FormControl value={this.state.userEdit.email} onChange={(e)=>this.setState({
userEdit:{...this.state.userEdit,...{ email:e.target.value}}
})}/>
:this.state.userInfo?.email}
</Col>
<Col className="border-info border p-3 text-center">
{this.state.contentEditable?
<FormControl value={this.state.sex} as={"select"} onChange={event => this.setState({sex:event.target.value})}>
{this.state.userEdit.contentEditable?
<FormControl value={this.state.userEdit.sex} as={"select"} onChange={event => this.setState({
userEdit:{...this.state.userEdit,...{ sex:event.target.value}}
})}>
<option value={"man"}></option>
<option value={"women"}></option>
</FormControl>:this.state.sex==='man'?"男":"女"}
</FormControl>:this.state.userInfo?.sex==='man'?"男":"女"}
</Col>
</Row>
<Row>
<Col className="border-info border p-3 text-center">
{this.state.contentEditable?
<Address col={12} value={this.state.serviceAddress} onChange={(value:string)=>this.setState({serviceAddress:value})}/>:this.state.serviceAddress}
{this.state.userEdit.contentEditable?
<Address col={12} value={this.state.userEdit.serviceAddress} onChange={(value:string)=>this.setState({
userEdit:{...this.state.userEdit,...{ serviceAddress:value}}
})}/>:this.state.userInfo?.serviceAddress}
</Col>
<Col className="border-info border p-3 text-center">
{this.state.contentEditable?
<FormControl value={this.state.userType} as={"select"} onChange={(e)=>this.setState({userType:e.target.value})}>
{this.state.userEdit.contentEditable?
<FormControl value={this.state.userEdit.userType} as={"select"} onChange={(e)=>this.setState({
userEdit:{...this.state.userEdit,...{ userType:e.target.value}}
})}>
<option value={UserType.seekHelp}></option>
<option value={UserType.help}></option>
</FormControl>:
this.state.userType===UserType.help?"等待前往帮助":"等待接受帮助"}
this.state.userInfo?.userType===UserType.help?"等待前往帮助":"等待接受帮助"}
</Col>
</Row>
<Row>
<Col className="border-info border p-3 text-center my-info-desc">
{this.state.contentEditable?
<FormControl value={this.state.info} as={"textarea"} onChange={(e)=>this.setState({info:e.target.value})}/>
:this.state.info}
{this.state.userEdit.contentEditable?
<FormControl value={this.state.userEdit.info} as={"textarea"} onChange={(e)=>this.setState({
userEdit:{...this.state.userEdit,...{ info:e.target.value}}
})}/>
:this.state.userInfo?.info}
</Col>
</Row>
{this.state.modifyPassword?
{this.state.userEdit.modifyPassword?
<Row>
<Col>
<Form>
<Input name="oldPassword" type={"password"} desc="旧密码" onChange={(value:string)=>this.setState({oldPassword:value})}/>
<Input name="oldPassword" type={"password"} desc="旧密码" onChange={(value:string)=>this.setState({
userEdit:{...this.state.userEdit,...{ oldPassword:value}}
})}/>
<Input name="newPassword" type={"password"} desc="新密码" onChange={(value:string)=>this.setState({newPassword:value})}/>
<Input name="newPassword" type={"password"} desc="新密码" onChange={(value:string)=>this.setState({
userEdit:{...this.state.userEdit,...{newPassword:value}}
})}/>
<Input name="confirmNewPwd" type={"password"} placeholder="请确认新密码" desc="新密码" onChange={(value:string)=>this.setState({confirmNewPwd:value})}/>
<Input name="confirmNewPwd" type={"password"} placeholder="请确认新密码" desc="新密码" onChange={(value:string)=>this.setState({
userEdit:{...this.state.userEdit,...{confirmNewPwd:value}}
})}/>
</Form>
</Col>
</Row>
@ -294,19 +332,19 @@ export class MyInfo extends React.Component<
{this.props.isOwn?
<Row className="p-3">
<Col className="text-center">
{this.state.contentEditable?
{this.state.userEdit.contentEditable?
<Button variant={"primary"} onClick={()=>this.doSave()}></Button>:
<Button variant={"info"} onClick={()=>this.openEdit()} disabled={this.state.modifyPassword}></Button>}
<Button variant={"info"} onClick={()=>this.openEdit()} disabled={this.state.userEdit.modifyPassword}></Button>}
</Col>
<Col className="text-center">
{this.state.modifyPassword?
{this.state.userEdit.modifyPassword?
<Button variant={"light"} onClick={()=>this.modifyPwd()}></Button>:
<Button variant={"light"} onClick={()=>this.openModifyPwd()} disabled={this.state.contentEditable}></Button>}
<Button variant={"light"} onClick={()=>this.openModifyPwd()} disabled={this.state.userEdit.contentEditable}></Button>}
</Col>
</Row>:
<Row className="p-3">
<Col className="text-center">
{this.props.isMyFriend?null:this.props.isAdd?
{this.state.userInfo?.isMyFriend===undefined||this.state.userInfo.isMyFriend?null:this.props.isAdd?
<Button variant={"primary"} onClick={()=>this.addFriend()}></Button>
:
<Button variant={"primary"} onClick={()=>this.agreeFriend()}></Button>

@ -115,12 +115,12 @@ export class MyLeaveWord extends React.Component<
},new EmptyBodyTransform(),function (res:JSONResponse<SimpleMessage>) {
switch (res.customResult) {
case SimpleMessage.ok:
that.loadLeaveWord(1)
that.setState({
result:<h3 className="text-info text-center"></h3>
})
break
case SimpleMessage.fail:
that.loadLeaveWord(1)
that.setState({
result:<h3 className="text-danger text-center"></h3>
})
@ -194,7 +194,7 @@ export class MyLeaveWord extends React.Component<
<div className="overflow-auto my-leave-world-height">
{this.state.data?this.state.data.length===0?<h3 className="text-info text-center"></h3>:this.state.data.map((data,index) =>this.getData(data,index)):<h3 className="text-info text-center"></h3>}
<MyDialog titleId="view-user" menuName="用户信息"
content={<MyInfo isOwn={false} isMyFriend={false} isAdd={false} userId={this.state.userId?this.state.userId:""}/>}
content={<MyInfo isOwn={false} isAdd={false} userId={this.state.userId?this.state.userId:""}/>}
open={this.state.openUserInfo} onClose={()=>this.setState({openUserInfo:false})}/>
<MyDialog content={<Activity activityId={this.state.activityId} showButton={false} />}

@ -22,7 +22,7 @@ export class MyMessage extends React.Component<{ user:string,cookies:Cookies },
this.state={
subMenu:Menu.info,
page:<MyInfo cookies={this.props.cookies} userId={this.props.user} isMyFriend={false} isOwn={true} isAdd={false}/>
page:<MyInfo cookies={this.props.cookies} userId={this.props.user} isOwn={true} isAdd={false}/>
}
}
@ -31,7 +31,7 @@ export class MyMessage extends React.Component<{ user:string,cookies:Cookies },
this.setState({subMenu:menu})
switch (menu) {
case Menu.info:
this.setState({page:<MyInfo cookies={this.props.cookies} userId={this.props.user} isMyFriend={false} isOwn={true} isAdd={false}/>})
this.setState({page:<MyInfo cookies={this.props.cookies} userId={this.props.user} isOwn={true} isAdd={false}/>})
break
case Menu.help:
this.setState({page:<MyHelp/>})

@ -149,7 +149,7 @@ export class SeekHelp extends React.Component<{ user:string },
</Dialog>
<MyDialog titleId="view-user" menuName="用户信息"
content={<MyInfo isOwn={false} isMyFriend={false} isAdd={true} userId={this.state.userId?this.state.userId:""}/>}
content={<MyInfo isOwn={false} isAdd={true} userId={this.state.userId?this.state.userId:""}/>}
open={this.state.openUserInfo} onClose={()=>this.setState({openUserInfo:false})}/>
<MyDialog content={this.state.result} open={this.state.result!==null} titleId="seek-help-dialog"

@ -2,7 +2,7 @@
*
*/
import {JSONResponse, Result, TransformData} from "./interface";
import {ActivityDetail, HelpEntity, LeaveWord, PageProps, SeekHelpState, User, UserEdit, UserType} from "./entity";
import {ActivityDetail, HelpEntity, LeaveWord, PageProps, SeekHelpState, User, UserType} from "./entity";
/**
* body响应
@ -170,7 +170,7 @@ export class ActivityDetailTransform extends TransformData<SimpleMessage, Activi
}
export class FindUserInfo extends JSONResponse<SimpleMessage>{
info?:UserEdit
info?:User
}
//查找用户信息转换
export class FindUserInfoTransform extends TransformData<SimpleMessage, FindUserInfo>{
@ -262,3 +262,16 @@ export class HelpTransform extends PageDataTransform<HelpRes>{
}
/**
*
*/
export class UserRes extends PageDataRes{
dataList?:Array<User>
}
export class UserTransform extends PageDataTransform<UserRes>{
protected newObject(): UserRes {
return new UserRes();
}
}

Loading…
Cancel
Save