import React, { Component } from 'react';
import './homePage.less';
import { _throttle } from '../../utils/utils';
import skinStore from '../../store/newSkin';
import Toast from '../../components/toast';
import store, { skinId } from '../../store';
import { PAGE_MAP } from '../../utils/constants';
import { observer } from 'mobx-react';
import { sensorMdClick, sensorMdExpouse } from '../../utils/sensorMd';
import modalStore from '../../store/modal';
@observer
class HomePage extends Component {
  constructor(props) {
    super(props);

  }

  componentDidMount() {
    sensorMdExpouse("xcxPage", { pageName: `首页` })
    store.getIndexInfo();
    // modalStore.pushPop("WanLiuDialog")
  }

  beginBtnFun() {
    sensorMdClick("xcxClick", { pageName: `首页`, buttonName: '开始测试' })
    const flag = store.checkActivityStatus();
    if (!flag) return;
    store.joinActivity();
  }
  render() {
    return (
      <div className="homePage modal_center">
        <div className="bg" style={{ 'backgroundImage': `url(${skinStore.homeJs.homeBg})` }}></div>
      </div>
    );
  }
}

export default HomePage;
