123456789101112131415161718192021222324252627282930 |
- import React from 'react';
- import './index.less';
- import Page from '@src/containers/Page';
- import { asyncSMessage } from '@src/services/AsyncTools';
- import { Main } from '../../../stores/main';
- export default class extends Page {
- constructor(props) {
- super(props);
- this.state = { courseIndex: 0 };
- }
- initData() {
- const { key } = this.params;
- Main.getContract(key)
- .then(result => {
- this.setState({ data: result });
- })
- .catch(e => {
- asyncSMessage(e.message, 'error');
- linkTo('empty');
- });
- }
- renderView() {
- const { data = {} } = this.state;
- return <div dangerouslySetInnerHTML={{ __html: data.content || '' }} />;
- }
- }
|