// #ifndef VUE3
import Vue from 'vue'
import App from './App'
import navBar from '@/components/navBar/index.vue'

Vue.component('navBar', navBar)

import popup from '@/components/popup/index.vue'
Vue.component('dpopup', popup)

import uView from '@/uni_modules/uview-ui'
Vue.use(uView)



import store from 'store/index.js'
Vue.prototype.$store = store



// console.log('uploadUrl----', uploadUrl);
import uploadUrl from '@/common/config.js'
Vue.prototype.$picUrl = uploadUrl.picUrl
Vue.prototype.$picBase = uploadUrl.picBase

Vue.prototype.$appId = uploadUrl.appId
Vue.prototype.$shareType = uploadUrl.shareModel

Vue.prototype.$getCutDown = () => {
	if (uni.getStorageSync('switchs')[0]) {
		return 1
	} else if (uni.getStorageSync('switchs')[1]) {
		return uni.getStorageSync('priceConfig').member_price
	} else if (uni.getStorageSync('switchs')[2]) {
		return uni.getStorageSync('priceConfig').vip_price
	}
}


// 常见功能函数封装
Vue.prototype.$toast = (title, icon = "none", duration = 1500) => {
	uni.showToast({
		title,
		icon,
		duration
	})
}



// 引入请求封装 
require('./utils/request/index')(app)


Vue.config.productionTip = false


App.mpType = 'app'

const app = new Vue({
	...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