import Vue from 'vue';

import common from '@/service/common/index';
import system from '@/service/system/index';
import test from '@/service/test/index';
import order from '@/service/order/index';
import member from '@/service/member/index';
import goods from '@/service/goods/index';
import level from '@/service/level/index';
import category from '@/service/category/index';
import imgStore from '@/service/img-store/index';
import invite from '@/service/invite/index';
import coupon from '@/service/coupon/index';
import ad from '@/service/ad/index';
import staff from '@/service/staff/index';
import role from '@/service/role/index';
import single from '@/service/single/index';
import setting from '@/service/setting/index';
import workbench from '@/service/workbench/index';
import auth from '@/service/auth/index';
import saasShop from '@/service/saas/shop/index';
import saasOrder from '@/service/saas/order/index';
import saasMember from '@/service/saas/member/index';
import saasPtMember from '@/service/saas/pt-member/index';
import saasFest from '@/service/saas/fest/index';
import saasAuth from '@/service/saas/auth/index';
import saasWxOpen from '@/service/saas/wx-open/index';
import shop from '@/service/shop/index';
import chat from '@/service/chat/index';
import sj from '@/service/sj/index';
import itemClass from '@/service/item-class/index';
import item from '@/service/item/index';
import unit from '@/service/unit/index';
import merchant from '@/service/merchant/index';
import shopAdmin from '@/service/shop-admin/index';
import shopCapital from '@/service/shop-capital/index';
import cash from '@/service/deposit/index';
import ptYeChange from '@/service/assets/ptYeChange/index';
import ptAsset from '@/service/ptAsset/index';

export function SET_SERVICE({ store }) {
	// const files = require.context('@/service/', true, /\.js$/);
	// const ignore = ['./request.js'];

	let modules = {
		common,
		system,
		test,
		order,
		member,
		goods,
		level,
		category,
		imgStore,
		invite,
		coupon,
		ad,
		staff,
		role,
		single,
		setting,
		workbench,
		auth,
		saasShop,
		saasOrder,
		saasMember,
		saasPtMember,
		saasFest,
		saasAuth,
		saasWxOpen,
		shop,
		chat,
		sj,
		itemClass,
		item,
		unit,
    merchant,
    shopAdmin,
	shopCapital,
    cash,
	ptYeChange,
	ptAsset
	};

	Vue.prototype.$service = modules;
	store.$service = modules;
}
