💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
## 一、方案 前后端之间,通过约定的接口交换数据,各自独立运行; ## 二、postmen接口调试工具 postmen是一种很方便的调用API服务的软件; 下载: ![](https://img.kancloud.cn/86/f7/86f72d3882b416577252a81626fb1724_1356x617.png) 安装后,运行: 首先需要注册,然后进入主界面: ![](https://img.kancloud.cn/16/bf/16bf459cbf9cee9ef250a84584a3c6df_1366x736.png) ## 三、Firefox的rested插件接口调试 安装插件: ![](https://img.kancloud.cn/f7/83/f7836d3469844813292b67a8078f4fbb_1366x736.png) 进入插件: ![](https://img.kancloud.cn/ac/24/ac24627ee005f11aee2ab97a98c8c727_1366x736.png) 测试接口: ![](https://img.kancloud.cn/b2/0f/b20f9c50d8b239397a717b83cbb0b316_1366x736.png) 点击send request之后: 进入后端了: ![](https://img.kancloud.cn/97/4a/974a71978f646775e16b158f491eb156_1366x736.png) 说明模拟请求成功了; ## 四、跨域访问 修改config\\index.js文件,设置跨域配置proxyTable: ``` proxyTable: { '/api': { target: 'http://localhost:18080/', changeOrigin: true, pathRewrite: { '^/api': '/' } } } ```