| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- import { createApp } from 'vue'
- import App from './App.vue'
- import dayjs from 'dayjs'
- import 'dayjs/locale/zh-cn'
- import router from '../router/index-teacher'
- import vueFilter from '@/helpers/vueFilter'
- import { postMessage } from '@/helpers/native-message'
- import 'normalize.css'
- import '../styles/index.less'
- import { state } from '@/state'
- import { browser } from '@/helpers/utils'
- const app = createApp(App)
- // 将selects全局混入当前vue实例中
- // import activeButtonIcon from '@/common/images/icon_check.png';
- // import inactiveButtonIcon from '@/common/images/icon_default.png';
- // app.mixin({
- // data() {
- // return {
- // activeButtonIcon: activeButtonIcon,
- // inactiveButtonIcon: inactiveButtonIcon,
- // };
- // }
- // });
- postMessage(
- {
- api: 'getVersion'
- },
- (res: any) => {
- state.version = res.content.version
- console.log(res, 'version')
- }
- )
- // import Vconsole from 'vconsole'
- // const vconsole = new Vconsole()
- 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
- app.config.globalProperties.$filters = vueFilter
- app.use(router)
- app.mount('#app')
|