'use strict';

import React from 'react';
import { observer } from 'mobx-react';
import './posterpop.less';
import { makeQrcode } from "@spark/api-common";
@observer
class Posterpop extends React.Component {
  constructor(props) {
    super(props);
    
  }
  async componentDidMount() {
    // https://98570-activity.m.dexfu.cn/projectx/p6534784b/index.html?appKey=2vujqg1MJ4A4vogq9e22RzTa7C8S&openBs=openbs&appID=98570
    let url = location.origin + "/projectx/"+CFG.projectId+"/index.html?appKey=2vujqg1MJ4A4vogq9e22RzTa7C8S&openBs=openbs&appID="+CFG.appID;
    const qrcodeSrc = await makeQrcode(url);
    console.info(qrcodeSrc);
  }
  render() {
    return (
      <div className="posterpop modal_center">
        <div className="poster">
          <span className="posteriimg"></span>
        </div>
        <span className="tips"></span>
      </div>
    );
  }
}
export default Posterpop;
