chore: 客服配置增加智能客服选项

This commit is contained in:
2025-12-19 10:32:13 +08:00
parent 3239891cd1
commit 0980a8db27

View File

@@ -52,6 +52,7 @@
{case value="none"}未启用{/case}
{case value="soke"}Soke客服{/case}
{case value="wxwork"}企业微信客服{/case}
{case value="aikefu"}智能客服{/case}
{case value="third"}第三方客服{/case}
{/switch}
</div>
@@ -62,7 +63,8 @@
{switch name="$config.weapp.type"}
{case value="none"}未启用{/case}
{case value="wxwork"}企业微信客服{/case}
{case value="weapp"}小程序客服{/case}
{case value="weapp"}小程序系统客服{/case}
{case value="aikefu"}智能客服{/case}
{/switch}
</div>
</div>
@@ -72,6 +74,7 @@
<div class="layui-input-block">
{switch name="$config.pc.type"}
{case value="none"}未启用{/case}
{case value="aikefu"}智能客服{/case}
{case value="third"}第三方客服{/case}
{/switch}
</div>
@@ -84,6 +87,7 @@
{switch name="$config.aliapp.type"}
{case value="none"}未启用{/case}
{case value="soke"}Soke客服{/case}
{case value="aikefu"}智能客服{/case}
{case value="aliapp"}蚂蚁智能客服{/case}
{/switch}
</div>
@@ -99,23 +103,27 @@
<div class="layui-form-item top">
<label class="layui-form-label"><span class="border-left border-color"></span>H5/</label>
</div>
<div class="layui-form-item">
<label class="layui-form-label">客服类型</label>
<div class="layui-input-block">
<input type="radio" name="h5[type]" lay-filter="serviceType" lay-type="h5" value="none" title="不启用" {if condition="$config.h5.type == 'none'"} checked {/if}>
{if addon_is_exit('servicer')}<input type="radio" name="h5[type]" lay-filter="serviceType" lay-type="h5" value="soke" title="Soke客服" {if condition="$config.h5.type == 'soke'"} checked {/if}>{/if}
<input type="radio" name="h5[type]" lay-filter="serviceType" lay-type="h5" value="wxwork" title="企业微信客服" {if condition="$config.h5.type == 'wxwork'"} checked {/if}>
<input type="radio" name="h5[type]" lay-filter="serviceType" lay-type="h5" value="third" title="第三方客服" {if condition="$config.h5.type == 'third'"} checked {/if}>
</div>
<div class="layui-form-item">
<label class="layui-form-label">客服类型</label>
<div class="layui-input-block">
<input type="radio" name="h5[type]" lay-filter="serviceType" lay-type="h5" value="none" title="不启用" {if condition="$config.h5.type == 'none'"} checked {/if}>
{if addon_is_exit('servicer')}<input type="radio" name="h5[type]" lay-filter="serviceType" lay-type="h5" value="soke" title="Soke客服" {if condition="$config.h5.type == 'soke'"} checked {/if}>{/if}
<input type="radio" name="h5[type]" lay-filter="serviceType" lay-type="h5" value="aikefu" title="智能客服" {if condition="$config.h5.type == 'aikefu'"} checked {/if}>
<input type="radio" name="h5[type]" lay-filter="serviceType" lay-type="h5" value="wxwork" title="企业微信客服" {if condition="$config.h5.type == 'wxwork'"} checked {/if}>
<input type="radio" name="h5[type]" lay-filter="serviceType" lay-type="h5" value="third" title="第三方客服" {if condition="$config.h5.type == 'third'"} checked {/if}>
</div>
<div class="h5-wrap wxwork" {if $config.h5.type != 'wxwork'} style="display: none" {/if}>
<div class="layui-form-item">
<label class="layui-form-label"><span class="required">*</span></label>
<div class="layui-input-block">
<input type="text" class="layui-input len-mid" name="h5[wxwork_url]" value="{$config.h5.wxwork_url ?? ''}" lay-verify="h5WxworkUrl">
</div>
</div>
<div class="h5-wrap wxwork" {if $config.h5.type != 'wxwork'} style="display: none" {/if}>
<div class="layui-form-item">
<label class="layui-form-label"><span class="required">*</span></label>
<div class="layui-input-block">
<input type="text" class="layui-input len-mid" name="h5[wxwork_url]" value="{$config.h5.wxwork_url ?? ''}" lay-verify="h5WxworkUrl">
</div>
<div class="word-aux">H5中如何接入企业微信客服请查看<a href="https://work.weixin.qq.com/nl/act/p/3f8820e724cb44c5" target="_blank" class="text-color">在微信内网页中接入</a></div>
</div>
<div class="word-aux">H5中如何接入企业微信客服请查看<a href="https://work.weixin.qq.com/nl/act/p/3f8820e724cb44c5" target="_blank" class="text-color">在微信内网页中接入</a></div>
</div>
<div class="h5-wrap aikefu" {if $config.h5.type != 'aikefu'} style="display: none" {/if}>
<div class="word-aux">智能客服功能已启用系统将自动处理客户咨询</div>
</div>
<div class="h5-wrap third" {if $config.h5.type != 'third'} style="display: none" {/if}>
<div class="layui-form-item">
@@ -134,7 +142,8 @@
<div class="layui-input-block">
<input type="radio" name="weapp[type]" lay-filter="serviceType" lay-type="weapp" value="none" title="不启用" {if condition="$config.weapp.type == 'none'"} checked {/if}>
{if addon_is_exit('servicer')}<input type="radio" name="weapp[type]" lay-filter="serviceType" lay-type="weapp" value="soke" title="Soke客服" {if condition="$config.weapp.type == 'soke'"} checked {/if}>{/if}
<input type="radio" name="weapp[type]" lay-filter="serviceType" lay-type="weapp" value="weapp" title="小程序客服" {if condition="$config.weapp.type == 'weapp'"} checked {/if}>
<input type="radio" name="weapp[type]" lay-filter="serviceType" lay-type="weapp" value="weapp" title="小程序系统客服" {if condition="$config.weapp.type == 'weapp'"} checked {/if}>
<input type="radio" name="weapp[type]" lay-filter="serviceType" lay-type="weapp" value="aikefu" title="智能客服" {if condition="$config.weapp.type == 'aikefu'"} checked {/if}>
<input type="radio" name="weapp[type]" lay-filter="serviceType" lay-type="weapp" value="wxwork" title="企业微信客服" {if condition="$config.weapp.type == 'wxwork'"} checked {/if}>
</div>
</div>
@@ -153,6 +162,9 @@
</div>
<div class="word-aux">小程序中如何接入企业微信客服请查看<a href="https://work.weixin.qq.com/nl/act/p/a733314375294bdd" target="_blank" class="text-color">在小程序中接入</a></div>
</div>
<div class="weapp-wrap aikefu" {if $config.weapp.type != 'aikefu'} style="display: none" {/if}>
<div class="word-aux">智能客服功能已启用系统将自动处理客户咨询</div>
</div>
{if addon_is_exit('pc', request()->siteid()) == 1}
<div class="layui-form-item top">
<label class="layui-form-label"><span class="border-left border-color"></span>PC</label>
@@ -161,9 +173,13 @@
<label class="layui-form-label">客服类型</label>
<div class="layui-input-block">
<input type="radio" name="pc[type]" lay-filter="serviceType" lay-type="pc" value="none" title="不启用" {if condition="$config.pc.type == 'none'"} checked {/if}>
<input type="radio" name="pc[type]" lay-filter="serviceType" lay-type="pc" value="aikefu" title="智能客服" {if condition="$config.pc.type == 'aikefu'"} checked {/if}>
<input type="radio" name="pc[type]" lay-filter="serviceType" lay-type="pc" value="third" title="第三方客服" {if condition="$config.pc.type == 'third'"} checked {/if}>
</div>
</div>
<div class="pc-wrap aikefu" {if $config.pc.type != 'aikefu'} style="display: none" {/if}>
<div class="word-aux">智能客服功能已启用系统将自动处理客户咨询</div>
</div>
<div class="pc-wrap third" {if $config.pc.type != 'third'} style="display: none" {/if}>
<div class="layui-form-item">
<label class="layui-form-label"><span class="required">*</span></label>
@@ -184,23 +200,27 @@
<div class="layui-input-block">
<input type="radio" name="aliapp[type]" lay-filter="serviceType" lay-type="aliapp" value="none" title="不启用" {if condition="$config.aliapp.type == 'none'"} checked {/if}>
{if addon_is_exit('servicer')}<input type="radio" name="aliapp[type]" lay-filter="serviceType" lay-type="aliapp" value="soke" title="Soke客服" {if condition="$config.aliapp.type == 'soke'"} checked {/if}>{/if}
<input type="radio" name="aliapp[type]" lay-filter="serviceType" lay-type="aliapp" value="aikefu" title="智能客服" {if condition="$config.aliapp.type == 'aikefu'"} checked {/if}>
<input type="radio" name="aliapp[type]" lay-filter="serviceType" lay-type="aliapp" value="aliapp" title="蚂蚁智能客服" {if condition="$config.aliapp.type == 'aliapp'"} checked {/if}>
</div>
</div>
<div class="aliapp-wrap aikefu" {if $config.aliapp.type != 'aikefu'} style="display: none" {/if}>
<div class="word-aux">智能客服功能已启用,系统将自动处理客户咨询。</div>
</div>
<div class="aliapp-wrap aliapp" {if $config.aliapp.type != 'aliapp'} style="display: none" {/if}>
<div class="layui-form-item">
<label class="layui-form-label"><span class="required">*</span>租户ID</label>
<div class="layui-input-block">
<input type="text" class="layui-input len-mid" name="aliapp[instid]" value="{$config.aliapp.instid ?? ''}" lay-verify="aliappInstid">
</div>
<div class="layui-form-item">
<label class="layui-form-label"><span class="required">*</span>租户ID</label>
<div class="layui-input-block">
<input type="text" class="layui-input len-mid" name="aliapp[instid]" value="{$config.aliapp.instid ?? ''}" lay-verify="aliappInstid">
</div>
<div class="layui-form-item">
<label class="layui-form-label"><span class="required">*</span>聊天窗ID</label>
<div class="layui-input-block">
<input type="text" class="layui-input len-mid" name="aliapp[scene]" value="{$config.aliapp.scene ?? ''}" lay-verify="aliappScene">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label"><span class="required">*</span>聊天窗ID</label>
<div class="layui-input-block">
<input type="text" class="layui-input len-mid" name="aliapp[scene]" value="{$config.aliapp.scene ?? ''}" lay-verify="aliappScene">
</div>
<div class="word-aux">小程序中如何接入蚂蚁智能客服请查看<a href="https://opendocs.alipay.com/b/03al9b" target="_blank" class="text-color">在小程序中接入</a></div>
</div>
<div class="word-aux">小程序中如何接入蚂蚁智能客服请查看<a href="https://opendocs.alipay.com/b/03al9b" target="_blank" class="text-color">在小程序中接入</a></div>
</div>
{/if}
@@ -228,6 +248,7 @@
return '请输入客服链接';
}
},
weappCorpid: function(value){
if ($('[name="weapp[type]"]:checked').val() == 'wxwork' && !/[\S]+/.test(value)) {
return '请输入企业ID';
@@ -238,21 +259,24 @@
return '请输入客服链接';
}
},
pcThirdUrl: function(value){
if ($('[name="pc[type]"]:checked').val() == 'third' && !/[\S]+/.test(value)) {
return '请输入客服链接';
}
},
aliappInstid: function(value){
if ($('[name="aliapp[type]"]:checked').val() == 'aliapp' && !/[\S]+/.test(value)) {
return '租户ID';
return '请输入租户ID';
}
},
aliappScene: function(value){
if ($('[name="aliapp[type]"]:checked').val() == 'aliapp' && !/[\S]+/.test(value)) {
return '聊天窗ID';
return '请输入聊天窗ID';
}
}
},
})
form.on('radio(serviceType)',function(data){