page.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669
  1. import React, { Component } from 'react';
  2. import { Link } from 'react-router-dom';
  3. import './index.less';
  4. import { Tooltip, Icon, Calendar } from 'antd';
  5. import Page from '@src/containers/Page';
  6. import Assets from '@src/components/Assets';
  7. import { formatPercent, formatDate, formatSeconds, getMap } from '@src/services/Tools';
  8. import { asyncSMessage } from '@src/services/AsyncTools';
  9. import moment from 'moment';
  10. import UserLayout from '../../../layouts/User';
  11. import Tabs from '../../../components/Tabs';
  12. import Button from '../../../components/Button';
  13. import { Icon as GIcon } from '../../../components/Icon';
  14. import UserTable from '../../../components/UserTable';
  15. import Examination from '../../../components/Examination';
  16. import menu from '../index';
  17. import { BindPhone, BindEmail, EditInfo, RealAuth, EditAvatar, InviteModal } from '../../../components/OtherModal';
  18. import VipRenew from '../../../components/VipRenew';
  19. import { My } from '../../../stores/my';
  20. import { Main } from '../../../stores/main';
  21. import { QuestionType } from '../../../../Constant';
  22. const QuestionTypeMap = getMap(QuestionType, 'value', 'label');
  23. class LogItem extends Component {
  24. constructor(props) {
  25. super(props);
  26. this.columns = [
  27. { title: '', key: 'title' },
  28. { title: '语法SC', key: 'sc' },
  29. { title: '逻辑CR', key: 'cr' },
  30. { title: '阅读RC', key: 'rc' },
  31. ];
  32. this.state = { open: false };
  33. }
  34. render() {
  35. const { data = {} } = this.props;
  36. const { total = [], type } = data;
  37. const { open } = this.state;
  38. return (
  39. <div className="log-item">
  40. <div className="total">
  41. {total.map(item => {
  42. return (
  43. <div className="text" style={{ width: item.width }} dangerouslySetInnerHTML={{ __html: item.title }} />
  44. );
  45. })}
  46. </div>
  47. <div className="open">
  48. <GIcon name={open ? 'small-up' : 'small-down'} onClick={() => this.setState({ open: !open })} />
  49. </div>
  50. {type === 'exercise' && this.renderExercise()}
  51. {type === 'examination' && this.renderExamination()}
  52. {type === 'course' && this.renderCourse()}
  53. </div>
  54. );
  55. }
  56. renderExercise() {
  57. const { open } = this.state;
  58. return (
  59. <div hidden={!open} className="table">
  60. <UserTable size="small" columns={this.columns} data={[{ title: '123' }]} />
  61. <div className="t-r">
  62. <Link to="/exercise">继续练习></Link>
  63. </div>
  64. </div>
  65. );
  66. }
  67. renderExamination() {
  68. const { open } = this.state;
  69. return (
  70. <div hidden={!open} className="table">
  71. <div className="title p-l-5 m-b-1 t-1 t-s-18 f-w-b">
  72. 千行-CAT01<div className="f-r t-3 t-s-12 f-w-d">2019-05-16 16:21:06</div>
  73. </div>
  74. <UserTable
  75. size="small"
  76. columns={[
  77. { key: '1', title: '' },
  78. { key: '2', title: 'Tobal' },
  79. { key: '3', title: 'IR' },
  80. { key: '4', title: 'Verbal' },
  81. { key: '5', title: 'Quant' },
  82. ]}
  83. data={[{ title: '123' }]}
  84. />
  85. <div className="title p-l-5 m-b-1 t-1 t-s-18 f-w-b m-t-2">
  86. 净化版GWD-CAT01 <div className="f-r t-3 t-s-12 f-w-d">2019-05-16 16:21:06</div>
  87. </div>
  88. <UserTable
  89. size="small"
  90. columns={[
  91. { key: '1', title: '' },
  92. { key: '2', title: 'Tobal' },
  93. { key: '3', title: 'IR' },
  94. { key: '4', title: 'Verbal' },
  95. { key: '5', title: 'Quant' },
  96. ]}
  97. data={[{ title: '123' }]}
  98. />
  99. <div className="t-r">
  100. <Link to="/exercise">继续练习></Link>
  101. </div>
  102. </div>
  103. );
  104. }
  105. renderCourse() {
  106. const { open } = this.state;
  107. return (
  108. <div hidden={!open} className="table">
  109. <UserTable
  110. header={false}
  111. size="small"
  112. even="odd"
  113. columns={[{ key: '1', width: 100 }, { key: '2', width: 310 }, { key: '3', width: 120 }]}
  114. data={[
  115. { 1: '语法SC', 2: '课时3:代词的指代', 3: '2019-04-27\n 15:14:29' },
  116. { 1: '逻辑 RC', 2: '课时3:代词的指代', 3: '2019-04-27\n 15:14:29' },
  117. { 1: '阅读CR', 2: '课时3:代词的指代', 3: '2019-04-27\n 15:14:29' },
  118. { 1: '逻辑 RC', 2: '课时3:代词的指代', 3: '2019-04-27\n 15:14:29' },
  119. ]}
  120. />
  121. <div className="t-r">
  122. <Link to="/exercise">继续练习></Link>
  123. </div>
  124. </div>
  125. );
  126. }
  127. }
  128. export default class extends Page {
  129. constructor(props) {
  130. super(props);
  131. this.colors = ['#3C39CC', '#9E9CFF', '#4292F0', '#4374EC', '#6865FD', '#8D65FD', '#6BABF6', '#7BBEFF', '#6BABF6'];
  132. }
  133. initState() {
  134. return {
  135. day: 'today',
  136. showExamination: false,
  137. timeList: [
  138. { title: '长难句', time: '3h60min', ratio: 10, color: '#3C39CC' },
  139. { title: '综合推理IR', time: '3h60min', ratio: 10, color: '#9E9CFF' },
  140. { title: '语法SC', time: '3h60min', ratio: 10, color: '#4292F0' },
  141. { title: '作文AWA', time: '3h60min', ratio: 10, color: '#4374EC' },
  142. { title: '阅读RC', time: '3h60min', ratio: 10, color: '#6865FD' },
  143. { title: '模考', time: '3h60min', ratio: 10, color: '#8D65FD' },
  144. { title: '逻辑CR', time: '3h60min', ratio: 10, color: '#6BABF6' },
  145. { title: '自由组卷', time: '3h60min', ratio: 10, color: '#7BBEFF' },
  146. { title: '数学Quant', time: '3h60min', ratio: 10, color: '#6BABF6' },
  147. ],
  148. logList: [
  149. {
  150. total: [
  151. { title: '<span>练习和订正</span>', width: 130 },
  152. { title: '<b>60</b>min', width: 90 },
  153. { title: '<b>30</b>题', width: 80 },
  154. { title: '超过了<b>30%</b>的用户' },
  155. ],
  156. detail: [
  157. { title: '做题数', sc: '10', cr: '10', rc: '20' },
  158. { title: '平均正确率', sc: '86%', cr: '86%', rc: '86%' },
  159. { title: '平均用时', sc: '1min', cr: '1min20s', rc: '1min' },
  160. ],
  161. },
  162. {
  163. total: [
  164. { title: '<span>模考和订正</span>', width: 130 },
  165. { title: '<b>60</b>min', width: 90 },
  166. { title: '<b>30</b>套卷', width: 80 },
  167. { title: '超过了<b>30%</b>的用户' },
  168. ],
  169. detail: [
  170. { title: '做题数', sc: '10', cr: '10', rc: '20' },
  171. { title: '平均正确率', sc: '86%', cr: '86%', rc: '86%' },
  172. { title: '平均用时', sc: '1min', cr: '1min20s', rc: '1min' },
  173. ],
  174. },
  175. {
  176. total: [
  177. { title: '<span>课程学习</span>', width: 130 },
  178. { title: '<b>60</b>min', width: 90 },
  179. { title: '<b>30</b>课', width: 80 },
  180. { title: '超过了<b>30%</b>的用户' },
  181. ],
  182. detail: [
  183. { title: '做题数', sc: '10', cr: '10', rc: '20' },
  184. { title: '平均正确率', sc: '86%', cr: '86%', rc: '86%' },
  185. { title: '平均用时', sc: '1min', cr: '1min20s', rc: '1min' },
  186. ],
  187. },
  188. ],
  189. };
  190. }
  191. initData() {
  192. // 获取学习数据
  193. My.getStudyTotal().then((total, index) => {
  194. total.categorys = total.categorys.map(row => {
  195. row.ratio = row.time * 100 / total.time;
  196. row.time = formatSeconds(row.time);
  197. row.color = this.colors[index];
  198. return row;
  199. });
  200. this.setState({ total });
  201. });
  202. My.getStudyWeek(0).then(latest => {
  203. const diff = latest.time - latest.avgTime;
  204. const diffPercent =
  205. diff > 0
  206. ? formatPercent(latest.time - latest.avgTime, latest.avgTime, true)
  207. : formatPercent(latest.avgTime - latest.time, latest.avgTime, true);
  208. this.setState({ latest, diff, diffPercent });
  209. My.getStudyWeek(1).then(last => {
  210. const diffLast = latest.time - last.time;
  211. const diffLastPercent =
  212. diffLast > 0
  213. ? formatPercent(latest.time - last.time, last.time, true)
  214. : formatPercent(last.time - latest.time, last.time, true);
  215. this.setState({ last, diffLast, diffLastPercent });
  216. });
  217. });
  218. // 获取广告
  219. Main.getAd('my-self').then(result => {
  220. this.setState({ ads: result });
  221. });
  222. // 获取未读消息
  223. My.message({ page: 1, size: 2, read: 0 }).then(result => {
  224. this.setState({ messages: result.list });
  225. });
  226. this.refreshDay(this.state.day);
  227. }
  228. readAllMessage() {
  229. My.readAllMessage().then(() => {
  230. asyncSMessage('操作成功');
  231. });
  232. }
  233. refreshDay(value) {
  234. let time = '';
  235. switch (value) {
  236. case 'today':
  237. time = moment().format('YYYY-MM-DD');
  238. break;
  239. case 'yesterday':
  240. time = moment()
  241. .add(-1, 'days')
  242. .format('YYYY-MM-DD');
  243. break;
  244. case 'before':
  245. time = moment()
  246. .add(-2, 'days')
  247. .format('YYYY-MM-DD');
  248. break;
  249. default:
  250. time = value.format('YYYY-MM-DD');
  251. value = 'other';
  252. }
  253. My.getStudy(time).then(result => {
  254. const study = [];
  255. const exerciseMap = {};
  256. result.exerciseList.forEach(row => {
  257. exerciseMap[row.title] = row;
  258. });
  259. study.push({
  260. type: 'exercise',
  261. total: [
  262. { title: '<span>练习和订正</span>', width: 130 },
  263. {
  264. title: result.exerciseTime
  265. ? formatSeconds(result.exerciseTime).replace(/([0-9]+)(m|min|h|hour|s)/g, '<b>$1</b>$2')
  266. : '<b>-</b>',
  267. width: 90,
  268. },
  269. { title: `<b>${result.exerciseQuestion || '-'}</b>题`, width: 80 },
  270. {
  271. title: `超过了<b>${
  272. result.exerciseExceed ? formatPercent(result.exerciseExceed.rank, result.exerciseExceed.total) : '-%'
  273. }</b>的用户`,
  274. },
  275. ],
  276. detail: [
  277. {
  278. title: '做题数',
  279. sc: exerciseMap.sc ? exerciseMap.sc.number : '-',
  280. cr: exerciseMap.cr ? exerciseMap.cr.number : '-',
  281. rc: exerciseMap.rc ? exerciseMap.rc.number : '-',
  282. },
  283. {
  284. title: '平均正确率',
  285. sc: exerciseMap.sc ? formatPercent(exerciseMap.sc.correct, exerciseMap.sc.number) : '-%',
  286. cr: exerciseMap.cr ? formatPercent(exerciseMap.cr.correct, exerciseMap.cr.number) : '-%',
  287. rc: exerciseMap.rc ? formatPercent(exerciseMap.rc.correct, exerciseMap.rc.number) : '-%',
  288. },
  289. {
  290. title: '平均用时',
  291. sc: exerciseMap.sc ? exerciseMap.sc.time / exerciseMap.sc.number : '-',
  292. cr: exerciseMap.cr ? exerciseMap.cr.time / exerciseMap.cr.number : '-',
  293. rc: exerciseMap.rc ? exerciseMap.rc.time / exerciseMap.rc.number : '-',
  294. },
  295. ],
  296. });
  297. study.push({
  298. type: 'examination',
  299. total: [
  300. { title: '<span>模考和订正</span>', width: 130 },
  301. { title: result.examinationTime ? formatSeconds(result.examinationTime).replace(/([0-9]+)(m|min|h|hour|s)/g, '<b>$1</b>$2') : '<b>-</b>', width: 90 },
  302. { title: `<b>${result.examinationPaper || '-'}</b>套卷`, width: 80 },
  303. { title: `超过了<b>${result.examinationExceed ? formatPercent(result.examinationExceed.rank, result.examinationExceed.total) : '-%'}</b>的用户` },
  304. ],
  305. detail: result.examinationList.map(row => {
  306. return {
  307. title: row.title,
  308. time: formatDate(row.report.createTime, 'YYYY-MM-DD HH:mm:ss'),
  309. score: row.report.score,
  310. };
  311. }),
  312. });
  313. study.push({
  314. type: 'course',
  315. total: [
  316. { title: '<span>课程学习</span>', width: 130 },
  317. { title: result.courseTime ? formatSeconds(result.courseTime).replace(/([0-9]+)(m|min|h|hour|s)/g, '<b>$1</b>$2') : '<b>-</b>', width: 90 },
  318. { title: `<b>${result.courseNumber || '-'}</b>课时`, width: 80 },
  319. { title: `超过了<b>${result.courseExceed ? formatPercent(result.courseExceed.rank, result.courseExceed.total) : '-%'}</b>的用户` },
  320. ],
  321. detail: result.courseList.map(row => {
  322. return {
  323. type: QuestionTypeMap[row.extend],
  324. title: `课时${row.no}: ${row.title}`,
  325. time: formatDate(row.createTime, 'YYYY-MM-DD HH:mm:ss'),
  326. };
  327. }),
  328. });
  329. this.setState({ study });
  330. });
  331. this.setState({ day: value, time, showCal: false });
  332. }
  333. renderView() {
  334. const { config } = this.props;
  335. return (
  336. <UserLayout
  337. active={config.key}
  338. menu={menu}
  339. center={[this.renderTop(), this.renderLog(), this.renderTime()]}
  340. right={[this.renderInfo(), this.renderMessage()]}
  341. ads={(this.state.ads || []).map(row => {
  342. return (
  343. <a href={row.link} target="_blank">
  344. <Assets src={row.image} />
  345. </a>
  346. );
  347. })}
  348. />
  349. );
  350. }
  351. renderTop() {
  352. return null; // <div className="total-layout">1</div>;
  353. }
  354. renderLog() {
  355. const { study = [{}, { type: 'examination' }, { type: 'course' }] } = this.state;
  356. const {
  357. latest = {},
  358. diff = 0,
  359. diffPercent = 0,
  360. diffLast = 0,
  361. diffLastPercent = 0,
  362. day,
  363. time,
  364. showCal,
  365. } = this.state;
  366. return (
  367. <div className="log-layout">
  368. <div className="header">
  369. <div className="title">学习记录</div>
  370. <div className="right">
  371. <span
  372. dangerouslySetInnerHTML={{
  373. __html: `本周学习时间${formatSeconds(latest.time).replace(/([0-9]+)(m|min|h|hour|s)/g, '<b>$1</b>$2')}`,
  374. }}
  375. />
  376. <span>
  377. 同比上周<b>{diffLastPercent}</b>% <Assets name={diffLast > 0 ? 'up' : 'down'} />
  378. </span>
  379. <span>
  380. 同比全站<b>{diffPercent}</b>% <Assets name={diff > 0 ? 'up' : 'down'} />
  381. </span>
  382. </div>
  383. </div>
  384. <div className="action">
  385. <Tabs
  386. className="d-i-b"
  387. type="tag"
  388. width={54}
  389. space={5}
  390. active={day}
  391. tabs={[
  392. { title: '今天', key: 'today' },
  393. { title: '昨天', key: 'yesterday' },
  394. { title: '前天', key: 'before' },
  395. ]}
  396. onChange={value => {
  397. this.refreshDay(value);
  398. }}
  399. />
  400. <div className="right">
  401. {day === 'other' && formatDate(time, 'YYYY-MM-DD')}
  402. <Assets
  403. className="right"
  404. name="calendar"
  405. onClick={() => {
  406. this.setState({ showCal: true });
  407. }}
  408. />
  409. {showCal && (
  410. <Calendar
  411. className="cal"
  412. fullscreen={false}
  413. disabledDate={date => date.unix() <= moment.unix()}
  414. onSelect={date => {
  415. this.refreshDay(date);
  416. }}
  417. />
  418. )}
  419. </div>
  420. </div>
  421. {study.map((log, index) => {
  422. return <LogItem key={index} data={log} />;
  423. })}
  424. </div>
  425. );
  426. }
  427. renderTime() {
  428. const { total = {} } = this.state;
  429. return (
  430. <div className="time-layout">
  431. <div className="header">
  432. <div className="title">
  433. 时间分配
  434. <Tooltip overlayClassName="gray" title="包括听课、练习与订正">
  435. <Icon type="question-circle" theme="filled" />
  436. </Tooltip>
  437. </div>
  438. <div className="right">
  439. 自 {total.createTIme && formatDate(total.createTime, 'YYYY-MM-DD')} ,您已在千行学习<b>{total.days}</b>
  440. 天,累计
  441. <span
  442. dangerouslySetInnerHTML={{
  443. __html: formatSeconds(total.time).replace(/([0-9]+)(m|min|h|hour|s)/g, '<b>$1</b>$2'),
  444. }}
  445. />
  446. </div>
  447. </div>
  448. <div className="body">
  449. <div className="line">
  450. {(total.categorys || []).map(item => {
  451. return (
  452. <Tooltip overlayClassName="gray" title={`${item.title} ${item.time}`}>
  453. <i style={{ background: item.color, width: `${item.ratio}%` }} />
  454. </Tooltip>
  455. );
  456. })}
  457. </div>
  458. <div className="list">
  459. {(total.categorys || []).map(item => {
  460. return (
  461. <div className="item">
  462. <div className="color" style={{ background: item.color }} />
  463. <div className="title">{item.title}</div>
  464. <div className="date">{item.time}</div>
  465. </div>
  466. );
  467. })}
  468. </div>
  469. </div>
  470. </div>
  471. );
  472. }
  473. renderInfo() {
  474. const { info = {} } = this.props.user;
  475. const { showExamination, showPhone, showEmail, showEdit, showReal, showAvatar, showInvite, showVip } = this.state;
  476. return (
  477. <div className="info-layout">
  478. <div className="body">
  479. <div className="info">
  480. <Assets
  481. name="sun_blue"
  482. src={info.avatar}
  483. onClick={() => {
  484. this.setState({ showEdit: true });
  485. }}
  486. />
  487. <div className="detail">
  488. <div
  489. className="name"
  490. onClick={() => {
  491. this.setState({ showEdit: true });
  492. }}
  493. >
  494. {info.nickname}{' '}
  495. </div>
  496. <div className="id">ID: {info.id} </div>
  497. </div>
  498. </div>
  499. <div className="auth">
  500. <span className="invite">
  501. <Button
  502. radius
  503. size="small"
  504. onClick={() => {
  505. this.setState({ showInvite: true });
  506. }}
  507. >
  508. 邀请
  509. </Button>
  510. </span>
  511. <Assets name="wechat" active={info.bindWechat} />
  512. <Assets
  513. name="phone_1"
  514. active={info.bindMobile}
  515. onClick={() => {
  516. this.setState({ showPhone: true });
  517. }}
  518. />
  519. <Assets
  520. name="realname"
  521. active={info.bindReal}
  522. onClick={() => {
  523. this.setState({ showReal: true });
  524. }}
  525. />
  526. <Assets
  527. name="email"
  528. active={!!info.email}
  529. onClick={() => {
  530. this.setState({ showEmail: true });
  531. }}
  532. />
  533. <Assets
  534. name="information"
  535. active={info.bindPrepare}
  536. onClick={() => {
  537. this.setState({ showExamination: true });
  538. }}
  539. />
  540. </div>
  541. </div>
  542. {
  543. <div className="footer">
  544. <Assets className="m-r-5" name="VIP" />
  545. {info.vip && <span className="date">{formatDate(info.vip, 'YYYY-MM-DD')}到期</span>}
  546. <a
  547. onClick={() => {
  548. this.setState({ showVip: true });
  549. }}
  550. >
  551. 续费
  552. </a>
  553. </div>
  554. }
  555. <Examination
  556. show={showExamination}
  557. data={info}
  558. onConfirm={() => this.setState({ showExamination: false })}
  559. onCancel={() => this.setState({ showExamination: false })}
  560. onClose={() => this.setState({ showExamination: false })}
  561. />
  562. <BindPhone
  563. show={showPhone}
  564. data={info}
  565. onConfirm={() => this.setState({ showPhone: false })}
  566. onCancel={() => this.setState({ showPhone: false })}
  567. />
  568. <BindEmail
  569. show={showEmail}
  570. data={info}
  571. onConfirm={() => this.setState({ showEmail: false })}
  572. onCancel={() => this.setState({ showEmail: false })}
  573. />
  574. <EditInfo
  575. show={showEdit}
  576. data={info}
  577. image={this.state.avatarFile}
  578. onSelectImage={file => this.setState({ showEdit: false, showAvatar: true, avatarImage: file })}
  579. onConfirm={() => this.setState({ showEdit: false, avatarFile: null })}
  580. onCancel={() => this.setState({ showEdit: false, avatarFile: null })}
  581. />
  582. <RealAuth show={showReal} data={info} onConfirm={() => this.setState({ showReal: false })} />
  583. <EditAvatar
  584. show={showAvatar}
  585. data={info}
  586. crop={{ width: 200, height: 200 }}
  587. image={this.state.avatarImage}
  588. onConfirm={file => this.setState({ showAvatar: false, showEdit: true, avatarFile: file, avatarImage: null })}
  589. onCancel={() => this.setState({ showAvatar: false, showEdit: true, avatarImage: null })}
  590. />
  591. <InviteModal show={showInvite} data={info} onClose={() => this.setState({ showInvite: false })} />
  592. <VipRenew
  593. show={showVip}
  594. data={info}
  595. onReal={() => this.setState({ showVip: false, showReal: true })}
  596. onPrepare={() => this.setState({ showVip: false, showExamination: true })}
  597. onClose={() => this.setState({ showVip: false })}
  598. />
  599. </div>
  600. );
  601. }
  602. renderMessage() {
  603. const { messages = [] } = this.state;
  604. const number = (messages || []).length;
  605. return (
  606. number > 0 && (
  607. <div className="message-layout">
  608. <div className="header">
  609. <Assets
  610. name="all"
  611. onCancel={() => {
  612. this.readAllMessage();
  613. }}
  614. />
  615. 全部已读
  616. </div>
  617. <div className="body">
  618. {(messages || []).map(row => {
  619. return (
  620. <div className="item">
  621. <div className="title dot">老师回答了您的提问</div>
  622. <div className="date">{formatDate(row.createTime, 'YYYY-MM-DD HH:mm:ss')}</div>
  623. {row.link && (
  624. <GIcon
  625. name="arrow-right-small"
  626. onClick={() => {
  627. openLink(row.link);
  628. }}
  629. />
  630. )}
  631. </div>
  632. );
  633. })}
  634. </div>
  635. <div className="footer">
  636. <Button
  637. radius
  638. size="small"
  639. onClick={() => {
  640. linkTo('/my/message');
  641. }}
  642. >
  643. 全部消息
  644. </Button>
  645. </div>
  646. </div>
  647. )
  648. );
  649. }
  650. }