import Vue from 'vue'
import App from './App'
import api from '@/common/api/api.js'
import {post,get,DELETE,put} from "@/common/api/request.js"
import config from "@/common/api/config.js"
import store from "@/store/index"
Vue.config.productionTip = false
App.mpType = 'app'
// main.js
import uView from 'uview-ui';
import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue";
import MescrollUni from "@/components/mescroll-uni/mescroll-uni.vue";
Vue.use(uView);
Vue.component('mescroll-body', MescrollBody);
Vue.component('mescroll-uni', MescrollUni);
const tui = {
	toast: function(text, duration, success) {
		uni.showToast({
			title: text,
			icon: success ? 'success' : 'none',
			duration: duration || 2000
		})
	}
}
Vue.prototype.$api = api;
Vue.prototype.$post = post;
Vue.prototype.$get = get;
Vue.prototype.$DELETE = DELETE;
Vue.prototype.$put = put;
Vue.prototype.$config = config;
Vue.prototype.$tui = tui;
Vue.prototype.$store = store;
const app = new Vue({
	...App
})
app.$mount()
