chore(addon/aikefu): 更新配置UI
This commit is contained in:
@@ -38,10 +38,10 @@ class Kefu extends BaseShop
|
|||||||
$kefu_config_model = new KefuConfigModel();
|
$kefu_config_model = new KefuConfigModel();
|
||||||
|
|
||||||
if (request()->isJson()) {
|
if (request()->isJson()) {
|
||||||
$api_key = input("api_key", "");//Dify API密钥
|
$api_key = input("api_key/s", "");//Dify API密钥
|
||||||
$base_url = input("base_url", "https://api.dify.ai/v1");//API基础地址
|
$base_url = input("base_url/s", "https://api.dify.ai/v1");//API基础地址
|
||||||
$chat_endpoint = input("chat_endpoint", "/chat-messages");//聊天接口端点
|
$chat_endpoint = input("chat_endpoint/s", "/chat-messages");//聊天接口端点
|
||||||
$status = input("status", 0);//状态
|
$status = input("status/d", 0);//状态
|
||||||
|
|
||||||
$data = array(
|
$data = array(
|
||||||
"api_key" => $api_key,
|
"api_key" => $api_key,
|
||||||
@@ -73,10 +73,10 @@ class Kefu extends BaseShop
|
|||||||
*/
|
*/
|
||||||
public function getConversationList()
|
public function getConversationList()
|
||||||
{
|
{
|
||||||
$page = input("page", 1);
|
$page = input("page/d", 1);
|
||||||
$limit = input("limit", 10);
|
$limit = input("limit/d", 10);
|
||||||
$user_id = input("user_id", "");
|
$user_id = input("user_id/s", "");
|
||||||
$status = input("status", "");
|
$status = input("status/s", "");
|
||||||
|
|
||||||
$kefu_conversation_model = new KefuConversationModel();
|
$kefu_conversation_model = new KefuConversationModel();
|
||||||
$condition = [['site_id', '=', $this->site_id]];
|
$condition = [['site_id', '=', $this->site_id]];
|
||||||
@@ -100,7 +100,7 @@ class Kefu extends BaseShop
|
|||||||
*/
|
*/
|
||||||
public function getConversationInfo()
|
public function getConversationInfo()
|
||||||
{
|
{
|
||||||
$conversation_id = input("conversation_id", "");
|
$conversation_id = input("conversation_id/s", "");
|
||||||
|
|
||||||
if (empty($conversation_id)) {
|
if (empty($conversation_id)) {
|
||||||
return $this->error('会话ID不能为空');
|
return $this->error('会话ID不能为空');
|
||||||
@@ -125,7 +125,7 @@ class Kefu extends BaseShop
|
|||||||
*/
|
*/
|
||||||
public function endConversation()
|
public function endConversation()
|
||||||
{
|
{
|
||||||
$id = input("id", "");
|
$id = input("id/d", "");
|
||||||
|
|
||||||
if (empty($id)) {
|
if (empty($id)) {
|
||||||
return $this->error('会话ID不能为空');
|
return $this->error('会话ID不能为空');
|
||||||
@@ -149,7 +149,7 @@ class Kefu extends BaseShop
|
|||||||
*/
|
*/
|
||||||
public function deleteConversation()
|
public function deleteConversation()
|
||||||
{
|
{
|
||||||
$id = input("id", "");
|
$id = input("id/d", "");
|
||||||
|
|
||||||
if (empty($id)) {
|
if (empty($id)) {
|
||||||
return $this->error('会话ID不能为空');
|
return $this->error('会话ID不能为空');
|
||||||
@@ -198,8 +198,8 @@ class Kefu extends BaseShop
|
|||||||
*/
|
*/
|
||||||
public function message()
|
public function message()
|
||||||
{
|
{
|
||||||
$conversation_id = input("conversation_id", "");
|
$conversation_id = input("conversation_id/s", "");
|
||||||
View::assign("conversation_id", $conversation_id);
|
$this->assign("conversation_id", $conversation_id);
|
||||||
return $this->fetch("kefu/message");
|
return $this->fetch("kefu/message");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -209,9 +209,9 @@ class Kefu extends BaseShop
|
|||||||
*/
|
*/
|
||||||
public function getMessageList()
|
public function getMessageList()
|
||||||
{
|
{
|
||||||
$page = input("page", 1);
|
$page = input("page/d", 1);
|
||||||
$limit = input("limit", 50);
|
$limit = input("limit/d", 50);
|
||||||
$conversation_id = input("conversation_id", "");
|
$conversation_id = input("conversation_id/s", "");
|
||||||
|
|
||||||
if (empty($conversation_id)) {
|
if (empty($conversation_id)) {
|
||||||
return $this->error('会话ID不能为空');
|
return $this->error('会话ID不能为空');
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<div class="layui-fluid">
|
<div class="layui-fluid">
|
||||||
<div class="layui-card">
|
<div class="layui-card">
|
||||||
<div class="layui-card-header">智能客服管理</div>
|
|
||||||
<div class="layui-card-body">
|
<div class="layui-card-body">
|
||||||
<div class="layui-tab layui-tab-brief" lay-filter="kefu-tab">
|
<div class="layui-tab layui-tab-brief" lay-filter="kefu-tab">
|
||||||
<ul class="layui-tab-title">
|
<ul class="layui-tab-title">
|
||||||
|
|||||||
Reference in New Issue
Block a user