page.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749
  1. import React from 'react';
  2. import './index.less';
  3. import { Icon } from 'antd';
  4. import Page from '@src/containers/Page';
  5. import Assets from '@src/components/Assets';
  6. import { asyncSMessage } from '@src/services/AsyncTools';
  7. import { formatDate, getMap } from '@src/services/Tools';
  8. import UserLayout from '../../../layouts/User';
  9. import UserAction from '../../../components/UserAction';
  10. import menu from '../index';
  11. import Tabs from '../../../components/Tabs';
  12. import More from '../../../components/More';
  13. import Button from '../../../components/Button';
  14. import Switch from '../../../components/Switch';
  15. import TotalSort from '../../../components/TotalSort';
  16. import Modal from '../../../components/Modal';
  17. import UserTable from '../../../components/UserTable';
  18. import UserPagination from '../../../components/UserPagination';
  19. import { My } from '../../../stores/my';
  20. import { User } from '../../../stores/user';
  21. import { Order } from '../../../stores/order';
  22. import { Textbook } from '../../../stores/textbook';
  23. import { DataType, ServiceKey, RecordSource } from '../../../../Constant';
  24. import { Main } from '../../../stores/main';
  25. import { Question } from '../../../stores/question';
  26. import Select from '../../../components/Select';
  27. const ServiceKeyMap = getMap(ServiceKey, 'value', 'label');
  28. const RecordSourceMap = getMap(RecordSource, 'value', 'label');
  29. const dataHistoryColumns = [
  30. { title: '更新时间', key: 'time', width: 120 },
  31. { title: '位置', key: 'position', width: 120 },
  32. { title: '原内容', key: 'originContent', width: 120 },
  33. { title: '更改为', key: 'content', width: 120 },
  34. { title: '更新至', key: 'version', width: 90 },
  35. ];
  36. const textbookHistoryColumns = [
  37. { title: '更新时间', key: 'createTime', width: 120 },
  38. { title: '版本', key: 'version', width: 120 },
  39. { title: '更新内容', key: 'content', width: 330 },
  40. ];
  41. const openColumns = [
  42. { title: '商品名称', key: 'title', width: 240 },
  43. { title: '获取方式', key: 'source', width: 240 },
  44. { title: '开通期限', key: 'endTime', width: 240 },
  45. { title: '操作', key: 'handler', width: 90 },
  46. ];
  47. export default class extends Page {
  48. initState() {
  49. return {
  50. tab: 'data',
  51. sortMap: {},
  52. filterMap: {},
  53. };
  54. }
  55. initData() {
  56. const data = Object.assign(this.state, this.state.search);
  57. if (data.order) {
  58. data.sortMap = { [data.order]: data.direction };
  59. }
  60. data.filterMap = this.state.search;
  61. this.setState(data);
  62. const { tab } = this.state;
  63. switch (tab) {
  64. case 'textbook':
  65. this.refreshTextbook();
  66. break;
  67. case 'examination':
  68. this.refreshExamination();
  69. break;
  70. case 'vip':
  71. this.refreshVip();
  72. break;
  73. case 'cal':
  74. break;
  75. case 'data':
  76. default:
  77. this.refreshData();
  78. break;
  79. }
  80. }
  81. refreshTextbook() {
  82. Main.getService('textbook').then(result => {
  83. this.setState({ service: result });
  84. });
  85. Textbook.getInfo().then(result => {
  86. const { latest } = result;
  87. result.day = parseInt((new Date().getTime() - new Date(result.latest.startDate).getTime()) / 86400000, 10);
  88. result.expireDay =
  89. result.expireTime && parseInt((new Date().getTime() - new Date(result.expireTime).getTime()) / 86400000, 10);
  90. const list = [];
  91. list.push({ subject: 'quant', number: latest.quantNumber, time: latest.quantTime, version: latest.quantVersion });
  92. list.push({ subject: 'rc', number: latest.rcNumber, time: latest.rcTime, version: latest.rcVersion });
  93. list.push({ subject: 'ir', number: latest.irNumber, time: latest.irTime, version: latest.irVersion });
  94. this.setState({ data: result, list });
  95. });
  96. }
  97. textbookHistory({ page, size, subject }) {
  98. Textbook.listHistory({ subject }).then(result => {
  99. this.setState({
  100. updateList: result.map(row => {
  101. row.version = row[`${subject}Version`];
  102. row.content = row[`${subject}Content`];
  103. row.createTime = formatDate(row.createTime, 'YYYY-MM-DD\nHH:mm:ss');
  104. return row;
  105. }),
  106. // 不显示分页
  107. updateTotal: 0,
  108. maxHeight: 730,
  109. updatePage: page,
  110. updateData: { page, size, subject, columns: textbookHistoryColumns, type: 'textbook' },
  111. });
  112. });
  113. }
  114. refreshExamination() {
  115. Main.getService('qx_cat').then(result => {
  116. this.setState({ service: result });
  117. });
  118. Question.getExaminationInfo(result => {
  119. result.expireDay =
  120. result.expireTime && parseInt((new Date().getTime() - new Date(result.expireTime).getTime()) / 86400000, 10);
  121. this.setState({ data: result });
  122. });
  123. }
  124. refreshVip() {
  125. Main.getService('vip').then(result => {
  126. this.setState({ service: result });
  127. });
  128. }
  129. recordList({ page, size, service, isUse, isExpire }) {
  130. Order.listRecord({ page, size, productType: 'service', service, isUse, isExpire }).then(result => {
  131. this.setState({
  132. updateList: result.map(row => {
  133. row.title = ServiceKeyMap[service];
  134. row.source = RecordSourceMap[row.source];
  135. row.handler = (
  136. <a
  137. onClick={() => {
  138. this.open(row.id);
  139. }}
  140. >
  141. 立即开通
  142. </a>
  143. );
  144. row.endTime = `${formatDate(row.endTime, 'YYYY-MM-DD')} 前`;
  145. return row;
  146. }),
  147. updateTotal: result.length,
  148. updatePage: page,
  149. updateData: { page, size, service, isUse, columns: isUse ? [] : openColumns, type: 'record' },
  150. });
  151. });
  152. }
  153. refreshData() {
  154. const dataTypeSelect = DataType.map(row => {
  155. row.title = row.label;
  156. row.key = row.value;
  157. return row;
  158. });
  159. dataTypeSelect.unshift({
  160. title: '全部',
  161. key: '',
  162. });
  163. this.setState({ dataTypeSelect });
  164. Main.dataStruct().then(result => {
  165. const structs = result
  166. .filter(row => row.level === 1)
  167. .map(row => {
  168. row.title = `${row.titleZh}${row.titleEn}`;
  169. row.key = `${row.id}`;
  170. return row;
  171. });
  172. structs.unshift({
  173. title: '全部',
  174. key: '',
  175. });
  176. this.setState({
  177. structs,
  178. });
  179. });
  180. My.listData(Object.assign({}, this.state.search)).then(result => {
  181. result = {
  182. list: [
  183. {
  184. title: '123123',
  185. latestTime: '',
  186. id: 1,
  187. number: 10,
  188. version: '1231',
  189. },
  190. ],
  191. };
  192. this.setState({
  193. list: result.list.map(row => {
  194. row.time = formatDate(row.time, 'YYYY-MM-DD HH:mm:ss');
  195. return row;
  196. }),
  197. total: result.total,
  198. page: this.state.search.page,
  199. });
  200. });
  201. }
  202. dataHistory({ dataId, page, size }) {
  203. My.listDataHistory({ page, size: 10000, dataId }).then(result => {
  204. result.list = result.list.map(row => {
  205. row.time = formatDate(row.time, 'YYYY-MM-DD\nHH:mm:ss');
  206. return row;
  207. });
  208. this.setState({
  209. // 不显示分页
  210. updateTotal: 0,
  211. maxHeight: 730,
  212. updateList: result.list,
  213. updatePage: page,
  214. updateData: { page, size, dataId, columns: dataHistoryColumns, type: 'data' },
  215. });
  216. });
  217. }
  218. onFilter(value) {
  219. this.search(value);
  220. }
  221. onSort(value) {
  222. const { sortMap } = this.state;
  223. const keys = Object.keys(value);
  224. const index = keys.length > 1 && sortMap[keys[0]] ? 1 : 0;
  225. this.search({ order: keys.length ? keys[index] : null, direction: keys.length ? value[keys[index]] : null });
  226. }
  227. onTabChange(tab) {
  228. const data = { tab };
  229. this.refreshQuery(data);
  230. }
  231. submitComment() {
  232. const { comment } = this.state;
  233. My.addComment(comment.channel, comment.position, comment.content).then(() => {
  234. this.setState({ showComment: false, showFinish: true, comment: {} });
  235. });
  236. }
  237. submitFeedbackError() {
  238. const { feedbackError } = this.state;
  239. My.addFeedbackErrorData(
  240. feedbackError.dataId,
  241. feedbackError.title,
  242. feedbackError.position,
  243. feedbackError.originContent,
  244. feedbackError.content,
  245. ).then(() => {
  246. this.setState({ showFinish: true, showFeedbackError: false, feedbackError: {} });
  247. });
  248. }
  249. submitFeedback() {
  250. const { feedback } = this.state;
  251. My.addTextbookFeedback('', feedback.target, feedback.content).then(() => {
  252. this.setState({ showFinish: true, showFeedback: false, feedbackError: {} });
  253. });
  254. }
  255. subscribe(value) {
  256. My.subscribeData(value)
  257. .then(() => {
  258. const { info } = this.props.user;
  259. info.dataEmailSubscribe = value;
  260. User.infoHandle(info);
  261. })
  262. .catch(err => {
  263. asyncSMessage(err.message, 'warn');
  264. });
  265. }
  266. open(recordId) {
  267. Order.useRecord(recordId).then(() => {
  268. asyncSMessage('开通成功');
  269. this.refresh();
  270. });
  271. }
  272. renderView() {
  273. const { config } = this.props;
  274. return <UserLayout active={config.key} menu={menu} center={this.renderDetail()} />;
  275. }
  276. renderDetail() {
  277. const {
  278. tab,
  279. comment = {},
  280. feedback = {},
  281. showComment,
  282. showFinish,
  283. showUpdate,
  284. showFeedback,
  285. updateList,
  286. updateTotal,
  287. maxHeight,
  288. updateData = {},
  289. } = this.state;
  290. return (
  291. <div className="table-layout">
  292. <Tabs
  293. border
  294. type="division"
  295. theme="theme"
  296. size="small"
  297. space={2.5}
  298. width={100}
  299. active={tab}
  300. tabs={[
  301. { key: 'data', title: '资料' },
  302. { key: 'textbook', title: '机经' },
  303. { key: 'examination', title: '模考' },
  304. { key: 'vip', title: 'VIP' },
  305. { key: 'cal', title: '考分计算器' },
  306. ]}
  307. onChange={key => this.onTabChange(key)}
  308. />
  309. {this[`renderTab${tab}`]()}
  310. <Modal
  311. show={showUpdate}
  312. maskClosable
  313. close={false}
  314. body={false}
  315. width={630}
  316. onClose={() => this.setState({ showUpdate: false, updateList: [] })}
  317. >
  318. <UserTable
  319. size="small"
  320. columns={updateData.columns}
  321. data={updateList}
  322. current={updateData.page}
  323. onChange={page => {
  324. updateData.page = page;
  325. if (updateData.type === 'data') {
  326. this.dataHistory(updateData);
  327. } else if (updateData.type === 'textbook') {
  328. this.textbookHistory(updateData);
  329. } else if (updateData.type === 'record') {
  330. this.recordList(updateData);
  331. }
  332. }}
  333. total={updateTotal}
  334. maxHeight={maxHeight}
  335. />
  336. </Modal>
  337. <Modal
  338. show={showComment}
  339. title="评价"
  340. onConfirm={() => comment.content && this.submitComment()}
  341. onCancel={() => this.setState({ showComment: false, comment: {} })}
  342. >
  343. <textarea
  344. value={comment.content}
  345. className="b-c-1 w-10 p-10"
  346. rows={6}
  347. placeholder="您的看法对我们来说很重要!"
  348. onChange={e => {
  349. comment.content = e.target.value;
  350. this.setState({ comment });
  351. }}
  352. />
  353. <div className="b-b m-t-2" />
  354. </Modal>
  355. <Modal
  356. show={showFinish}
  357. title="提交成功"
  358. confirmText="好的,知道了"
  359. btnAlign="center"
  360. onConfirm={() => this.setState({ showFinish: false })}
  361. >
  362. <div className="t-2 t-s-18">
  363. <Icon type="check" className="t-5 m-r-5" />
  364. 您的每一次反馈都是千行进步的动力。
  365. </div>
  366. </Modal>
  367. <Modal
  368. show={showFeedback}
  369. title="反馈"
  370. width={630}
  371. onConfirm={() => this.setState({ showFeedback: false })}
  372. onCancel={() => this.setState({ showFeedback: false })}
  373. >
  374. <div className="t-2 t-s-16 m-b-1">
  375. 机经类别:
  376. <Select
  377. value={feedback.type}
  378. theme="white"
  379. list={[{ title: '数学机经', key: '1' }, { title: '逻辑机经', key: '2' }, { title: '阅读机经', key: '3' }]}
  380. />
  381. 反馈类型:
  382. <Select
  383. value={feedback.cate}
  384. theme="white"
  385. list={[
  386. { title: '纠正解析', key: '1' },
  387. { title: '完善已有机经', key: '2' },
  388. { title: '提供全新机经', key: '3' },
  389. ]}
  390. />
  391. <span hidden={feedback.cate === 3}>
  392. 题号是
  393. <input style={{ width: 80 }} className="m-l-1 b-c-1 t-c" />
  394. </span>
  395. </div>
  396. <div className="t-2 t-s-16">正确的解析和答案应该是:</div>
  397. <textarea
  398. value={comment.content}
  399. className="b-c-1 w-10 p-10"
  400. rows={10}
  401. placeholder={{ 1: '正确的解析和答案是:', 2: '补充内容是:', 3: '新机经是:' }[feedback.cate]}
  402. onChange={e => {
  403. comment.content = e.target.value;
  404. this.setState({ comment });
  405. }}
  406. />
  407. <div className="b-b m-t-2" />
  408. </Modal>
  409. </div>
  410. );
  411. }
  412. renderTabdata() {
  413. const { list = [], filterMap = {}, sortMap = {}, structs, dataTypeSelect, total, page } = this.state;
  414. const { info } = this.props.user;
  415. return (
  416. <div className="tab-1-layout">
  417. <UserAction
  418. selectList={[
  419. {
  420. label: '学科',
  421. key: 'structId',
  422. select: structs,
  423. },
  424. {
  425. label: '资料形式',
  426. key: 'dataType',
  427. select: dataTypeSelect,
  428. },
  429. ]}
  430. sortList={[
  431. { right: true, label: '销量', key: 'sale_number' },
  432. { right: true, label: '更新时间', key: 'latest_time' },
  433. ]}
  434. sortMap={sortMap}
  435. filterMap={filterMap}
  436. onFilter={value => this.onFilter(value)}
  437. onSort={value => this.onSort(value)}
  438. right={
  439. <div className="email">
  440. 邮箱订阅{' '}
  441. <Switch
  442. checked={info.dataEmailSubscribe}
  443. onChange={() => {
  444. this.subscribe(!info.dataEmailSubscribe);
  445. }}
  446. />
  447. </div>
  448. }
  449. />
  450. <div className="data-layout">
  451. {list.map(item => {
  452. return (
  453. <div className="data-item">
  454. <Assets name="sun_blue" src={item.cover} />
  455. <div className="fixed">
  456. <div className="btns">
  457. <Button
  458. size="small"
  459. radius
  460. onClick={() => {
  461. openLink(item.resource);
  462. }}
  463. >
  464. 阅读
  465. </Button>
  466. <div
  467. className="white"
  468. onClick={() => {
  469. openLink(item.resource);
  470. }}
  471. >
  472. 下载
  473. </div>
  474. </div>
  475. </div>
  476. <div className="title">
  477. <span>版本{item.version}</span>
  478. {item.title}
  479. </div>
  480. <div className="date">{formatDate(item.latestTime, 'YYYY-MM-DD HH:mm:ss')}</div>
  481. <More
  482. menu={[
  483. { label: '纠错', key: 'feedback' },
  484. { label: '评价', key: 'comment' },
  485. { label: '更新', key: 'update' },
  486. ]}
  487. onClick={value => {
  488. const { key } = value;
  489. if (key === 'comment') {
  490. this.setState({ showComment: true, comment: { channel: 'course_data', position: item.id } });
  491. } else if (key === 'update') {
  492. this.setState({ showUpdate: true });
  493. this.dataHistory({ dataId: item.id, page: 1, size: 10 });
  494. } else if (key === 'feedback') {
  495. this.setState({ showFeedbackError: true, feedbackError: { dataId: item.id, title: item.title } });
  496. }
  497. }}
  498. />
  499. </div>
  500. );
  501. })}
  502. </div>
  503. {total && list.length > 0 && (
  504. <UserPagination total={total} current={page} onChange={p => this.onChangePage(p)} />
  505. )}
  506. </div>
  507. );
  508. }
  509. renderTabtextbook() {
  510. const { data = {}, list = [], service } = this.state;
  511. const { latest = {}, day } = data;
  512. return (
  513. <div className="tab-2-layout">
  514. <UserAction
  515. left={
  516. <div className="total-log">
  517. <span>最新换库</span>
  518. <span>{latest.startDate ? formatDate(latest.startDate, 'YYYY-MM-DD') : ''}</span>
  519. <span>
  520. 已换库<b>{day}</b>天
  521. </span>
  522. </div>
  523. }
  524. right={
  525. !data.hasService &&
  526. data.unUseRecord && (
  527. <div
  528. className="email"
  529. onClick={() => {
  530. this.recordList({ page: 1, size: 10, service: 'textbook', isUse: false, isExpire: false });
  531. }}
  532. >
  533. 待开通
  534. </div>
  535. )
  536. }
  537. />
  538. {data.hasService && (
  539. <div className="data-layout">
  540. {list.map(item => {
  541. return (
  542. <div className="data-item">
  543. <Assets name="sun_blue" />
  544. <div className="title">
  545. 已更新至<b>{item.num}</b>题
  546. </div>
  547. <div className="date">{item.date}</div>
  548. <More
  549. menu={[
  550. { label: '更新', key: 'update' },
  551. { label: '反馈', key: 'feedback' },
  552. { label: '评价', key: 'comment' },
  553. ]}
  554. onClick={value => {
  555. const { key } = value;
  556. if (key === 'comment') {
  557. this.setState({ showComment: true, comment: { channel: 'library' } });
  558. } else if (key === 'update') {
  559. this.setState({ showUpdate: true });
  560. this.textbookHistory({ page: 1, size: 100, subject: item.subject });
  561. } else if (key === 'feedback') {
  562. this.setState({ showFeedback: true });
  563. }
  564. }}
  565. />
  566. </div>
  567. );
  568. })}
  569. </div>
  570. )}
  571. {!data.hasService && !data.unUseRecord && (
  572. <div className="tip-layout">
  573. <div className="t1">还未购买本月机经</div>
  574. <div className="desc">¥ {service && service.package && service.package[0].price}</div>
  575. <Button radius size="lager" width={150}>
  576. 立即购买
  577. </Button>
  578. </div>
  579. )}
  580. {data.hasService && (
  581. <div className="tip-layout">
  582. <div className="t1">使用中</div>
  583. <div className="t2">距离到期还有 {data.expireDay} 天</div>
  584. </div>
  585. )}
  586. {!data.hasService && data.unUseRecord && (
  587. <div className="tip-layout">
  588. <div className="t2">请于{formatDate(data.unUseRecord.endTime, 'YYYY-MM-DD')}前开通</div>
  589. <Button
  590. radius
  591. size="lager"
  592. width={150}
  593. onClick={() => {
  594. this.open(data.unUseRecord.id);
  595. }}
  596. >
  597. 立即开通
  598. </Button>
  599. </div>
  600. )}
  601. </div>
  602. );
  603. }
  604. renderTabexamination() {
  605. const { data = {}, service } = this.state;
  606. return (
  607. <div className="tab-3-layout">
  608. <UserAction
  609. right={
  610. !data.hasService &&
  611. data.unUseRecord && (
  612. <div
  613. className="email"
  614. onClick={() => {
  615. this.recordList({ page: 1, size: 10, service: 'qx_cat', isUse: false, isExpire: false });
  616. }}
  617. >
  618. 待开通
  619. </div>
  620. )
  621. }
  622. />
  623. {!data.hasService && !data.unUseRecord && !data.expireTime && (
  624. <div className="tip-layout">
  625. <div className="t1">未购买</div>
  626. <div className="desc">¥ {service && service.package && service.package[0].price}</div>
  627. <Button radius size="lager" width={150}>
  628. 立即购买
  629. </Button>
  630. </div>
  631. )}
  632. {!data.hasService && data.unUseRecord && (
  633. <div className="tip-layout">
  634. <div className="t2">请于{formatDate(data.unUseRecord.endTime, 'YYYY-MM-DD')}前开通</div>
  635. <Button
  636. radius
  637. size="lager"
  638. width={150}
  639. onClick={() => {
  640. this.open(data.unUseRecord.id);
  641. }}
  642. >
  643. 立即开通
  644. </Button>
  645. </div>
  646. )}
  647. {data.hasService && (
  648. <div className="tip-layout">
  649. <div className="t1">使用中</div>
  650. <div className="t2">距离到期还有 {data.expireDay} 天</div>
  651. </div>
  652. )}
  653. {!data.hasService && !data.unUseRecord && data.expireTime && (
  654. <div className="tip-layout">
  655. <div className="t3">已过期</div>
  656. <div className="date">
  657. {formatDate(data.startTime, 'YYYY-MM-DD')} ~ {formatDate(data.expireTime, 'YYYY-MM-DD')}
  658. </div>
  659. <div className="desc">¥ {service && service.package && service.package[0].price}</div>
  660. <Button radius size="lager" width={150}>
  661. 立即购买
  662. </Button>
  663. </div>
  664. )}
  665. </div>
  666. );
  667. }
  668. renderTabvip() {
  669. const { data } = this.state;
  670. return (
  671. <div className="tab-4-layout">
  672. {!data.hasService && !data.unUseRecord && !data.expireTime && (
  673. <div className="tip-layout">
  674. <div className="t2">未购买</div>
  675. <Button radius size="lager" width={150}>
  676. 立即购买
  677. </Button>
  678. </div>
  679. )}
  680. {data.hasService && (
  681. <div className="tip-layout">
  682. <div className="t1">使用中</div>
  683. <div className="desc">{formatDate(data.expireTime, 'YYYY-MM-DD')} 到期</div>
  684. <Button radius size="lager" width={150}>
  685. 续费
  686. </Button>
  687. </div>
  688. )}
  689. {!data.hasService && !data.unUseRecord && data.expireTime && (
  690. <div className="tip-layout">
  691. <div className="t1">已过期</div>
  692. <div className="desc">
  693. {formatDate(data.startTime, 'YYYY-MM-DD')} ~ {formatDate(data.expireTime, 'YYYY-MM-DD')}
  694. </div>
  695. <Button radius size="lager" width={150}>
  696. 立即购买
  697. </Button>
  698. </div>
  699. )}
  700. </div>
  701. );
  702. }
  703. renderTabcal() {
  704. const { data = {} } = this.state;
  705. return (
  706. <div className="tab-5-layout">
  707. <TotalSort
  708. value={data.value || 650}
  709. onChange={value => {
  710. data.value = value;
  711. this.setState({ data });
  712. }}
  713. />
  714. </div>
  715. );
  716. }
  717. }