Commit 488c94d8 by chenshu

fix:屏蔽mac客户端下载

parent 3c7560a2
/* /*
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-07-14 15:42:24 * @Date: 2020-07-14 15:42:24
* @Last Modified by: 吴文洁 * @Last Modified by: chenshu
* @Last Modified time: 2020-07-23 14:35:28 * @Last Modified time: 2021-04-12 14:00:09
* @Description: 大班直播、互动班课的操作区 * @Description: 大班直播、互动班课的操作区
*/ */
...@@ -15,7 +15,11 @@ import User from '@/common/js/user' ...@@ -15,7 +15,11 @@ import User from '@/common/js/user'
class LiveCourseOpt extends React.Component { class LiveCourseOpt extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = {
isMac: /macintosh|mac os x/i.test(navigator.userAgent),
}
} }
handleCreateLiveCouese = ()=>{ handleCreateLiveCouese = ()=>{
window.RCHistory.push({ window.RCHistory.push({
pathname: '/create-live-course?type=add', pathname: '/create-live-course?type=add',
...@@ -23,12 +27,12 @@ class LiveCourseOpt extends React.Component { ...@@ -23,12 +27,12 @@ class LiveCourseOpt extends React.Component {
} }
// 下载直播客户端 // 下载直播客户端
handleDownloadClient = () => { handleDownloadClient = () => {
const isMac = /macintosh|mac os x/i.test(navigator.userAgent); const { isMac } = this.state;
// 判断用户系统 // 判断用户系统
let platform; let platform;
if(!isMac){ if(!isMac){
platform = 1 platform = 1
}else{ } else {
platform = 4 platform = 4
} }
BaseService BaseService
...@@ -49,7 +53,7 @@ class LiveCourseOpt extends React.Component { ...@@ -49,7 +53,7 @@ class LiveCourseOpt extends React.Component {
{ userRole !== "CloudLecturer" && { userRole !== "CloudLecturer" &&
<Button type="primary" onClick={this.handleCreateLiveCouese}>新建直播课</Button> <Button type="primary" onClick={this.handleCreateLiveCouese}>新建直播课</Button>
} }
<Button onClick={this.handleDownloadClient}>下载直播客户端</Button> {!this.state.isMac && <Button onClick={this.handleDownloadClient}>下载直播客户端</Button>}
</div> </div>
</div> </div>
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment