| // 导入axios实例 | 
| import httpRequest from '@/utils/request' | 
| import { ddLogin } from '@/interface' | 
|   | 
| // 测试虚拟登录 | 
| export function testLogin(data: any): Promise<any> { | 
|     return httpRequest({ | 
|         url: '/system/login', | 
|         method: 'post', | 
|         data | 
|     }) | 
| } | 
|   | 
| // 获取微信openId | 
| export function wxLogin(params: any): Promise<any> { | 
|     return httpRequest({ | 
|         url: '/system/wxLogin', | 
|         method: 'get', | 
|         params | 
|     }) | 
| } | 
|   | 
| // 微信端登录 | 
| export function wxAccountLogin(data: any): Promise<any> { | 
|     return httpRequest({ | 
|         url: '/system/wxAccountLogin', | 
|         method: 'post', | 
|         data | 
|     }) | 
| } | 
|   | 
| // 获取企业id | 
| export function getDingdingCorpId(companyId: any): Promise<any> { | 
|     return httpRequest({ | 
|         url: `/dingding/getDingdingCorpId?companyId=${companyId}`, | 
|         method: 'get' | 
|     }) | 
| } | 
|   | 
| // edgp创建企业和同步登录免密登录 | 
| export function edgpLogin({token}: any): Promise<any> { | 
|     return httpRequest({ | 
|         url: `/edgp/login?token=${token}`, | 
|         method: 'post' | 
|     }) | 
| } | 
|   | 
| // edgp创建企业和同步登录免密登录 | 
| export function edgpLoginDemo({token}: any): Promise<any> { | 
|     return httpRequest({ | 
|         url: `/edgp/loginDemo?token=${token}`, | 
|         method: 'post' | 
|     }) | 
| } | 
|   | 
| // 羚羊免密登录(体验) | 
| export function lingyangLogin({token}: any): Promise<any> { | 
|     return httpRequest({ | 
|         url: `/lingyang/login?token=${token}`, | 
|         method: 'post' | 
|     }) | 
| } | 
|   | 
| // 羚羊免密登录(体验) | 
| export function lingyangLoginDemo({token}: any): Promise<any> { | 
|     return httpRequest({ | 
|         url: `/lingyang/loginDemo?token=${token}`, | 
|         method: 'post' | 
|     }) | 
| } | 
|   | 
| // 菜单数据 | 
| export function getTreeList(params: {type: number, moduleId?: string}): Promise<any> { | 
|     return httpRequest({ | 
|         url: 'system/menu/treeNodes', | 
|         method: 'get', | 
|         params | 
|     }) | 
| } | 
|   | 
| // 钉钉免登录 | 
| export function ddLogin(data: ddLogin): Promise<any> { | 
|     return httpRequest({ | 
|         url: `/dingding/ddLogin?code=${data.code}&companyId=${data.companyId}`, | 
|         method: 'post' | 
|     }) | 
| } | 
|   | 
| // 获取当前登录用户信息 | 
| export function getUserInfo(): Promise<any> { | 
|     return httpRequest({ | 
|         url: '/system/getUserInfo', | 
|         method: 'get' | 
|     }) | 
| } | 
|   | 
| // 查询当前用户所有主组织下的工序 | 
| export function getWorkingProcedure(data: any): Promise<any> { | 
|     return httpRequest({ | 
|         url: '/ext/proceduresExt/productesGroup', | 
|         method: 'post', | 
|         data | 
|     }) | 
| } | 
|   | 
| // 组织类型 0公司 1工厂 2部门 3班组 4平台组织,示例值(1) | 
| export function getOrganization(data: any): Promise<any> { | 
|     return httpRequest({ | 
|         url: '/ext/departmentExt/getDepartmentListByConditon', | 
|         method: 'post', | 
|         data | 
|     }) | 
| } | 
|   | 
| // 获取上传字典值 | 
| export function queryListByCode(params: any): Promise<any> { | 
|     return httpRequest({ | 
|         url: '/system/dictData/queryListByCode', | 
|         method: 'get', | 
|         params | 
|     }) | 
| } | 
|   | 
| // 上传文件 | 
| export function uploadFiles(data: any): Promise<any> { | 
|     return httpRequest({ | 
|         url: '/ext/routeCardExt/upload', | 
|         method: 'post', | 
|         data | 
|     }) | 
| } | 
|   | 
| // 查询当前主组织下所有数据 | 
| export function queryAllData(data: any): Promise<any> { | 
|     return httpRequest({ | 
|         url: 'ext/warehouseExt/queryAllData', | 
|         method: 'post', | 
|         data | 
|     }) | 
| } | 
|   | 
| // 物料分页查询 | 
| export function materialPage(data: any): Promise<any> { | 
|     return httpRequest({ | 
|         url: 'ext/materialExt/page', | 
|         method: 'post', | 
|         data | 
|     }) | 
| } | 
|   | 
| // 物料分页查询 | 
| export function materialExt(id: any): Promise<any> { | 
|     return httpRequest({ | 
|         url: `ext/materialExt/${id}`, | 
|         method: 'get' | 
|     }) | 
| } |