|
@@ -166,6 +166,9 @@ export default class extends Page {
|
|
|
|
|
|
refreshRoom() {
|
|
|
const { isOverseas, keyword } = this.state;
|
|
|
+ if (!keyword) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
Main.listRoom({ page: 1, size: 10, keyword, isOverseas })
|
|
|
.then(result => {
|
|
|
result.list = result.list.map(row => {
|
|
@@ -329,7 +332,7 @@ export default class extends Page {
|
|
|
if (item.key === current) detail = item;
|
|
|
return (
|
|
|
<div
|
|
|
- className={`page-item ${item.key === current ? 'active' : ''}`}
|
|
|
+ className={`page-item ${item.key === current && open ? 'active' : ''}`}
|
|
|
onClick={() => {
|
|
|
if (item.key === current) {
|
|
|
this.setState({ open: !open });
|
|
@@ -383,16 +386,16 @@ export default class extends Page {
|
|
|
<div className="query-layout">
|
|
|
<div className="search-wrapper">
|
|
|
<Select theme="white" value={isOverseas} list={[{ title: '中国', key: false }, { title: '海外', key: true }]} onChange={({ key }) => this.setState({ isOverseas: key })} />
|
|
|
- <input value={keyword} onChange={(e) => this.setState({ keyword: e.target.value })} />
|
|
|
+ <input value={keyword} placeholder='请输入城市名称' onChange={(e) => this.setState({ keyword: e.target.value })} />
|
|
|
<Button width={150} onClick={() => this.refreshRoom()}>
|
|
|
<Icon className="m-r-5" type="search" />
|
|
|
搜索考场
|
|
|
</Button>
|
|
|
</div>
|
|
|
- {rooms.map((item, index) => {
|
|
|
+ {rooms.map((item) => {
|
|
|
return (
|
|
|
<div className="m-b-2">
|
|
|
- <div className="t-1 t-s-18">{index + 1}.{item.title}</div>
|
|
|
+ <div className="t-1 t-s-18">{item.title}</div>
|
|
|
<div className="t-1">{item.address}</div>
|
|
|
<div className="t-1">
|
|
|
温馨提示: {item.description} <span className="t-4 c-p" onClick={() => User.needLogin().then(() => this.setState({ showSupple: true, supple: { roomId: item.id }, room: item }))}>我要补充</span>
|