lex před 2 roky
rodič
revize
c554146652

+ 2 - 0
src/helpers/utils.ts

@@ -20,6 +20,8 @@ export const browser = () => {
       u.indexOf('COLEXIUAPPI') > -1 ||
       u.indexOf('COLEXIUAPPA') > -1 ||
       u.indexOf('Adr') > -1,
+    isTeacher: u.indexOf('COLEXIUTEACHER') > -1,
+    isStudent: u.indexOf('COLEXIUSTUDENT') > -1,
     iPad: u.indexOf('iPad') > -1, //是否iPad
     webApp: u.indexOf('Safari') == -1, //是否web应该程序,没有头部与底部
     weixin: u.indexOf('MicroMessenger') > -1, //是否微信 (2015-01-22新增)

+ 8 - 1
src/student/main.ts

@@ -10,6 +10,7 @@ import 'normalize.css'
 
 import '../styles/index.less'
 import { state } from '@/state'
+import { browser } from '@/helpers/utils'
 
 const app = createApp(App)
 
@@ -25,7 +26,13 @@ postMessage(
   }
 )
 
-state.platformType = 'STUDENT'
+if (browser().isTeacher) {
+  state.platformType = 'TEACHER'
+} else if (browser().isStudent) {
+  state.platformType = 'STUDENT'
+} else {
+  state.platformType = 'STUDENT'
+}
 
 dayjs.locale('zh-ch')
 app.config.globalProperties.$dayjs = dayjs

+ 1 - 1
src/styles/index.less

@@ -155,7 +155,7 @@ body {
 
 .van-sticky--fixed {
   position: fixed;
-  z-index: 9999;
+  z-index: 1999;
 }
 
 :root {

+ 8 - 1
src/teacher/main.ts

@@ -10,6 +10,7 @@ import 'normalize.css'
 
 import '../styles/index.less'
 import { state } from '@/state'
+import { browser } from '@/helpers/utils'
 
 const app = createApp(App)
 
@@ -37,7 +38,13 @@ postMessage(
 
 // import Vconsole from 'vconsole'
 // const vconsole = new Vconsole()
-state.platformType = 'TEACHER'
+if (browser().isTeacher) {
+  state.platformType = 'TEACHER'
+} else if (browser().isStudent) {
+  state.platformType = 'STUDENT'
+} else {
+  state.platformType = 'TEACHER'
+}
 
 dayjs.locale('zh-ch')
 app.config.globalProperties.$dayjs = dayjs

+ 2 - 1
src/teacher/share-page/share-live/index.tsx

@@ -87,7 +87,8 @@ export default defineComponent({
         } else if (state.platformType === 'TEACHER') {
           Dialog.alert({
             title: '提示',
-            message: '请使用酷乐秀学生端扫码打开'
+            message: '请使用酷乐秀学生端扫码打开',
+            confirmButtonColor: '#2dc7aa'
           }).then(() => {
             postMessage({ api: 'back' })
           })

+ 2 - 1
src/teacher/share-page/share-video/index.tsx

@@ -48,7 +48,8 @@ export default defineComponent({
         } else if (state.platformType === 'TEACHER') {
           Dialog.alert({
             title: '提示',
-            message: '请使用酷乐秀学生端扫码打开'
+            message: '请使用酷乐秀学生端扫码打开',
+            confirmButtonColor: '#2dc7aa'
           }).then(() => {
             postMessage({ api: 'back' })
           })