// /** // * 匿名加入会议(菜单栏中的免费加入) // */ // import React, { Component } from "react"; // import { connect } from "dva"; // import { Form, message, Button, Spin, Tabs, Input } from "antd"; // import options from "../SDK/config"; // import "../SDK/cloudecExtend"; // import { // minFormItemLayout, // minSubmitFormLayout, // } from "../../../constants/formItemLayout"; // import "../meeting.less"; // import initial from "../SDK/initialClient"; // const { TabPane } = Tabs; // global.canInitLogin = function () { // window.canInitLoginState = true; // }; // @connect((state) => ({ // client: state.client.client, // loginStatus: state.client.loginStatus, // comName: state.global.companyInfo.comName, // currentConferTopic: state.client.currentConferTopic, // userName: state.user.currentUser.name, // joinMeetingStatus: state.client.joinMeetingStatus, // })) // @Form.create() // export default class AnonymousJoin extends Component { // constructor(props, context) { // super(props, context); // this.state = { // client: null, // options: options, // updateMeetListState: false, // joinMeetingStatus: this.props.joinMeetingStatus, // }; // } // componentDidMount() { // //浏览器打开多个页面(关闭之前的页面,只能留一个页面) // window.addEventListener("storage", function () { // window.location.href = "about:blank"; // window.close(); // }); // if (!this.props.client) { // // this.initial(); // const client = initial.call(this); // this.setState({ // client, // }); // } else { // //已经存在 // this.setState({ // client: this.props.client, // }); // } // //匿名不能登录,所以有登录的时候,要先退出来 // if (this.props.loginStatus) { // this.props.client.logout(); // this.props.dispatch({ // type: `client/setLogin`, // payload: { // loginStatus: false // } // }); // } // } // componentWillReceiveProps(nextProps) { // if (nextProps.joinMeetingStatus !== this.state.joinMeetingStatus) { // this.setState({ // joinMeetingStatus: nextProps.joinMeetingStatus, // }); // } // } // getAttendeeList() { // const _this = this; // this.props.client.getAttendeeList(function (ret) { // if (ret.result) { // _this.props.dispatch({ // type: `client/setAttenList`, // payload: { // attenList: ret.info, // }, // }); // } // if (window.setHweiMeeingNickname) { // _this.props.client.renameSelf(window.setHweiMeeingNickname); // } // window.setHweiMeeingNickname = null; // }); // } // //匿名加入会议 // handleSubmit() { // if (window.canInitLoginState) { // this.props.form.validateFields((err, values) => { // if (!err) { // this.props.dispatch({ // type: `client/setJoinMeetingStatus`, // payload: { // joinMeetingStatus: true, // }, // }); // var anonymousConfParam = { // confId: values.conferenceId.trim(), // confPasswd: // values.confPasswd === undefined // ? values.confPasswd // : values.confPasswd.trim(), // displayName: values.nickname, // // callType: 1 // }; // var serverInfo = { // serverAddress: "bmeeting.huaweicloud.com", // serverPort: 443, // }; // // window.setHweiMeeingNickname = values.nickname; // this.props.client.joinAnonymousConf( // anonymousConfParam, // serverInfo, // function callback(ret) { // console.log(ret); // } // ); // } // }); // } else { // message.warning( // "您还未正确安装插件,不能使用,请按照步骤完成插件下载与安装" // ); // } // } // render() { // const { getFieldDecorator } = this.props.form; // const { joinMeetingStatus } = this.state; // return ( //
// // // //
// // {getFieldDecorator("conferenceId", { // rules: [{ required: true, message: "请输入会议ID" }], // })()} // // // {getFieldDecorator( // "confPasswd", // {} // )()} // // // 提示:请输入姓名+公司名称 // // } // > // {getFieldDecorator("nickname", { // initialValue: // this.props.userName + "+" + this.props.comName, // })()} // // // // //
//
//
//
//
// ); // } // }