import App from './App'
import { orderMonitor } from './utils/orderMonitor.js'

import uView from "uview-ui";


// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false

// 注册全局订单监控服务
Vue.prototype.$orderMonitor = orderMonitor

App.mpType = 'app'
Vue.use(uView)
const app = new Vue({
  ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  
  // 注册全局订单监控服务到VUE3
  app.config.globalProperties.$orderMonitor = orderMonitor
  
  return {
    app
  }
}
// #endif