2019-06-06 15:07:21 +08:00

45 lines
1.7 KiB
HTML

{extend name="admin@main"}
{block name="content"}
<div style="max-width:1000px">
<form class="layui-card layui-form">
<div class="layui-card-body think-box-shadow padding-bottom-5">
<div class="layui-form-item">
<label class="layui-form-label">Type<br><span class="nowrap color-desc">对接方式</span></label>
<div class="layui-input-block">
{foreach ['api'=>'公众号平台API模式','thr'=>'第三方平台授权模式','test'=>'接口功能测试'] as $k=>$v}
<input type="radio" data-wechat-type="{$k}" name="wechat_type" value="{$k}" title="{$v}" lay-filter="wechat_type">
{/foreach}
<p class="help-block">请选择微信对接方式,其中第三方平台授权需要微信开放平台支持,同时需要搭建 SERVICE 服务!</p>
</div>
</div>
</div>
</form>
<div class="think-box-shadow">
<div data-type="api">{include file='config/options_api'}</div>
<div data-type="thr">{include file='config/options_thr'}</div>
<div data-type="test">{include file='config/options_help'}</div>
</div>
</div>
{/block}
{block name='script'}
<script>
$(function () {
apply('{:sysconf("wechat_type")}');
window.form.render();
window.form.on('radio(wechat_type)', function (data) {
apply(data.value);
});
function apply(value) {
var $active = $("[data-wechat-type='" + value + "']").trigger('click');
if ($active.size() < 1) $("[data-wechat-type]:first").trigger('click');
$('[data-type="' + value + '"]').show().siblings('[data-type]').hide();
}
});
</script>
{/block}