修改微信平台

This commit is contained in:
Anyon 2019-12-10 17:18:15 +08:00
parent bb29bc4673
commit 54b600cc49
3 changed files with 16 additions and 16 deletions

View File

@ -42,11 +42,11 @@
<label class="layui-form-label margin-top-15">PushApiUrl<br><span class="nowrap color-desc">消息推送接收</span></label>
<div class="layui-input-block">
<div class="relative">
<input name="wechat.push_url" value="服务器授权IP{$geoip}" readonly class="layui-input layui-bg-gray border-0">
<input value="服务器授权IP{$geoip}" disabled class="layui-input layui-bg-gray border-0">
<a data-copy="{$geoip}" class="absolute layui-btn layui-bg-gray" style="top:0;right:0;background:none!important"><i class="fa fa-copy"></i></a>
</div>
<div class="relative margin-top-5">
<input name="wechat.push_url" value="消息推送地址:{$thrNotify}" readonly class="layui-input layui-bg-gray border-0">
<input value="消息推送地址:{$thrNotify}" disabled class="layui-input layui-bg-gray border-0">
<a data-copy="{$thrNotify}" class="absolute layui-btn layui-bg-gray" style="top:0;right:0;background:none!important"><i class="fa fa-copy"></i></a>
</div>
<p class="help-block">公众号服务平台消息推送接口及服务器授权IP地址需在公众号接口开发处配置。</p>

View File

@ -1,7 +1,7 @@
<form onsubmit="return false" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">
<div class="layui-card-header padding-left-40 color-desc">
使用第三方授权时,需要单独搭建楚才开放平台 Service 服务,二者需要使用 Yar 或 Soap 方式通信。
使用第三方授权时,需要单独搭建楚才开放平台 Service 服务,二者需要使用 Yar 或 Soap 模块通信。
</div>
<div class="layui-card-body">
@ -49,7 +49,7 @@
<label class="layui-form-label">AppPushUri<br><span class="nowrap color-desc">第三方推送接口</span></label>
<div class="layui-input-block">
<div class="relative margin-top-5">
<input name="wechat.thr_appurl" value="消息推送地址:{$thrNotify}" readonly class="layui-input layui-bg-gray border-0">
<input value="消息推送地址:{$thrNotify}" disabled class="layui-input layui-bg-gray border-0">
<a data-copy="{$thrNotify}" class="absolute layui-btn layui-bg-gray" style="top:0;right:0;background:none!important"><i class="fa fa-copy"></i></a>
</div>
<p class="help-block">公众号服务平台接口通知URL, 公众号消息接收与回复等。</p>

View File

@ -20,24 +20,24 @@
<div class="padding-left-40 padding-right-30">
<span class="color-green margin-right-10 font-w7">微信商户证书</span><span class="nowrap color-desc">MCH_CERT</span>
<div class="">
{foreach ['p12'=>'上传 P12 证书','pem'=>'上传 PEM 证书'] as $k=>$v}
{foreach ['pem'=>'上传 PEM 证书','p12'=>'上传 P12 证书'] as $k=>$v}
<input type="radio" data-pem-type="{$k}" name="wechat.mch_ssl_type" value="{$k}" title="{$v}" lay-filter="data-mch-type">
{/foreach}
<p class="help-block">请选择需要上传证书类型P12 和 PEM 二选一,证书需要从微信商户平台获取</p>
<div data-mch-type="p12" class="layui-tab-item padding-top-15 padding-bottom-15">
<input name="wechat_mch_ssl_p12" value="{$wechat_mch_ssl_p12|default=''}" type="hidden">
<button data-file="btn" data-uptype="local" data-safe="true" data-type="p12" data-field="wechat_mch_ssl_p12" type="button" class="layui-btn layui-btn-primary">
<input name="wechat.mch_ssl_p12" value="{$wechat.mch_ssl_p12|default=''}" type="hidden">
<button data-file="btn" data-uptype="local" data-safe="true" data-type="p12" data-field="wechat.mch_ssl_p12" type="button" class="layui-btn layui-btn-primary">
<i class="layui-icon layui-icon-vercode font-s14"></i> 上传 P12 证书
</button>
<p class="help-block margin-top-10">微信商户支付 P12 证书,实现订单退款、打款、发红包等支出功能都使用证书</p>
</div>
<div data-mch-type="pem" class="layui-tab-item padding-top-15 padding-bottom-15">
<input name="wechat_mch_ssl_key" value="{$wechat_mch_ssl_key|default=''}" type="hidden">
<button data-file="btn" data-uptype="local" data-safe="true" data-type="pem" data-field="wechat_mch_ssl_key" type="button" class="layui-btn layui-btn-primary margin-right-5">
<input name="wechat.mch_ssl_key" value="{$wechat.mch_ssl_key|default=''}" type="hidden">
<button data-file="btn" data-uptype="local" data-safe="true" data-type="pem" data-field="wechat.mch_ssl_key" type="button" class="layui-btn layui-btn-primary margin-right-5">
<i class="layui-icon layui-icon-vercode font-s14"></i> 上传 KEY 证书
</button>
<input name="wechat_mch_ssl_cer" value="{$wechat_mch_ssl_cer|default=''}" type="hidden">
<button data-file="btn" data-uptype="local" data-safe="true" data-type="pem" data-field="wechat_mch_ssl_cer" type="button" class="layui-btn layui-btn-primary">
<input name="wechat.mch_ssl_cer" value="{$wechat.mch_ssl_cer|default=''}" type="hidden">
<button data-file="btn" data-uptype="local" data-safe="true" data-type="pem" data-field="wechat.mch_ssl_cer" type="button" class="layui-btn layui-btn-primary">
<i class="layui-icon layui-icon-vercode font-s14"></i> 上传CERT证书
</button>
<p class="help-block margin-top-10">微信商户支付 PEM 双向证书,实现订单退款、打款、发红包等支出功能都使用证书</p>
@ -57,8 +57,8 @@
<script>
(new function () {
form.render();
this.type = "{:sysconf('wechat_mch_ssl_type')}" || 'p12';
form.val('payment', {wechat_mch_ssl_type: this.type});
this.type = "{:sysconf('wechat.mch_ssl_type')}" || 'pem';
form.val('payment', {"wechat.mch_ssl_type": this.type});
form.on('radio(data-mch-type)', function (data) {
apply(data.value);
});
@ -68,9 +68,9 @@
$('[data-mch-type="' + type + '"]').show().siblings('[data-mch-type]').hide();
};
// 证书文件上传控制
this.types = ['wechat_mch_ssl_p12', 'wechat_mch_ssl_key', 'wechat_mch_ssl_cer'];
for (var i in this.types) $('input[name="' + this.types[i] + '"]').on('change', function () {
var input = this, $button = $(this).next('button');
this.types = ['wechat.mch_ssl_p12', 'wechat.mch_ssl_key', 'wechat.mch_ssl_cer'];
for (var i in this.types) $('input[name="' + this.types[i] + '"]').on('change', function (input, $button) {
input = this, $button = $(this).next('button');
setTimeout(function () {
if (typeof input.value === 'string' && input.value.length > 5) {
$button.find('i').addClass('color-green layui-icon-vercode').removeClass('layui-icon-upload-drag');