ThinkAdmin/app/wechat/view/config/options_form_api.html
2023-02-28 11:55:34 +08:00

66 lines
4.2 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<form action="{:request()->url()}" method="post" data-auto="true" class="layui-form layui-card shadow-none">
<div class="layui-card-header border-0">
<div class="layui-bg-gray padding-left-20 padding-right-20 border-radius-5 layui-elip">
使用微信公众平台直接模式时需要在微信公众号平台配置授权IP及网页授权域名将公众号平台获取到的参数填写到下面。
</div>
</div>
<div class="layui-card-body">
<div class="layui-form-item">
<label class="layui-form-label"><b>Token</b><br><span class="nowrap color-desc">接口认证令牌</span></label>
<div class="layui-input-block">
<input name="wechat.token" required vali-name="认证TOKEN" placeholder="请输入消息推送对接认证Token必填" value="{:sysconf('wechat.token')}" class="layui-input">
<p class="help-block">公众号平台与系统对接认证Token请优先填写此参数并保存然后再在微信公众号平台操作对接。</p>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label"><b>AppId</b><br><span class="nowrap color-desc">公众号 APPID</span></label>
<div class="layui-input-block">
<input name="wechat.appid" vali-name="微信APPID" placeholder="请输入以wx开头的18位公众号APPID必填" pattern="^wx[0-9a-z]{16}$" maxlength="18" required="required" value="{:sysconf('wechat.appid')}" class="layui-input">
<p class="help-block">公众号APPID是所有接口必要参数可以在公众号平台 [ 开发 > 基本配置 ] 页面获取。</p>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label"><b>AppSecret</b><br><span class="nowrap color-desc">公众号 Secret</span></label>
<div class="layui-input-block">
<input name="wechat.appsecret" required vali-name="接口密钥" placeholder="请输入32位公众号接口密钥AppSecret必填" value="{:sysconf('wechat.appsecret')}" maxlength="32" pattern="^[0-9a-z]{32}$" class="layui-input">
<p class="help-block">公众号应用密钥是所有接口必要参数,可以在公众号平台 [ 开发 > 基本配置 ] 页面授权后获取。</p>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label"><b>AesKey</b><br><span class="nowrap color-desc">消息加密密钥</span></label>
<div class="layui-input-block">
<input name="wechat.encodingaeskey" vali-name="消息密钥" placeholder="请输入43位公众号消息推送加密密钥可选" value="{:sysconf('wechat.encodingaeskey')}" maxlength="43" pattern="^.{43}$" class="layui-input">
<p class="help-block">若开启了消息加密时必需填写,消息加密密钥必需填写并保持与公众号平台一致。</p>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label"><b>PushApi</b><br><span class="nowrap color-desc">消息推送接收</span></label>
<div class="layui-input-block">
<label class="relative block">
<input value="服务器授权IP{$geoip}" disabled class="layui-input layui-bg-gray">
<a data-copy="{$geoip}" class="layui-icon layui-icon-release input-right-icon"></a>
</label>
<label class="relative block margin-top-5">
<input value="消息推送地址:{$thrNotify}" disabled class="layui-input layui-bg-gray">
<a data-copy="{$thrNotify}" class="layui-icon layui-icon-release input-right-icon"></a>
</label>
<p class="help-block">公众号服务平台消息推送接口及服务器授权IP地址需在公众号接口开发处配置。</p>
</div>
</div>
</div>
<div class="hr-line-dashed"></div>
<input type="hidden" name="wechat.type" value="api">
<div class="layui-form-item text-center">
<button class="layui-btn" type="submit">保存配置</button>
</div>
</form>