98 lines
3.1 KiB
HTML
98 lines
3.1 KiB
HTML
{extend name="common/base"/}
|
|
<!-- 主体 -->
|
|
{block name="body"}
|
|
<form class="layui-form body-content">
|
|
<h3 style="height:36px">微信配置</h3>
|
|
<table class="layui-table layui-table-form">
|
|
<tr>
|
|
<td class="layui-td-gray2">Token<font>*</font></td>
|
|
<td>
|
|
<input type="text" name="Token" lay-verify="required" autocomplete="off" placeholder="请输入Token" class="layui-input"
|
|
value="{$wechatConf.Token}">
|
|
</td>
|
|
<td class="layui-td-gray2">登录回调地址<font>*</font></td>
|
|
<td>
|
|
<input type="text" name="LOGIN_BACK_URL" lay-verify="required" autocomplete="off" placeholder="请输入微信登录回调地址" class="layui-input"
|
|
value="{$wechatConf.LOGIN_BACK_URL}">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="layui-td-gray2">appID<font>*</font></td>
|
|
<td>
|
|
<input type="text" name="appID" lay-verify="required" autocomplete="off" placeholder="请输入appID" class="layui-input"
|
|
value="{$wechatConf.appID}">
|
|
</td>
|
|
<td class="layui-td-gray2">appsecret<font>*</font></td>
|
|
<td>
|
|
<input type="text" name="appsecret" lay-verify="required" autocomplete="off" placeholder="请输入secretey" class="layui-input"
|
|
value="{$wechatConf.appsecret}">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="layui-td-gray2">支付商户号</td>
|
|
<td>
|
|
<input type="text" name="MCHID" autocomplete="off" placeholder="请输入微信支付商户号" class="layui-input"
|
|
value="{$wechatConf.MCHID}">
|
|
</td>
|
|
<td class="layui-td-gray2">支付API密钥</td>
|
|
<td>
|
|
<input type="text" name="SECRECT_KEY" autocomplete="off" placeholder="请输入微信支付API密钥" class="layui-input"
|
|
value="{$wechatConf.SECRECT_KEY}">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="layui-td-gray2">支付证书路径</td>
|
|
<td>
|
|
<input type="text" name="CERT_URL" autocomplete="off" placeholder="请输入微信支付证书路径" class="layui-input"
|
|
value="{$wechatConf.CERT_URL}">
|
|
</td>
|
|
<td class="layui-td-gray2">支付回调地址</td>
|
|
<td>
|
|
<input type="text" name="PAY_BACK_URL" autocomplete="off" placeholder="请输入微信支付回调地址" class="layui-input"
|
|
value="{$wechatConf.PAY_BACK_URL}">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div style="padding: 10px 0">
|
|
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">立即提交</button>
|
|
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
|
</div>
|
|
</form>
|
|
{/block}
|
|
<!-- /主体 -->
|
|
|
|
<!-- 脚本 -->
|
|
{block name="script"}
|
|
<script>
|
|
function init(layui) {
|
|
var form = layui.form,
|
|
layer = layui.layer;
|
|
|
|
//监听提交
|
|
form.on('submit(webform)', function(data) {
|
|
$.ajax({
|
|
url: "/admin/conf/wechat_submit",
|
|
type: 'post',
|
|
data: data.field,
|
|
success: function(e) {
|
|
if (e.code == 1) {
|
|
layer.confirm('保存成功,关闭本页面吗?', {
|
|
icon: 3,
|
|
title: '提示'
|
|
}, function(index) {
|
|
$('.ittab-tab .layui-tab-title .layui-this i', parent.document).click();
|
|
layer.close(index);
|
|
});
|
|
} else {
|
|
layer.msg(e.msg);
|
|
}
|
|
}
|
|
})
|
|
return false;
|
|
});
|
|
}
|
|
</script>
|
|
{include file="common/layui" base='base' extend="[]" use="['upload','form']" callback="init" /}
|
|
{/block}
|
|
<!-- /脚本 -->
|