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

247 lines
14 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">商家余额不足以支付相应数量签到券时,进行充值提醒(<span style="color: red">最小 0 不可为负数</span></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="hasCouponMax" value="{$item.hasCouponMax ?? 0}"/>
</div>
<div class="layui-form-mid layui-word-aux">商家可以同时上架的签到券数量(<span style="color: red">最小 0 不可为负数</span></div>
</div>
<div class="layui-form-item layui-form-item-lg layui-hide">
<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-inline">
<input class="layui-input" type="text" name="signDistance" value="{$item.signDistance ?? 0}"/>
</div>
<div class="layui-form-mid layui-word-aux">单位:米,设置签到时用户的位置和商家的地理位置最大不能超过多少米(<span style="color: red">0表示不限 不可为负数</span></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="signTimeStamp" value="{$item.signTimeStamp ?? 0}"/>
</div>
<div class="layui-form-mid layui-word-aux">单位:毫秒,设置签到时用户上传的时间戳只差不能大于多少毫秒(<span style="color: red">0表示不限 不可为负数 1000毫秒=1秒</span></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="minCouponDeductionMoney" value="{$item.minCouponDeductionMoney ?? 0}"/>
</div>
<div class="layui-form-mid layui-word-aux">单位:元(<span style="color: red">最小 0 不可为负数</span></div>
</div>
<div class="layui-form-item layui-form-item-lg field-div current-field-cover" >
<label class="layui-form-label">商圈大屏头图:</label>
<div class="layui-inline layui-col-xs12 layui-col-md8">
<div class="layui-row upload-file-div">
<div class=" layui-col-xs12 layui-col-md8">
<input class="layui-input upload-file-value" name="screenTopBanner" type="text" value="{$item['screenTopBanner']??''}">
<div class="layui-form-mid layui-word-aux">图片尺寸:请选择合适尺寸</div>
</div>
<div class="layui-col-xs12 layui-col-md3">
<span>
<button type="button" class="layui-btn layui-btn-danger upload-btn">
<i class="fa fa-upload"></i> 上传
</button>
</span>
<!-- <span><button type="button" class="layui-btn layui-btn-primary upload-choose-btn" data-url="/manager/attachment/image" data-type="image" data-multiple="false"><i class="fa fa-list"></i> 选择</button></span>-->
</div>
<ul class="layui-row layui-col-xs12 layui-col-md9 preview-list layui-col-space5"></ul>
</div>
</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="refundCustomerService" value="{$item.refundCustomerService ?? ''}"/>
</div>
<div class="layui-form-mid layui-word-aux">请输入电话或者微信号 用于小程序端用户复制</div>
</div>
<div class="layui-form-item layui-form-item-lg layui-hide">
<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>