企业系统增加机器人管理,增加获取微信AI回复客户的配置的API

This commit is contained in:
meimei
2025-04-12 15:13:25 +08:00
parent bc16eebd9e
commit 3f5f8f3e7a
10 changed files with 520 additions and 1 deletions

View File

@@ -152,6 +152,32 @@
<div class="api_wxgroup_getEmergencyContactPerson_response_result"></div>
</div>
<div id="api_wxAiConfig_getRepayContent" style="background-color: #F3FFAEFF;margin-top: 50px;">
<div class="markdown_content">
***
```
/**
* desc 获取微信AI回复客户的配置
* * 【请求地址】:
* api/WxAiConfig/getRepayContent
*
* * 【请求参数】:(如果有“必须”标识则表示该字段是必填项)
* wxid AI微信ID【必须】
*
* * 【返回参数】
* delay_secs 回复时间秒
* status yes=在线 no=离线
*/
```
</div>
<div>
按需填写其它接口参数:
<textarea name="" id="api_wxAiConfig_getRepayContent_textarea" cols="100" rows="3">/api/feedback/setUserFeedback</textarea>
<a href='JavaScript:;' onclick="DocObject.api_wxAiConfig_getRepayContent()">测试</a>
</div>
<div class="api_wxAiConfig_getRepayContent_response_result"></div>
</div>
</div>
</body>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
@@ -159,7 +185,6 @@
<script src="/webautocodestatic/plugs/layui-v2.9.2/layui.js"></script>
<script>
$(function() {
//加载markdown
DocObject.markdown_content();
});
@@ -198,6 +223,13 @@
$('.api_wxgroup_getEmergencyContactPerson_response_result').attr('style','color:green');
},'json');
},
api_wxAiConfig_getRepayContent(){
let url = $('#api_wxAiConfig_getRepayContent_textarea').val();
$.post(url,{},function(res) {
$('.api_wxAiConfig_getRepayContent_response_result').html(JSON.stringify(res, null, "\t"));
$('.api_wxAiConfig_getRepayContent_response_result').attr('style','color:green');
},'json');
},
}
</script>

View File

@@ -0,0 +1,71 @@
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'aicustomerservicefirmstorelist/index' + location.search,
add_url: 'aicustomerservicefirmstorelist/add',
edit_url: 'aicustomerservicefirmstorelist/edit',
del_url: 'aicustomerservicefirmstorelist/del',
multi_url: 'aicustomerservicefirmstorelist/multi',
import_url: 'aicustomerservicefirmstorelist/import',
table: 'aicustomerservicefirmstorelist',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
fixedColumns: true,
fixedRightNumber: 1,
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'aicustomerservice.name', title: __('Aicustomerservice.name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'status', title: __('Status'), searchList: {"yes":__('Status yes'),"no":__('Status no')}, formatter: Table.api.formatter.status},
{field: 'total_managed_people', title: __('Total_managed_people')},
{field: 'total_managed_groups', title: __('Total_managed_groups')},
{field: 'reply_times', title: __('Reply_times')},
{field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate,
buttons: [
{
name: 'addUpdata',
text: __('更新管理数'),
title: __('更新管理数'),
classname: 'btn btn-info btn-xs btn-ajax',
icon: 'fa fa-magic',
url: 'Aicustomerservicefirmstorelist/getAllManagedPeopleGroup',
},
]
}
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
},
add: function () {
Controller.api.bindevent();
},
edit: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});