import { createApp } from 'vue'
import { close } from '/src/helpers/loading'
import { formatZoom } from '/src/helpers/utils'
import '../colexiu/lib-flexible'
import 'animate.css'
import 'vant/lib/index.css'
import '../colexiu/app.css'
import '../../base.css'

import App from './index'
import { promisefiyPostMessage } from '/src/helpers/native-message'

document.body.style.setProperty('--osdm-zoom', '' + formatZoom())

// 获取token
promisefiyPostMessage({ api: 'getToken' }).then((res: any) => {
  console.log('获取token', res)
  if (res?.content?.accessToken) {
    sessionStorage.setItem('Authorization', res.content.tokenType + ' ' + res.content.accessToken)
  }
})
close()
createApp(App).mount('#app')
