import Vue from "vue";
import Vuex from "vuex";
import App from "./App.vue";
import router from "./router";
import axios from './utils/request' 
import { FileServicePlugin  } from './utils/file';
// 注册插件
Vue.use(FileServicePlugin , {
  baseUrl: 'http://wcy111.top:35001' // 可选，API基础URL
});
import { Tabbar, TabbarItem } from "vant";
import { NavBar } from "vant";
import { Toast } from "vant";
import { Popup } from "vant";
import { Icon } from "vant";
import { Button } from "vant";
import { Image as VanImage } from "vant";
import { Lazyload } from "vant";
import { Card } from "vant";
import { Tag } from "vant";
import { Swipe, SwipeItem } from 'vant';
import { Loading } from 'vant';
import { NoticeBar } from 'vant';
import { Sticky } from 'vant';
import { Tab, Tabs } from 'vant';
import { List } from 'vant';
import { Overlay } from 'vant';
import { Form } from 'vant';
import { Field } from 'vant';
import { Uploader } from 'vant';
import { Dialog } from 'vant';
import { Picker } from 'vant';
import { DropdownMenu, DropdownItem } from 'vant';
import { Checkbox, CheckboxGroup } from 'vant';
import { Cell, CellGroup } from 'vant';
import { Divider } from 'vant';

Vue.use(Divider);
Vue.use(Cell);
Vue.use(CellGroup);
Vue.use(Checkbox);
Vue.use(CheckboxGroup);
Vue.use(DropdownMenu);
Vue.use(DropdownItem);
Vue.use(Picker);
// 全局注册
Vue.use(Dialog);
Vue.use(Uploader);
Vue.use(Form);
Vue.use(Field);
Vue.use(Overlay);
Vue.use(List);
Vue.use(Tab);
Vue.use(Tabs);
Vue.use(Sticky);
Vue.use(NoticeBar);
Vue.use(Loading);
Vue.use(Swipe);
Vue.use(SwipeItem);
Vue.use(Tag);
Vue.use(Card);
Vue.use(Lazyload);
Vue.use(VanImage);
Vue.use(Button);
Vue.use(Icon);
Vue.use(Popup);
Vue.use(Toast);
Vue.use(NavBar);
Vue.use(Tabbar);
Vue.use(TabbarItem);
Vue.use(Vuex);
Vue.config.productionTip = false;

// 全局挂载 axios
Vue.prototype.$axios = axios
Vue.prototype.$dialog = Dialog;
new Vue({
  router,
  render: (h) => h(App),
}).$mount("#app");
