import {
	postJ,
	post,
	get
} from "@/utils/request";
import Vue from "vue";


// 获取字典
export async function getByCode(code) {
	const data = await get(
		Vue.prototype.apiUrl + `/system/dict/getByCode/${code}`,
	);
  if (data.code == 0) {
    return data.data;
  }
  return Promise.reject(data.message);
}


// 查询菜单列表

export async function getResourcesTree() {
	const data = await get(
		Vue.prototype.apiUrl + `/system/resources/getResourcesTreePDA`,
	);
  if (data.code == 0) {
    return data.data;
  }
  return Promise.reject(data.message);
}





