|
@@ -7,7 +7,7 @@ import 'normalize.css'
|
|
|
import Vue3Lottie from 'vue3-lottie'
|
|
|
import 'vue3-lottie/dist/style.css'
|
|
|
import '../styles/index.less'
|
|
|
-import { promisefiyPostMessage } from '@/helpers/native-message'
|
|
|
+import { promisefiyPostMessage, postMessage } from '@/helpers/native-message'
|
|
|
import { setAuth } from './music-group/layout/utils'
|
|
|
import { browser } from '@/helpers/utils'
|
|
|
import { state } from '@/state'
|
|
@@ -21,6 +21,20 @@ promisefiyPostMessage({ api: 'getToken' }).then((res: any) => {
|
|
|
}
|
|
|
})
|
|
|
|
|
|
+
|
|
|
+// 设置是否显示导航栏 0 不显示 1 显示
|
|
|
+postMessage({ api: 'setBarStatus', content: { status: 0 } })
|
|
|
+// 导航栏高度
|
|
|
+postMessage({ api: 'getNavHeight' }, (res) => {
|
|
|
+ const { content } = res as any
|
|
|
+ const dpi = content.dpi || 2
|
|
|
+ if (content.navHeight) {
|
|
|
+ const navHeight = content.navHeight / dpi
|
|
|
+ console.log(navHeight, 'navHeight')
|
|
|
+ state.navBarHeight = navHeight
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
const paymentType = (window as any).paymentType // 浏览器设置
|
|
|
if (browser().isTeacher || paymentType === 'TEACHER') {
|
|
|
state.platformType = 'TEACHER'
|