mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
40 lines
1.6 KiB
PHP
40 lines
1.6 KiB
PHP
{extend name="../../admin/view/main"}
|
|
|
|
{block name="button"}
|
|
<!--{if auth("options_test")}-->
|
|
<button data-modal="{:url('options_test')}" class='layui-btn layui-btn-sm layui-btn-primary'>微信授权测试</button>
|
|
<!--{/if}-->
|
|
{/block}
|
|
|
|
{block name="content"}
|
|
<div class="think-box-shadow layui-form">
|
|
<div class="nowrap" style="margin-left:99px">
|
|
{foreach ['api'=>'微信公众平台直接模式','thr'=>'微信开放平台授权模式'] 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">请选择微信对接方式,其中微信开放平台授权模式是需要微信开放平台支持,还需要搭建微信授权服务!</p>
|
|
</div>
|
|
</div>
|
|
<div class="think-box-shadow margin-top-15">
|
|
<div class="padding-top-20" style="width:850px">
|
|
<div class="layui-anim layui-anim-fadein" data-type="api">{include file='config/options_form_api'}</div>
|
|
<div class="layui-anim layui-anim-fadein" data-type="thr">{include file='config/options_form_thr'}</div>
|
|
</div>
|
|
</div>
|
|
{/block}
|
|
|
|
{block name='script'}
|
|
<script>
|
|
$(function () {
|
|
apply({value: '{:sysconf("wechat.type")}' || 'api'});
|
|
window.form.render(), window.form.on('radio(wechat_type)', apply);
|
|
|
|
function apply(data) {
|
|
this.$active = $("[data-wechat-type='" + data.value + "']").trigger('click');
|
|
if (this.$active.size() < 1) $("[data-wechat-type]:first").trigger('click');
|
|
$('[data-type="' + data.value + '"]').show().siblings('[data-type]').hide();
|
|
}
|
|
});
|
|
</script>
|
|
{/block}
|