Browse Source

加入老师才能退出

lan 2 years ago
parent
commit
99828d403a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      assets/script/ui/public/TopBtnUI.ts

+ 2 - 1
assets/script/ui/public/TopBtnUI.ts

@@ -37,7 +37,8 @@ export default class TopBtnUI extends BaseUI {
         let conNode = cc.find('layout/main_classset/con', this.node)
         conNode.active = Data.child.isTeacher ? Data.child.socketServerStarted : Data.child.websocketCon
         cc.find('layout/main_classset/cut', this.node).active = !conNode.active
-        cc.find('layout/main_exit', this.node).active = conNode.active && Mgr.platform.isAndroid()
+        cc.find('layout/main_exit', this.node).active =
+            Data.child.isTeacher && conNode.active && Mgr.platform.isAndroid()
     }
     @render
     initRoleIcon() {