import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
import uView from '@/uni_modules/uview-ui'

import mixinsConfig from '@/mixins/config.js'
// #ifdef MP-WEIXIN
import share from '@/mixins/share.js' // 导入并挂载全局的分享方法
// #endif

import store from "@/store/index.js"
import wskj_function from "@/common/wskj_function.js"
import request from "@/common/request.js"
import config from "@/config.js"
import api from "@/config/api.js";

import emptydata from "@/components/emptydata"
import comment from "@/components/comment"
import goodslist from "@/components/goodslist"
import wskjmodal from "@/components/wskj-modal"
import wskjpopup from "@/components/wskj-popup"
import uploadimage from "@/components/upload-image"
import wskjmodelclose from "@/components/wskj-model-close"


// 全局组件
Vue.component("emptydata", emptydata)
Vue.component("comment", comment)
Vue.component("goodslist", goodslist)
Vue.component("wskj-modal", wskjmodal)
Vue.component("wskj-popup", wskjpopup)
Vue.component("upload-image", uploadimage)
Vue.component("wskj-model-close", wskjmodelclose)

// 全局混入
// #ifdef MP
Vue.mixin(mixinsConfig) // 混入用于在组件中可使用
// #endif

// #ifdef MP-WEIXIN
Vue.mixin(share) // 全局分享
// #endif



Vue.use(uView)


Vue.prototype.$wskj = wskj_function
Vue.prototype.$request = request
Vue.prototype.$store = store

Vue.prototype.$api = api;
Vue.prototype.$config = config;
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
	store,
	...App
})
app.$mount()
// #endif

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