coupon-admin/view/manager/config/wechat.html

182 lines
9.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

{layout name="manager/layout" /}
<link rel="stylesheet" href="__MANAGER__/css/config.css" media="all">
<div class="layuimini-container">
<div class="layuimini-main">
<div class="layui-form layuimini-form">
<div class="config-group-item">
<div class="config-group-title">微信小程序</div>
<hr>
<div class="layui-form-item layui-form-item-lg">
<label class="layui-form-label">小程序 appId</label>
<div class="layui-input-block">
<input class="layui-input" type="text" name="applets_appId" value="{$item.applets_appId ?? ''}" placeholder="小程序 appId" />
</div>
</div>
<div class="layui-form-item layui-form-item-lg">
<label class="layui-form-label">小程序 appSecret</label>
<div class="layui-input-block">
<input class="layui-input" type="password" name="applets_appSecret" value="{$item.applets_appSecret ?? ''}" placeholder="小程序 appSecret" />
</div>
</div>
<div class="layui-form-item layui-form-item-lg">
<label class="layui-form-label">支付回调</label>
<div class="layui-input-block">
<input class="layui-input" type="text" name="applets_notify_url" value="{$item.applets_notify_url ?? ''}" placeholder="支付回调地址" />
</div>
</div>
</div>
<div class="config-group-item layui-hide">
<div class="config-group-title">微信公众号</div>
<hr>
<div class="layui-form-item layui-form-item-lg">
<label class="layui-form-label">微信appId</label>
<div class="layui-input-block">
<input class="layui-input" type="text" name="appId" value="{$item.appId ?? ''}" placeholder="微信appId" />
</div>
</div>
<div class="layui-form-item layui-form-item-lg">
<label class="layui-form-label">appSecret</label>
<div class="layui-input-block">
<input class="layui-input" type="password" name="appSecret" value="{$item.appSecret ?? ''}" placeholder="appSecret" />
</div>
</div>
<div class="layui-form-item layui-form-item-lg">
<label class="layui-form-label">通知回调</label>
<div class="layui-input-block">
<input class="layui-input" type="text" name="notify_url" value="{$item.notify_url ?? ''}" placeholder="通知回调地址" />
</div>
</div>
</div>
<div class="config-group-item">
<div class="config-group-title">微信支付</div>
<hr>
<div class="layui-form-item layui-form-item-lg">
<label class="layui-form-label">商户号</label>
<div class="layui-input-block">
<input class="layui-input" type="text" name="mchid" value="{$item.mchid ?? ''}" placeholder="商户号" />
</div>
</div>
<div class="layui-form-item layui-form-item-lg">
<label class="layui-form-label">密钥</label>
<div class="layui-input-block">
<input class="layui-input" type="password" name="key" value="{$item.key ?? ''}" placeholder="密钥" />
</div>
</div>
<div class="layui-form-item layui-form-item-lg layui-hide">
<label class="layui-form-label">日付款总额</label>
<div class="layui-input-block between">
<input class="layui-input" type="number" name="day_total_paid" value="{$item.day_total_paid ?? 100000.00}" placeholder="日付款总额限额(元)" />
</div>
</div>
</div>
<div class="config-group-item layui-hide">
<div class="config-group-title">微信开放平台</div>
<hr>
<div class="layui-form-item layui-form-item-lg">
<label class="layui-form-label">开放平台appId</label>
<div class="layui-input-block">
<input class="layui-input" type="text" name="openAppId" value="{$item.openAppId ?? ''}" placeholder="开放平台appId" />
</div>
</div>
<div class="layui-form-item layui-form-item-lg">
<label class="layui-form-label">开放平台appSecret</label>
<div class="layui-input-block">
<input class="layui-input" type="text" name="openAppSecret" value="{$item.openAppSecret ?? ''}" placeholder="appSecret" />
</div>
</div>
<div class="layui-form-item layui-form-item-lg">
<label class="layui-form-label">扫码登录回调地址</label>
<div class="layui-input-block">
<input class="layui-input" type="text" name="open_notify_url" value="{$item.open_notify_url ?? ''}" placeholder="回调地址" />
</div>
</div>
</div>
<div class="config-group-item">
<div class="config-group-title">商家设置</div>
<hr>
<div class="layui-form-item layui-form-item-lg">
<label class="layui-form-label">充值提醒</label>
<div class="layui-input-inline">
<input class="layui-input" type="text" name="balance" value="{$item.balance ?? ''}"/>
</div>
<div class="layui-form-mid layui-word-aux">商家余额不足以支付相应数量优惠券时,进行充值提醒</div>
</div>
<div class="layui-form-item layui-form-item-lg">
<label class="layui-form-label">商家发布优惠券</label>
<div class="layui-input-block">
<input type="checkbox" {if isset($item.directory) && $item.directory == 1} checked="" {/if} lay-skin="switch" lay-filter="switchDirectory" lay-text="开启|关闭">
<input type="hidden" id="directory" name="directory" value="{$item.directory ?? 0}">
</div>
</div>
<div class="layui-form-item layui-form-item-lg">
<label class="layui-form-label">加入黑名单时长</label>
<div class="layui-input-inline">
<input class="layui-input" type="text" name="blackTime" value="{$item.blackTime ?? ''}"/>
</div>
<div class="layui-form-mid layui-word-aux">用户被加入黑名单持续时间(单位是分)</div>
</div>
<div class="layui-form-item layui-form-item-lg">
<label class="layui-form-label">评论显示数</label>
<div class="layui-input-inline">
<input class="layui-input" type="text" name="commentNum" value="{$item.commentNum ?? 10}"/>
</div>
</div>
<div class="layui-form-item layui-form-item-lg">
<label class="layui-form-label">评论人工审核可见</label>
<div class="layui-input-block">
<input type="checkbox" {if isset($item.commentState) && $item.commentState == 1} checked="" {/if} lay-skin="switch" lay-filter="switchCommentState" lay-text="开启|关闭">
<input type="hidden" id="commentState" name="commentState" value="{$item.commentState ?? 0}">
</div>
</div>
</div>
<div class="config-group-item">
<div class="layui-form-item layui-form-item-lg">
<label class="layui-form-label"></label>
<div class="layui-input-block">
<button class="layui-btn layui-btn-normal" data-url="/manager/config/wechat" lay-submit lay-filter="saveConfig">确认保存</button>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
layui.use(['jquery', 'form', 'layer', 'miniTab', 'laytpl', 'table'], function () {
let $ = layui.jquery, form = layui.form, layer = layui.layer, miniTab = layui.miniTab, table = layui.table;
form.on('switch(switchDirectory)',function (data) {
//开关是否开启true或者false
var checked = data.elem.checked;
console.log(checked);
$("#directory").val(checked?1:0)
});
form.on('switch(switchCommentState)',function (data) {
//开关是否开启true或者false
var checked = data.elem.checked;
console.log(checked);
$("#commentState").val(checked?1:0)
});
})
</script>