mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-23 07:33:53 +08:00
完成“编辑模型配置”功能开发
This commit is contained in:
@@ -159,5 +159,23 @@ export default {
|
||||
})
|
||||
}).send()
|
||||
},
|
||||
|
||||
// 更新模型配置
|
||||
updateModel(params, callback) {
|
||||
const { modelType, provideCode, id, formData } = params;
|
||||
RequestService.sendRequest()
|
||||
.url(`${getServiceUrl()}/models/${modelType}/${provideCode}/${id}`)
|
||||
.method('PUT')
|
||||
.data(formData)
|
||||
.success((res) => {
|
||||
RequestService.clearRequestTime();
|
||||
callback(res);
|
||||
})
|
||||
.fail((err) => {
|
||||
console.error('更新模型失败:', err);
|
||||
this.$message.error(err.msg || '更新模型失败');
|
||||
RequestService.reAjaxFun(() => {
|
||||
this.updateModel(params, callback);
|
||||
});
|
||||
}).send();
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user