xiaozhi-esp32-server/main/manager-web/src/apis/api.js
Erlei Chen bdd18b384b feature:
1.OTA基本能力(固定配置),待优化
2.智能体管理与设备管理对接api,实现流程闭环(已测试)
2025-03-24 09:26:45 +08:00

31 lines
788 B
JavaScript
Executable file
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 引入各个模块的请求
import agent from './module/agent.js'
import device from './module/device.js'
import user from './module/user.js'
/**
* 接口地址
* 当前8002端口接口还没开发完成,暂时用 apifoxmock 接口代替
* 如果你想调用8002端口,就用'/xiaozhi-esp32-api/api/v1',请与vue.config.js的devServer配置相结合,方便跨域请求
*
*/
// const DEV_API_SERVICE = 'https://m1.apifoxmock.com/m1/5931378-5618560-default'
// 8002开发完成完成后使用这个
const DEV_API_SERVICE = '/xiaozhi-esp32-api'
/**
* 根据开发环境返回接口url
* @returns {string}
*/
export function getServiceUrl() {
return DEV_API_SERVICE
}
/** request服务封装 */
export default {
getServiceUrl,
user,
agent,
device
}