feat(微信小程序): 添加第三方微信小程序客服支持
新增第三方微信小程序客服类型选项,包含AppID和页面路径的输入验证
This commit is contained in:
@@ -58,16 +58,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">微信小程序端:</label>
|
<label class="layui-form-label">微信小程序端:</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
{switch name="$config.weapp.type"}
|
{switch name="$config.weapp.type"}
|
||||||
{case value="none"}未启用{/case}
|
{case value="none"}未启用{/case}
|
||||||
{case value="wxwork"}企业微信客服{/case}
|
{case value="wxwork"}企业微信客服{/case}
|
||||||
{case value="weapp"}小程序系统客服{/case}
|
{case value="weapp"}小程序系统客服{/case}
|
||||||
{/switch}
|
{case value="miniprogram"}第三方微信小程序{/case}
|
||||||
{if addon_is_exit('aikefu') && $config.weapp.type == 'aikefu'}智能客服{/if}
|
{/switch}
|
||||||
</div>
|
{if addon_is_exit('aikefu') && $config.weapp.type == 'aikefu'}智能客服{/if}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
{if addon_is_exit('pc', request()->siteid()) == 1}
|
{if addon_is_exit('pc', request()->siteid()) == 1}
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">PC端:</label>
|
<label class="layui-form-label">PC端:</label>
|
||||||
@@ -145,6 +146,7 @@
|
|||||||
<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}>
|
||||||
{if addon_is_exit('aikefu')}<input type="radio" name="weapp[type]" lay-filter="serviceType" lay-type="weapp" value="aikefu" title="智能客服" {if condition="$config.weapp.type == 'aikefu'"} checked {/if}>{/if}
|
{if addon_is_exit('aikefu')}<input type="radio" name="weapp[type]" lay-filter="serviceType" lay-type="weapp" value="aikefu" title="智能客服" {if condition="$config.weapp.type == 'aikefu'"} checked {/if}>{/if}
|
||||||
<input type="radio" name="weapp[type]" lay-filter="serviceType" lay-type="weapp" value="wxwork" title="企业微信客服" {if condition="$config.weapp.type == 'wxwork'"} 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}>
|
||||||
|
<input type="radio" name="weapp[type]" lay-filter="serviceType" lay-type="weapp" value="miniprogram" title="第三方微信小程序" {if condition="$config.weapp.type == 'miniprogram'"} checked {/if}>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="weapp-wrap wxwork" {if $config.weapp.type != 'wxwork'} style="display: none" {/if}>
|
<div class="weapp-wrap wxwork" {if $config.weapp.type != 'wxwork'} style="display: none" {/if}>
|
||||||
@@ -165,6 +167,21 @@
|
|||||||
<div class="weapp-wrap aikefu" {if $config.weapp.type != 'aikefu'} style="display: none" {/if}>
|
<div class="weapp-wrap aikefu" {if $config.weapp.type != 'aikefu'} style="display: none" {/if}>
|
||||||
<div class="word-aux">智能客服功能已启用,系统将自动处理客户咨询。</div>
|
<div class="word-aux">智能客服功能已启用,系统将自动处理客户咨询。</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="weapp-wrap miniprogram" {if $config.weapp.type != 'miniprogram'} style="display: none" {/if}>
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label"><span class="required">*</span>小程序AppID:</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" class="layui-input len-mid" name="weapp[appid]" value="{$config.weapp.appid ?? ''}" lay-verify="weappAppid">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<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="weapp[pagepath]" value="{$config.weapp.pagepath ?? ''}" lay-verify="weappPagepath">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="word-aux">请填写目标小程序的AppID和客服页面路径,例如:pages/service/index</div>
|
||||||
|
</div>
|
||||||
{if addon_is_exit('pc', request()->siteid()) == 1}
|
{if addon_is_exit('pc', request()->siteid()) == 1}
|
||||||
<div class="layui-form-item top">
|
<div class="layui-form-item top">
|
||||||
<label class="layui-form-label"><span class="border-left border-color"></span>PC端</label>
|
<label class="layui-form-label"><span class="border-left border-color"></span>PC端</label>
|
||||||
@@ -259,6 +276,16 @@
|
|||||||
return '请输入客服链接';
|
return '请输入客服链接';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
weappAppid: function(value){
|
||||||
|
if ($('[name="weapp[type]"]:checked').val() == 'miniprogram' && !/[\S]+/.test(value)) {
|
||||||
|
return '请输入小程序AppID';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
weappPagepath: function(value){
|
||||||
|
if ($('[name="weapp[type]"]:checked').val() == 'miniprogram' && !/[\S]+/.test(value)) {
|
||||||
|
return '请输入小程序页面路径';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
pcThirdUrl: function(value){
|
pcThirdUrl: function(value){
|
||||||
if ($('[name="pc[type]"]:checked').val() == 'third' && !/[\S]+/.test(value)) {
|
if ($('[name="pc[type]"]:checked').val() == 'third' && !/[\S]+/.test(value)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user