import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'

// 引入全局uView
import uView from '@/uni_modules/uview-ui'
import {broadcastScan} from '@/static/js/scanCode'
import api from '@/static/js/http'
import * as Util from "@/static/js/public.js";

import dir from '@/static/js/directive'
Vue.directive('preventReClick', dir.preventReClick)
//全局注入文件,方便在各个功能中直接使用
Vue.prototype.$broadcastScan=broadcastScan
Vue.config.productionTip = false
Vue.prototype.$api = api
Vue.prototype.$util = Util;
App.mpType = 'app'
const app = new Vue({
  ...App
})

app.$mount()
Vue.use(uView)


// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif