import api from './api'
import store from './store'
import config from './config'

import route from '@/utils/route'
import index from '@/utils/index'
import test from '@/utils/test'
import tool from '@/utils/tool.js'
import * as loading from '@/utils/loading'

const $u = {
	route: route,
    test,
	tool,
	config,
	...index
}

uni.$u = $u

export default {
	install (app) {
		app.config.globalProperties.$config = config
		app.config.globalProperties.$api = api
		app.config.globalProperties.$store = store
        app.config.globalProperties.$tool = tool;
        app.config.globalProperties.$loading = loading;
        app.config.globalProperties.$u = $u;
	}
}
