import App from './App'
// import audio from "./common/audio.js";

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

Vue.config.productionTip = false

// 卡片配置来源 server:服务器获取 local:本地获取
if (process.env.NODE_ENV === 'development') { // 开发版
	Vue.prototype.$cardconfigType = "server";
	// Vue.prototype.$cardconfigType = "local";
} else {
	Vue.prototype.$cardconfigType = "server";
}

// Vue.prototype.$audio = audio;

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


// #ifdef VUE3
import {
	createSSRApp
} from 'vue'

export function createApp() {
	const app = createSSRApp(App)

	// 卡片配置来源 server:服务器获取 local:本地获取
	if (process.env.NODE_ENV === 'development') { // 开发版
		app.config.globalProperties.$cardconfigType = "server";
		// app.config.globalProperties.$cardconfigType = "local";
	} else {
		app.config.globalProperties.$cardconfigType = "server";
	}

	// app.config.globalProperties.$audio = audio;

	return {
		app
	}
}
// #endif