Files
xiaozhi-esp32-server/main/manager-web/src/apis/api.js
T

25 lines
503 B
JavaScript
Raw Normal View History

2025-03-07 10:01:20 +08:00
// 引入各个模块的请求
import user from './module/user.js'
2025-03-07 21:19:41 +08:00
2025-03-07 10:01:20 +08:00
/**
* 接口地址
* 在开发阶段,如果地址写的是相对路径,请与vue.config.js的devServer配置相结合,方便跨域请求
*
*/
const DEV_API_SERVICE = 'https://apifoxmock.com/m1/5931378-5618560-default'
/**
* 根据开发环境返回接口url
* @returns {string}
*/
2025-03-07 21:19:41 +08:00
export function getServiceUrl() {
return DEV_API_SERVICE
2025-03-07 10:01:20 +08:00
}
2025-03-07 21:19:41 +08:00
2025-03-07 10:01:20 +08:00
/** request服务封装 */
export default {
2025-03-07 21:19:41 +08:00
getServiceUrl,
user,
2025-03-07 10:01:20 +08:00
}