
// 正式环境
const apiurl = 'http://xzapp.runpengsoft.com';
const install = (Vue, vm) => {
	// 图片域名链接--正式环境
	let imgurl = 'http://xzapp.runpengsoft.com';
	
	// 获取验证码
	let sendSms = (params = {}) => vm.$u.post('/api/sendSms',params);
	
	// 登录
	let login = (params = {}) => vm.$u.post(`/api/login`, params);
	
	// body 中传参数
	// let login = (data = {}, params = {}) => vm.$u.post(`/api/login`, params);
	
	//用户删除
	let removeUserNew = (params = {}) => vm.$u.delete(`/uc/api/userInfo/v1/?ids=${params}`);
	let saveUserBaseInfoPC = (params = {}) => vm.$u.put(`/uc/api/userInfo/v1/`,params);
	let addEquipment= (params = {}) => vm.$u.post(`/server/ywgl/equipment/v1/`,params);
	let getDepartOrTeamDetail= (params = {}) => vm.$u.get(`/server/ywgl/orgExt/v1/org/${params}`);
	let employeeList=(params = {}) => vm.$u.post(`/server/ywgl/relevant/v1/employee/list?${params}`,);
	// 将各个定义的接口名称，统一放进对象挂载到vm.$u.api(因为vm就是this，也即this.$u.api)下
	vm.$u.api = {
		imgurl,
		sendSms,
		login,
		removeUserNew,
		saveUserBaseInfoPC,
		addEquipment,
		getDepartOrTeamDetail,
		employeeList
	};
}

export default {
	apiurl,
	install
}
