import App from './App'
// import {post} from "http/request.post.js"
import store from './store'
import util from './common/util.js'
// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
	store,
    ...App
})

Vue.prototype.$toast = function(msg, callback = false) {
	uni.showToast({
		icon: 'none',
		title: msg,
	})
	if (callback !== false) {
		setTimeout(() => {
			callback()
		}, 2000)
	}
}
Vue.prototype.$showLoadding = function(msg, callback = false) {
	uni.showLoading({
		title:msg,
		mask:true
	})
	if (callback !== false) {
		setTimeout(() => {
			callback()
		}, 2000)
	}
}
Vue.prototype.$back = function() {
	uni.navigateBack({
		delta: 1
	})
}
Vue.prototype.$util = util;
import uView from "uview-ui";
Vue.use(uView)
uni.$u.config.unit = 'rpx'
// Vue.prototype.request=post
require('./http/request.js')(app)
app.$mount()
// #endif

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


// app.$mount()