// #ifndef VUE3
import Vue from 'vue'
import App from './App'
import store from './store'
import {
	ApiToClient
} from "./grpc/track_offical_grpc_web_pb.js"

Vue.config.productionTip = false

App.mpType = 'app'

// 建立grpc连接服务 

// 测试版
// let client = new ApiToClient("http://192.168.0.3:10000", null, null)

// 正式版
let client = new ApiToClient("http://otapi.beswell.com:10000", null, null)

// 挂载为全局方法 
Vue.prototype.$client = client

// #ifdef APP-PLUS

// import { usqlite } from '@/uni_modules/onemue-USQLite/js_sdk/usqlite.js'
import SqliteHelper from './utils/SqliteHelper.js'
import nfc from './utils/ouu-nfc.js'

Vue.prototype.$store = store
Vue.prototype.$dbHelper = SqliteHelper
Vue.prototype.$nfc = nfc
nfc.listenNFCStatus();

// #endif

// #ifdef H5

// 提交前需要注释  本地调试使用
// const vconsole = require('vconsole')
// Vue.prototype.$vconsole = new vconsole() // 使用vconsole

import IndexedDB from '@/utils/IndexedDB'
Vue.prototype.$dbHelper = IndexedDB

// #endif

const app = new Vue({
	store,
	...App
})
app.$mount()
// #endif

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