mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-25 00:23:53 +08:00
提取重复代码合并
This commit is contained in:
@@ -386,12 +386,8 @@ export default {
|
||||
// 搜索智能体
|
||||
searchAgent(keyword, searchType, callback) {
|
||||
RequestService.sendRequest()
|
||||
.url(`${getServiceUrl()}/agent/list`)
|
||||
.url(`${getServiceUrl()}/agent/list?keyword=${encodeURIComponent(keyword)}&searchType=${searchType}`)
|
||||
.method('GET')
|
||||
.data({
|
||||
keyword: keyword,
|
||||
searchType: searchType // searchType: 'name' 或 'mac'
|
||||
})
|
||||
.success((res) => {
|
||||
RequestService.clearRequestTime();
|
||||
callback(res);
|
||||
|
||||
Reference in New Issue
Block a user