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';
// sass
import sassShop from '@/service/sass/shop/index';
import sassOrder from '@/service/sass/order/index';
import sassMember from '@/service/sass/member/index';
import sassPtMember from '@/service/sass/pt-member/index';
import sassFest from '@/service/sass/fest/index';
import sassAuth from '@/service/sass/auth/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,
		// sass
		sassShop,
		sassOrder,
		sassMember,
		sassPtMember,
		sassFest,
		sassAuth
	};

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

	console.log('1111111');
}
