1
0
mirror of https://gitee.com/zoujingli/ThinkAdmin.git synced 2025-04-06 03:58:04 +08:00

增加微信模块代码

This commit is contained in:
Anyon 2019-12-09 18:42:58 +08:00
parent 21071361fe
commit 37bc7f8a96
354 changed files with 30667 additions and 109 deletions

@ -15,7 +15,6 @@
namespace app\index\controller;
use app\service\service\ClientService;
use think\admin\Controller;
/**
@ -28,9 +27,4 @@ class Index extends Controller
{
$this->redirect(url('@admin/login'));
}
public function test()
{
ClientService::WeChatCard(1, 2);
}
}

@ -37,7 +37,7 @@ class Config extends Controller
public function options()
{
$this->_applyFormToken();
$this->thrNotify = url('@wechat/api.push', [], false, true);
$this->thrNotify = url('@wechat/api.push', [], false, true)->build();
if ($this->request->isGet()) {
$this->title = '微信授权绑定';
$this->geoip = $this->app->cache->get('mygeoip', '');
@ -46,15 +46,15 @@ class Config extends Controller
$this->app->cache->set('mygeoip', $this->geoip, 360);
}
try {
if (input('?appid') && input('?appkey')) {
sysconf('wechat.type', 'thr');
sysconf('wechat.appid', input('appid'));
sysconf('wechat.appkey', input('appkey'));
WechatService::ThinkAdminConfig(input('appid'))->setApiNotifyUri($this->thrNotify);
}
$source = enbase64url(url('@admin', [], false, true) . '#' . $this->request->url());
$this->authurl = "http://open.cuci.cc/service/api.push/auth?source={$source}";
$this->wechat = WechatService::ThinkAdminConfig(WechatService::instance()->getAppid())->getConfig();
if (input('?appid') && input('?appkey')) {
sysconf('wechat.type', 'thr');
sysconf('wechat.thr_appid', input('appid'));
sysconf('wechat.thr_appkey', input('appkey'));
WechatService::ThinkAdminConfig()->setApiNotifyUri($this->thrNotify);
}
$this->wechat = WechatService::ThinkAdminConfig()->getConfig();
} catch (\Exception $e) {
$this->wechat = [];
}
@ -62,7 +62,7 @@ class Config extends Controller
} else {
foreach ($this->request->post() as $k => $v) sysconf($k, $v);
if ($this->request->post('wechat.type') === 'thr') {
WechatService::ThinkAdminConfig(input('appid'))->setApiNotifyUri($this->thrNotify);
WechatService::ThinkAdminConfig()->setApiNotifyUri($this->thrNotify);
}
sysoplog('微信管理', '修改微信授权配置成功');
$uri = url('wechat/config/options');

@ -20,33 +20,38 @@ use think\admin\Controller;
/**
* 微信测试工具
* Class Tools
* Class Test
* @package app\wechat\controller\api
*/
class Tools extends Controller
class Test extends Controller
{
/**
* 网页授权测试
* @return string
* @throws \WeChat\Exceptions\InvalidResponseException
* @throws \WeChat\Exceptions\LocalCacheException
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function oauth()
{
$this->url = $this->request->url(true);
$this->fans = WechatService::getWebOauthInfo($this->url, 1);
$this->fans = WechatService::instance()->getWebOauthInfo($this->url, 1);
$this->fetch();
}
/**
* 显示网页授权二维码
* @return \think\Response
* @throws \Endroid\QrCode\Exceptions\ImageFunctionFailedException
* @throws \Endroid\QrCode\Exceptions\ImageFunctionUnknownException
* @throws \Endroid\QrCode\Exceptions\ImageTypeInvalidException
*/
public function oauth_qrc()
{
$url = url('@wechat/api.tools/oauth', '', true, true);
return $this->showQrc($url);
$url = url('@wechat/api.tools/oauth', [], false, true);
$this->showQrc($url);
}
/**
@ -55,11 +60,13 @@ class Tools extends Controller
* @throws \WeChat\Exceptions\InvalidResponseException
* @throws \WeChat\Exceptions\LocalCacheException
* @throws \think\Exception
* @throws \think\exception\PDOException
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function jssdk()
{
$this->options = WechatService::getWebJssdkSign();
$this->options = WechatService::instance()->getWebJssdkSign();
$this->fetch();
}
@ -71,7 +78,7 @@ class Tools extends Controller
*/
public function jssdk_qrc()
{
$this->url = url('@wechat/api.tools/jssdk', '', true, true);
$this->url = url('@wechat/api.tools/jssdk', [], false, true);
return $this->showQrc($this->url);
}
@ -101,16 +108,14 @@ class Tools extends Controller
$notify = $pay->getNotify();
p('======= 来自扫码支付1的数据 ======');
p($notify);
// 产品ID 你的业务代码,并实现下面的统一下单操作
$product_id = $notify['product_id'];
// 微信统一下单处理
$options = [
'body' => '测试商品产品ID' . $product_id,
'body' => "测试商品产品ID{$notify['product_id']}",
'out_trade_no' => time(),
'total_fee' => '1',
'trade_type' => 'NATIVE',
'notify_url' => url('@wechat/api.tools/notify', '', true, true),
'spbill_create_ip' => request()->ip(),
'notify_url' => url('@wechat/api.tools/notify', [], false, true),
'spbill_create_ip' => $this->request->ip(),
];
$order = $pay->create($options);
p('======= 来自扫码支付1统一下单结果 ======');
@ -156,15 +161,14 @@ class Tools extends Controller
/**
* 微信JSAPI支付二维码
* @return \think\Response
* @throws \Endroid\QrCode\Exceptions\ImageFunctionFailedException
* @throws \Endroid\QrCode\Exceptions\ImageFunctionUnknownException
* @throws \Endroid\QrCode\Exceptions\ImageTypeInvalidException
*/
public function jsapiQrc()
{
$this->url = url('@wechat/api.tools/jsapi', '', true, true);
return $this->showQrc($this->url);
$this->url = url('@wechat/api.tools/jsapi', [], false, true);
$this->showQrc($this->url);
}
/**
@ -172,20 +176,22 @@ class Tools extends Controller
* @throws \WeChat\Exceptions\InvalidResponseException
* @throws \WeChat\Exceptions\LocalCacheException
* @throws \think\Exception
* @throws \think\exception\PDOException
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @link wx-demo-jsapi
*/
public function jsapi()
{
$pay = WechatService::WePayOrder();
$openid = WechatService::getWebOauthInfo(request()->url(true), 0)['openid'];
$user = WechatService::instance()->getWebOauthInfo($this->request->url(true), 0);
$options = [
'body' => '测试商品',
'out_trade_no' => time(),
'total_fee' => '1',
'openid' => $openid,
'openid' => $user['openid'],
'trade_type' => 'JSAPI',
'notify_url' => url('@wechat/api.tools/notify', '', true, true),
'notify_url' => url('@wechat/api.tools/notify', [], false, true),
'spbill_create_ip' => request()->ip(),
];
// 生成预支付码
@ -194,10 +200,10 @@ class Tools extends Controller
$options = $pay->jsapiParams($result['prepay_id']);
$optionJSON = json_encode($options, JSON_UNESCAPED_UNICODE);
// JSSDK 签名配置
$configJSON = json_encode(WechatService::getWebJssdkSign(), JSON_UNESCAPED_UNICODE);
$configJSON = json_encode(WechatService::instance()->getWebJssdkSign(), JSON_UNESCAPED_UNICODE);
echo '<pre>';
echo "当前用户OPENID: {$openid}";
echo "当前用户OPENID: {$user['openid']}";
echo "\n--- 创建预支付码 ---\n";
var_export($result);
echo '</pre>';

@ -75,7 +75,7 @@ use think\admin\Service;
* @method \WeOpen\Service WeOpenService() static 第三方服务
*
* ----- ThinkService -----
* @method mixed ThinkAdminConfig($appid) static 平台服务配置
* @method mixed ThinkAdminConfig() static 平台服务配置
*/
class WechatService extends Service
{
@ -184,10 +184,10 @@ class WechatService extends Service
}
/**
* 获取网页授权信息
* @param string $url
* @param integer $isfull
* @param boolean $isRedirect
* 通过网页授权获取粉丝信息
* @param string $source 回跳URL地址
* @param integer $isfull 获取资料模式
* @param boolean $redirect 是否直接跳转
* @return array
* @throws \WeChat\Exceptions\InvalidResponseException
* @throws \WeChat\Exceptions\LocalCacheException
@ -196,10 +196,11 @@ class WechatService extends Service
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function getWebOauthInfo($url, $isfull = 0, $isRedirect = true)
public function getWebOauthInfo($source, $isfull = 0, $redirect = true)
{
$appid = $this->getAppid();
list($openid, $fansinfo) = [$this->app->session->get("{$appid}_openid"), $this->app->session->get("{$appid}_fansinfo")];
$openid = $this->app->session->get("{$appid}_openid");
$fansinfo = $this->app->session->get("{$appid}_fansinfo");
if ((empty($isfull) && !empty($openid)) || (!empty($isfull) && !empty($openid) && !empty($fansinfo))) {
empty($fansinfo) || FansService::instance()->set($fansinfo);
return ['openid' => $openid, 'fansinfo' => $fansinfo];
@ -208,9 +209,9 @@ class WechatService extends Service
$wechat = self::WeChatOauth();
if (input('state') !== $appid) {
$snsapi = empty($isfull) ? 'snsapi_base' : 'snsapi_userinfo';
$param = (strpos($url, '?') !== false ? '&' : '?') . 'rcode=' . encode($url);
$OauthUrl = $wechat->getOauthRedirect($url . $param, $appid, $snsapi);
if ($isRedirect) redirect($OauthUrl, 301)->send();
$param = (strpos($source, '?') !== false ? '&' : '?') . 'rcode=' . encode($source);
$OauthUrl = $wechat->getOauthRedirect($source . $param, $appid, $snsapi);
if ($redirect) redirect($OauthUrl, 301)->send();
exit("window.location.href='{$OauthUrl}'");
}
if (($token = $wechat->getOauthAccessToken()) && isset($token['openid'])) {
@ -223,14 +224,14 @@ class WechatService extends Service
}
redirect(enbase64url(input('rcode')), 301)->send();
} else {
$result = self::ThinkAdminConfig()->oauth(session_id(), $url, $isfull);
session("{$appid}_openid", $openid = $result['openid']);
session("{$appid}_fansinfo", $fansinfo = $result['fans']);
$result = self::ThinkAdminConfig()->oauth($this->app->session->getId(), $source, $isfull);
$this->app->session->set("{$appid}_openid", $openid = $result['openid']);
$this->app->session->set("{$appid}_fansinfo", $fansinfo = $result['fans']);
if ((empty($isfull) && !empty($openid)) || (!empty($isfull) && !empty($openid) && !empty($fansinfo))) {
empty($fansinfo) || FansService::instance()->set($fansinfo);
return ['openid' => $openid, 'fansinfo' => $fansinfo];
}
if ($isRedirect && !empty($result['url'])) {
if ($redirect && !empty($result['url'])) {
redirect($result['url'], 301)->send();
}
exit("window.location.href='{$result['url']}'");
@ -254,7 +255,7 @@ class WechatService extends Service
if ($this->getType() === 'api') {
return self::WeChatScript()->getJsSign($url);
} else {
return self::ThinkAdminConfig($this->getAppid())->jsSign($url);
return self::ThinkAdminConfig()->jsSign($url);
}
}
}

@ -0,0 +1,17 @@
{extend name='wechat@api/review/main'}
{block name='content'}
<div class="header"><span>{:date('H:i')}</span></div>
<div class="container">
<div class="logo">A</div>
<div class="content">
<img style="max-width:100%" src="{$content|default=''}">
</div>
</div>
{/block}
{block name='style'}
<style>
.container .content{position:relative;border-radius:5px;border:none!important;display:inline-block;padding:0!important}
</style>
{/block}

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
{block name='title'}{/block}
<meta name="renderer" content="webkit">
<meta name="format-detection" content="telephone=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
<link rel="shortcut icon" href="{:sysconf('site_icon')}">
<link rel="stylesheet" href="__ROOT__/static/theme/css/mobile.css">
{block name='style'}{/block}
<script src="__ROOT__/static/plugs/jquery/pace.min.js"></script>
</head>
<body>{block name='content'}{/block}</body>
</html>

@ -0,0 +1,36 @@
{extend name='wechat@api/review/main'}
{block name='content'}
<div class="header"><span>{:date('H:i')}</span></div>
<div class="container">
<div class="logo">A</div>
<div class="content arrow">
<div style="font-size:.6rem;overflow:hidden;width:7.5rem;text-overflow:ellipsis">{$title|default=''}</div>
<div style="font-size:.5rem;overflow:hidden;width:7.5rem;text-overflow:ellipsis;color:#ccc">{$desc|default=''}</div>
<a href="javascript:void(0)" style="float:right;top:1.4rem;position:absolute;right:0.8rem;" id="audio_btn" class="icon icon-play"></a>
<div style="clear:both"></div>
<audio id="audio">
<source src="{$url|default=''}">
</audio>
<script>
var audio = document.getElementById('audio');
var button = document.getElementById('audio_btn');
setInterval(function () {
button.className = audio.paused ? 'icon icon-play' : 'icon icon-pause';
}, 500);
button.onclick = function () {
audio.paused ? audio.play() : audio.pause()
}
</script>
</div>
</div>
{/block}
{block name='style'}
<style>
.icon{color:#fff;font-size:1.5rem}
.container .content{width:58vw!important;border:none!important;background:#080!important;white-space:nowrap!important}
.container .content:after,.container .content:before{border-color:transparent #080 transparent transparent!important}
.container .content{color:#fff}
</style>
{/block}

@ -0,0 +1,43 @@
{extend name='wechat@api/review/main'}
{block name='content'}
<div class="header"><span>{:date('H:i')}</span></div>
<div class="container">
{notempty name='news.articles'}
{foreach $news.articles as $k => $v}
{if $k < 1}
<a href="{:url('@wechat/api.review/view/'.$v.id)}" style='background-image:url("{$v.local_url}")'>
{if $v.title}<span>{$v.title}</span>{/if}
</a>
<div class="hr-line-dashed"></div>
{else}
<a href="{:url('@wechat/api.review/view/'.$v.id)}" class='other'>
<span>{$v.title}</span>
<span style='background-image:url("{$v.local_url}");'></span>
</a>
<div class="hr-line-dashed"></div>
{/if}
{/foreach}
{else}
<div class="info"><h3>404</h3> 访问资源不存在哦!</div>
{/notempty}
</div>
{/block}
{block name='style'}
<style>
.header{margin-top:15px;text-align:center}
.header span{padding:5px;font-size:8px;background:#ccc;border-radius:10%}
.container{width:90%;display:block;margin:5vw auto;position:relative;box-shadow:0 0 3px #ccc}
.container a{height:50vw;display:block;position:relative;background:no-repeat center center;background-size:cover}
.container a span{left:0;right:0;bottom:0;color:#fff;padding:2vw;font-size:2vw;max-height:5em;overflow:hidden;position:absolute;line-height:1.5em;margin:0 -1px 0 -1px;text-overflow:ellipsis;background:rgba(0,0,0,.7)}
.container a.other{height:15vw;display:block;padding:1vw 2vw;position:relative}
.container a.other span:first-child{color:#333;float:left;width:60vw;height:10vw;overflow:hidden;max-height:none;position:relative;background:0 0;text-overflow:ellipsis}
.container a.other span:last-child{width:16vw;height:10vw;float:right;max-height:none;position:relative;background-size:cover;background-position:center center}
.info h3{color:#333;font-size:5vw;margin-bottom:1rem}
.info{color:#666;padding:2rem;font-size:.5rem;text-align:center;letter-spacing:1px}
.hr-line-dashed{color:#fff;height:1px;margin:3px 0;border-top:1px dashed #e7eaec}
.hr-line-dashed:last-child{display:none}
</style>
{/block}

@ -0,0 +1,9 @@
{extend name='wechat@api/review/main'}
{block name='content'}
<div class="header"><span>{:date('H:i')}</span></div>
<div class="container">
<div class="logo">A</div>
<div class="content arrow">{$content|default=''}</div>
</div>
{/block}

@ -0,0 +1,21 @@
{extend name='wechat@api/review/main'}
{block name='content'}
<div class="header"><span>{:date('H:i')}</span></div>
<div class="container">
<div class="content">
<div>{$title|default=''}</div>
<div class="date">{:date('m月d日')}</div>
<video src="{$url|default=''}" width="100%" controls preload></video>
</div>
</div>
{/block}
{block name='style'}
<style>
.container .content{left:0!important;border:1px solid #ccc;padding:13px;position:relative;max-width:initial!important;background:#fff;line-height:1.5em;border-radius:5px}
.container .content div{width:100%;overflow:hidden;font-size:.8rem;line-height:1.5em;display:inline-block;text-overflow:ellipsis}
.container .content .date{color:#999;margin:10px 0;font-size:12px;line-height:1em}
</style>
{/block}

@ -0,0 +1,33 @@
{extend name='wechat@api/review/main'}
{block name='title'}{/block}
{block name='content'}
<div class="container">
{notempty name='info'}
<h2>{$info.title}</h2>
<h3>
<span style="color:#666">{$info.author}</span>
<span style="margin-left:0.4rem">{:date('Y年m月d日',strtotime($info.create_at))}</span>
</h3>
{if $info.show_cover_pic and $info.local_url}<img src="{$info.local_url}" style="width:100%">{/if}
<div class='content-text'>{$info.content|raw}</div>
<div style="font-size:0.6rem;color:#999;line-height:1rem;text-align:right;margin-top:0.5rem">阅读 {$info.read_num}</div>
{else}
<div class="info"><h3>404</h3> 访问资源不存在哦!</div>
{/notempty}
</div>
{/block}
{block name='style'}
<style>
.container{width:90%;color:#333;display:block;margin:.2rem auto;position:relative}
.container h2{font-size:.8rem;font-weight:400;line-height:1.5rem}
.container h3{color:#999;font-size:.6rem;font-weight:400;line-height:1.5rem;margin-bottom:.3rem}
.container .content-text{font-size:.7rem;line-height:1.3rem}
.container .content-text img{max-width:100%;height:auto!important}
</style>
{/block}

@ -0,0 +1,30 @@
{extend name='wechat@api/review/main'}
{block name='content'}
<div class="header"><span>{:date('H:i')}</span></div>
<div class="container">
<div class="logo">A</div>
<div class="content arrow">
<a class="icon icon-volume left-text"></a>
<a href="javascript:void(0)" id="audio_btn" class="icon icon-pause"></a>
<audio id="audio"><source src="{$url|default=''}"></audio>
<script>
var audio = document.getElementById('audio');
var button = document.getElementById('audio_btn');
setInterval(function () {
button.className = audio.paused ? 'icon icon-play' : 'icon icon-pause';
}, 500);
button.onclick = function () {
audio.paused ? audio.play() : audio.pause()
}
</script>
</div>
</div>
{/block}
{block name='style'}
<style>
.left-text{margin:0!important;color:#ccc!important}
.icon{color:#666;font-size:1.5rem;margin-left:2.5rem;line-height:1.5rem}
</style>
{/block}

@ -0,0 +1,42 @@
<!DOCTYPE html>
<html>
<head>
<title>JSSDK 功能测试</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<link rel="stylesheet" href="__ROOT__/static/theme/css/mobile.css">
</head>
<body>
<header style="padding:35px 0">
<h1 style="text-align:center;font-size:34px;color:#3cc51f;font-weight:400;">JSSDK 功能测试</h1>
</header>
<div style="padding:15px;text-align:center">
<button type="button" style="padding:5px" id='show-alert'>调起摄像头扫码</button>
</div>
<script src="//res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
<script>
wx.error(function (err) {
alert(err.errMsg || '配置出错');
});
wx.config(JSON.parse('{$options|json_encode|raw}'));
wx.ready(function () {
alert('- 初始化成功 -');
document.getElementById('show-alert').onclick = function () {
wx.scanQRCode({
needResult: 1,
scanType: ["qrCode", "barCode"],
success: function (res) {
alert(res.resultStr);
}
});
}
});
</script>
</body>
</html>

@ -0,0 +1,64 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>微信网页授权测试</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<link rel="stylesheet" href="__ROOT__/static/theme/css/mobile.css">
<script src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
</head>
<body>
<!--{if empty($fans.fansinfo)}-->
<fieldset style="width:80%;margin:1rem auto">
<legend style="padding:0.2rem 0.3rem;font-size:0.9rem;color:#666">操作失败</legend>
<div style="padding-top:0.4rem">
<p style="font-size:0.6rem;margin-bottom:0.8rem">通过网页授权获取用户资料失败,请检查权限再试!</p>
<p style="font-size:0.6rem;margin-bottom:0.8rem">
<a href="javascript:void(0);" onclick="location.reload()">重新获取(刷新)</a>
</p>
</div>
</fieldset>
<!--{else}-->
<div class="header" style="padding:1rem 0 0.6rem 0;text-align:center">
<img style='width:132px;height:132px;border-radius:50%;border:0.6rem solid rgba(150,40,40,0.6)' src="{$fans.fansinfo.headimgurl}">
<h1>{$fans.fansinfo.nickname}</h1>
</div>
<fieldset style="width:80%;margin:0.6rem auto">
<legend style="padding:0.2rem 0.3rem;font-size:0.9rem;color:#666">用户标识</legend>
<div style="padding-top:0.4rem">
<div style="font-size:0.8rem;margin-bottom:0.3rem;color:#999">OPENID</div>
<p style="font-size:0.6rem;margin-bottom:0.8rem">{$fans.fansinfo.openid}</p>
<div style="font-size:0.8rem;margin-bottom:0.3rem;color:#999">UNIONID</div>
<p style="font-size:0.6rem;margin-bottom:0.8rem">{$fans.fansinfo.unionid|default='未获取到'}</p>
</div>
</fieldset>
<fieldset style="width:80%;margin:0.6rem auto">
<legend style="padding:0.2rem 0.3rem;font-size:0.9rem;color:#666">详细资料</legend>
<div style="padding-top:0.4rem">
<div style="font-size:0.8rem;margin-bottom:0.3rem;color:#999">性别</div>
<p style="font-size:0.6rem;margin-bottom:0.8rem">{:[1=>'男',2=>'女'][$fans.fansinfo.sex]??'未知'}</p>
<div style="font-size:0.8rem;margin-bottom:0.3rem;color:#999">系统语言</div>
<p style="font-size:0.6rem;margin-bottom:0.8rem">{$fans.fansinfo.language}</p>
<div style="font-size:0.8rem;margin-bottom:0.3rem;color:#999">所在区域</div>
<p style="font-size:0.6rem;margin-bottom:0.8rem">{$fans.fansinfo.country} - {$fans.fansinfo.province} - {$fans.fansinfo.city}</p>
{if isset($fans.fansinfo.privilege.0)}
<div style="font-size:0.8rem;margin-bottom:0.3rem;color:#999">设备网络</div>
<p style="font-size:0.6rem;margin-bottom:0.8rem">{$fans.fansinfo.privilege.0|default='未获取到网络信息'}</p>
{/if}
</div>
</fieldset>
<!--{/if}-->
</body>

@ -19,7 +19,7 @@
<div class="think-box-shadow ">
<div class="layui-anim layui-anim-upbit" data-type="api">{include file='config/options_api'}</div>
<div class="layui-anim layui-anim-upbit" data-type="thr">{include file='config/options_thr'}</div>
<div class="layui-anim layui-anim-upbit" data-type="test">{include file='config/options_help'}</div>
<div class="layui-anim layui-anim-upbit" data-type="test">{include file='config/options_tst'}</div>
</div>
{/block}

@ -10,7 +10,7 @@
<div class="layui-form-item">
<label class="layui-form-label">QRCode<br><span class="nowrap color-desc">公众号二维码</span></label>
<div class="layui-input-block">
<div class="pull-left notselect"><img data-tips-image src="{$wechat.qrcode_url|local_image}" style="width:100px;margin-left:-7px"></div>
<div class="pull-left notselect"><img data-tips-image src="{$wechat.qrcode_url|down_file}" style="width:100px;margin-left:-7px"></div>
<div class="pull-left padding-left-10">
<p class="nowrap">微信昵称:{$wechat.nick_name|default=''}</p>
<p class="nowrap">微信类型:{if $wechat.service_type eq 2}服务号{elseif $wechat.service_type eq 3}小程序{else}订阅号{/if} / {$wechat.verify_type_info == -1 ? '未认证' : '<span class="color-green">已认证</span>'}</p>

@ -1,6 +1,6 @@
<form onsubmit="return false;" data-auto="true" method="post" class='layui-form layui-card padding-bottom-20' autocomplete="off">
<div class="layui-card-body" style="padding-left:40px">
<div class="layui-card-body">
<div class="layui-elem-quote border-0">
<p class="font-s14 margin-bottom-10 color-text">
<strong>第三方平台授权</strong><br>
@ -12,29 +12,29 @@
</p>
<p class="font-s14 color-text">
<strong>支付测试配置</strong><br>
JSAPI支付测试需要在微信商户平台配置支付目录<a data-copy="{:url('@wechat/api.tools/',[],'',true)}">{:url('@wechat/api.tools/',[],'',true)}</a><br>
扫码支付①需要在微信商户平台配置支付通知地址:<a data-copy="{:url('@wechat/api.tools/scanOneNotify',[],'',true)}">{:url('@wechat/api.tools/scanOneNotify',[],'',true)}</a>
JSAPI支付测试需要在微信商户平台配置支付目录<a data-copy="{:url('@wechat/api.test/',[],'',true)}">{:url('@wechat/api.test/',[],'',true)}</a><br>
扫码支付①需要在微信商户平台配置支付通知地址:<a data-copy="{:url('@wechat/api.test/scanOneNotify',[],'',true)}">{:url('@wechat/api.test/scanOneNotify',[],'',true)}</a>
</p>
</div>
<div class="layui-clear">
<div class="pull-left padding-right-15 notselect">
<img class="notselect" data-tips-image src="{:url('@wechat/api.tools/oauth_qrc')}" style="width:120px">
<img class="notselect" data-tips-image src="{:url('@wechat/api.test/oauth_qrc')}" style="width:120px">
<p class="text-center">网页授权</p>
</div>
<div class="pull-left padding-left-0 padding-right-15">
<img class="notselect" data-tips-image src="{:url('@wechat/api.tools/jssdk_qrc')}" style="width:120px;">
<img class="notselect" data-tips-image src="{:url('@wechat/api.test/jssdk_qrc')}" style="width:120px;">
<p class="text-center">JSSDK签名</p>
</div>
<div class="pull-left padding-left-0 padding-right-15">
<img onerror="this.src='__ROOT__/static/theme/img/wechat/qrc_pay_error.jpg'" class="notselect" data-tips-image src="{:url('@wechat/api.tools/jsapiqrc')}" style="width:120px;">
<img onerror="this.src='__ROOT__/static/theme/img/wechat/qrc_pay_error.jpg'" class="notselect" data-tips-image src="{:url('@wechat/api.test/jsapiqrc')}" style="width:120px;">
<p class="text-center">JSAPI支付</p>
</div>
<div class="pull-left padding-left-0 padding-right-15">
<img onerror="this.src='__ROOT__/static/theme/img/wechat/qrc_pay_error.jpg'" class="notselect" data-tips-image src="{:url('@wechat/api.tools/scanoneqrc')}" style="width:120px;">
<img onerror="this.src='__ROOT__/static/theme/img/wechat/qrc_pay_error.jpg'" class="notselect" data-tips-image src="{:url('@wechat/api.test/scanoneqrc')}" style="width:120px;">
<p class="text-center">扫码支付①</p>
</div>
<div class="pull-left padding-left-0">
<img onerror="this.src='__ROOT__/static/theme/img/wechat/qrc_pay_error.jpg'" class="notselect" data-tips-image src="{:url('@wechat/api.tools/scanqrc')}" style="width:120px;">
<img onerror="this.src='__ROOT__/static/theme/img/wechat/qrc_pay_error.jpg'" class="notselect" data-tips-image src="{:url('@wechat/api.test/scanqrc')}" style="width:120px;">
<p class="text-center">扫码支付②</p>
</div>
</div>

@ -25,12 +25,13 @@
"ext-iconv": "*",
"ext-openssl": "*",
"ext-mbstring": "*",
"endroid/qr-code": "^1.9",
"topthink/framework": "^6.0",
"topthink/think-view": "^1.0",
"topthink/think-multi-app": "^1.0",
"zoujingli/ip2region": "^1.0",
"zoujingli/weopen-developer": "dev-master",
"zoujingli/think-library": "6.0.*-dev"
"zoujingli/think-library": "6.0.*-dev",
"zoujingli/weopen-developer": "dev-master"
},
"autoload": {
"psr-4": {

140
composer.lock generated

@ -4,8 +4,74 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "1b0862db0bebe6fd5b8f1edc448e3f5a",
"content-hash": "478fa0752e487da8e0e56bb8e664ea5b",
"packages": [
{
"name": "endroid/qr-code",
"version": "1.9.3",
"source": {
"type": "git",
"url": "https://github.com/endroid/qr-code.git",
"reference": "c9644bec2a9cc9318e98d1437de3c628dcd1ef93"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/endroid/qr-code/zipball/c9644bec2a9cc9318e98d1437de3c628dcd1ef93",
"reference": "c9644bec2a9cc9318e98d1437de3c628dcd1ef93",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"ext-gd": "*",
"php": ">=5.4",
"symfony/options-resolver": "^2.3|^3.0"
},
"require-dev": {
"phpunit/phpunit": "^4.0|^5.0",
"sensio/framework-extra-bundle": "^3.0",
"symfony/browser-kit": "^2.3|^3.0",
"symfony/framework-bundle": "^2.3|^3.0",
"symfony/http-kernel": "^2.3|^3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Endroid\\QrCode\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jeroen van den Enden",
"email": "info@endroid.nl",
"homepage": "http://endroid.nl/"
}
],
"description": "Endroid QR Code",
"homepage": "https://github.com/endroid/QrCode",
"keywords": [
"bundle",
"code",
"endroid",
"qr",
"qrcode",
"symfony"
],
"time": "2017-04-08T09:13:59+00:00"
},
{
"name": "league/flysystem",
"version": "1.0.61",
@ -430,6 +496,66 @@
],
"time": "2017-10-23T01:57:42+00:00"
},
{
"name": "symfony/options-resolver",
"version": "v3.4.36",
"source": {
"type": "git",
"url": "https://github.com/symfony/options-resolver.git",
"reference": "b224d20be60e6f7b55cd66914379a13a0b28651a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/b224d20be60e6f7b55cd66914379a13a0b28651a",
"reference": "b224d20be60e6f7b55cd66914379a13a0b28651a",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": "^5.5.9|>=7.0.8"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.4-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\OptionsResolver\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony OptionsResolver Component",
"homepage": "https://symfony.com",
"keywords": [
"config",
"configuration",
"options"
],
"time": "2019-10-26T11:02:01+00:00"
},
{
"name": "topthink/framework",
"version": "v6.0.0",
@ -783,12 +909,12 @@
"source": {
"type": "git",
"url": "https://github.com/zoujingli/ThinkLibrary.git",
"reference": "a53c211c23698ff2299b499714ba16001af84551"
"reference": "1246ce655df8db112a60bf57037a9a17f4b11d77"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/a53c211c23698ff2299b499714ba16001af84551",
"reference": "a53c211c23698ff2299b499714ba16001af84551",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/1246ce655df8db112a60bf57037a9a17f4b11d77",
"reference": "1246ce655df8db112a60bf57037a9a17f4b11d77",
"shasum": "",
"mirrors": [
{
@ -832,7 +958,7 @@
],
"description": "ThinkPHP v6.0 Development Library",
"homepage": "http://framework.thinkadmin.top",
"time": "2019-12-07T06:46:30+00:00"
"time": "2019-12-09T10:17:25+00:00"
},
{
"name": "zoujingli/wechat-developer",
@ -969,7 +1095,9 @@
"ext-soap": "*",
"ext-json": "*",
"ext-curl": "*",
"ext-iconv": "*"
"ext-iconv": "*",
"ext-openssl": "*",
"ext-mbstring": "*"
},
"platform-dev": []
}

2
vendor/autoload.php vendored

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit078c2496db47e2e94f2057948fdfa517::getLoader();
return ComposerAutoloaderInitada0e677dd8f1307ba83d0cf07626e6c::getLoader();

@ -13,6 +13,20 @@ return array(
'AliPay\\Transfer' => $vendorDir . '/zoujingli/wechat-developer/AliPay/Transfer.php',
'AliPay\\Wap' => $vendorDir . '/zoujingli/wechat-developer/AliPay/Wap.php',
'AliPay\\Web' => $vendorDir . '/zoujingli/wechat-developer/AliPay/Web.php',
'Endroid\\QrCode\\Bundle\\Controller\\QrCodeController' => $vendorDir . '/endroid/qr-code/src/Bundle/Controller/QrCodeController.php',
'Endroid\\QrCode\\Bundle\\DependencyInjection\\Configuration' => $vendorDir . '/endroid/qr-code/src/Bundle/DependencyInjection/Configuration.php',
'Endroid\\QrCode\\Bundle\\DependencyInjection\\EndroidQrCodeExtension' => $vendorDir . '/endroid/qr-code/src/Bundle/DependencyInjection/EndroidQrCodeExtension.php',
'Endroid\\QrCode\\Bundle\\EndroidQrCodeBundle' => $vendorDir . '/endroid/qr-code/src/Bundle/EndroidQrCodeBundle.php',
'Endroid\\QrCode\\Bundle\\Twig\\Extension\\QrCodeExtension' => $vendorDir . '/endroid/qr-code/src/Bundle/Twig/Extension/QrCodeExtension.php',
'Endroid\\QrCode\\Exceptions\\DataDoesntExistsException' => $vendorDir . '/endroid/qr-code/src/Exceptions/DataDoesntExistsException.php',
'Endroid\\QrCode\\Exceptions\\FreeTypeLibraryMissingException' => $vendorDir . '/endroid/qr-code/src/Exceptions/FreeTypeLibraryMissingException.php',
'Endroid\\QrCode\\Exceptions\\ImageFunctionFailedException' => $vendorDir . '/endroid/qr-code/src/Exceptions/ImageFunctionFailedException.php',
'Endroid\\QrCode\\Exceptions\\ImageFunctionUnknownException' => $vendorDir . '/endroid/qr-code/src/Exceptions/ImageFunctionUnknownException.php',
'Endroid\\QrCode\\Exceptions\\ImageSizeTooLargeException' => $vendorDir . '/endroid/qr-code/src/Exceptions/ImageSizeTooLargeException.php',
'Endroid\\QrCode\\Exceptions\\ImageTypeInvalidException' => $vendorDir . '/endroid/qr-code/src/Exceptions/ImageTypeInvalidException.php',
'Endroid\\QrCode\\Exceptions\\VersionTooLargeException' => $vendorDir . '/endroid/qr-code/src/Exceptions/VersionTooLargeException.php',
'Endroid\\QrCode\\Factory\\QrCodeFactory' => $vendorDir . '/endroid/qr-code/src/Factory/QrCodeFactory.php',
'Endroid\\QrCode\\QrCode' => $vendorDir . '/endroid/qr-code/src/QrCode.php',
'Ip2Region' => $vendorDir . '/zoujingli/ip2region/Ip2Region.php',
'League\\Flysystem\\AdapterInterface' => $vendorDir . '/league/flysystem/src/AdapterInterface.php',
'League\\Flysystem\\Adapter\\AbstractAdapter' => $vendorDir . '/league/flysystem/src/Adapter/AbstractAdapter.php',
@ -102,6 +116,18 @@ return array(
'Psr\\SimpleCache\\CacheException' => $vendorDir . '/psr/simple-cache/src/CacheException.php',
'Psr\\SimpleCache\\CacheInterface' => $vendorDir . '/psr/simple-cache/src/CacheInterface.php',
'Psr\\SimpleCache\\InvalidArgumentException' => $vendorDir . '/psr/simple-cache/src/InvalidArgumentException.php',
'Symfony\\Component\\OptionsResolver\\Debug\\OptionsResolverIntrospector' => $vendorDir . '/symfony/options-resolver/Debug/OptionsResolverIntrospector.php',
'Symfony\\Component\\OptionsResolver\\Exception\\AccessException' => $vendorDir . '/symfony/options-resolver/Exception/AccessException.php',
'Symfony\\Component\\OptionsResolver\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/options-resolver/Exception/ExceptionInterface.php',
'Symfony\\Component\\OptionsResolver\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/options-resolver/Exception/InvalidArgumentException.php',
'Symfony\\Component\\OptionsResolver\\Exception\\InvalidOptionsException' => $vendorDir . '/symfony/options-resolver/Exception/InvalidOptionsException.php',
'Symfony\\Component\\OptionsResolver\\Exception\\MissingOptionsException' => $vendorDir . '/symfony/options-resolver/Exception/MissingOptionsException.php',
'Symfony\\Component\\OptionsResolver\\Exception\\NoConfigurationException' => $vendorDir . '/symfony/options-resolver/Exception/NoConfigurationException.php',
'Symfony\\Component\\OptionsResolver\\Exception\\NoSuchOptionException' => $vendorDir . '/symfony/options-resolver/Exception/NoSuchOptionException.php',
'Symfony\\Component\\OptionsResolver\\Exception\\OptionDefinitionException' => $vendorDir . '/symfony/options-resolver/Exception/OptionDefinitionException.php',
'Symfony\\Component\\OptionsResolver\\Exception\\UndefinedOptionsException' => $vendorDir . '/symfony/options-resolver/Exception/UndefinedOptionsException.php',
'Symfony\\Component\\OptionsResolver\\Options' => $vendorDir . '/symfony/options-resolver/Options.php',
'Symfony\\Component\\OptionsResolver\\OptionsResolver' => $vendorDir . '/symfony/options-resolver/OptionsResolver.php',
'We' => $vendorDir . '/zoujingli/wechat-developer/We.php',
'WeChat\\Bind' => $vendorDir . '/zoujingli/weopen-developer/WeChat/Bind.php',
'WeChat\\Card' => $vendorDir . '/zoujingli/wechat-developer/WeChat/Card.php',
@ -176,16 +202,18 @@ return array(
'app\\admin\\controller\\api\\Update' => $baseDir . '/app/admin/controller/api/Update.php',
'app\\admin\\controller\\api\\Upload' => $baseDir . '/app/admin/controller/api/Upload.php',
'app\\index\\controller\\Index' => $baseDir . '/app/index/controller/Index.php',
'app\\service\\controller\\Config' => $baseDir . '/app/service/controller/Config.php',
'app\\service\\controller\\Fans' => $baseDir . '/app/service/controller/Fans.php',
'app\\service\\controller\\Wechat' => $baseDir . '/app/service/controller/Wechat.php',
'app\\service\\controller\\api\\Client' => $baseDir . '/app/service/controller/api/Client.php',
'app\\service\\controller\\api\\Push' => $baseDir . '/app/service/controller/api/Push.php',
'app\\service\\serivce\\ClientService' => $baseDir . '/app/service/serivce/ClientService.php',
'app\\service\\serivce\\ConfigService' => $baseDir . '/app/service/serivce/ConfigService.php',
'app\\service\\serivce\\PublishService' => $baseDir . '/app/service/serivce/PublishService.php',
'app\\service\\serivce\\ReceiveService' => $baseDir . '/app/service/serivce/ReceiveService.php',
'app\\service\\serivce\\WechatService' => $baseDir . '/app/service/serivce/WechatService.php',
'app\\wechat\\controller\\Config' => $baseDir . '/app/wechat/controller/Config.php',
'app\\wechat\\controller\\Fans' => $baseDir . '/app/wechat/controller/Fans.php',
'app\\wechat\\controller\\Keys' => $baseDir . '/app/wechat/controller/Keys.php',
'app\\wechat\\controller\\Menu' => $baseDir . '/app/wechat/controller/Menu.php',
'app\\wechat\\controller\\News' => $baseDir . '/app/wechat/controller/News.php',
'app\\wechat\\controller\\api\\Js' => $baseDir . '/app/wechat/controller/api/Js.php',
'app\\wechat\\controller\\api\\Push' => $baseDir . '/app/wechat/controller/api/Push.php',
'app\\wechat\\controller\\api\\Review' => $baseDir . '/app/wechat/controller/api/Review.php',
'app\\wechat\\controller\\api\\Test' => $baseDir . '/app/wechat/controller/api/Test.php',
'app\\wechat\\service\\FansService' => $baseDir . '/app/wechat/service/FansService.php',
'app\\wechat\\service\\MediaService' => $baseDir . '/app/wechat/service/MediaService.php',
'app\\wechat\\service\\WechatService' => $baseDir . '/app/wechat/service/WechatService.php',
'think\\App' => $vendorDir . '/topthink/framework/src/think/App.php',
'think\\Cache' => $vendorDir . '/topthink/framework/src/think/Cache.php',
'think\\Collection' => $vendorDir . '/topthink/think-helper/src/Collection.php',

@ -15,6 +15,7 @@ return array(
'WeOpen\\' => array($vendorDir . '/zoujingli/weopen-developer/WeOpen'),
'WeMini\\' => array($vendorDir . '/zoujingli/wechat-developer/WeMini', $vendorDir . '/zoujingli/weopen-developer/WeMini'),
'WeChat\\' => array($vendorDir . '/zoujingli/wechat-developer/WeChat', $vendorDir . '/zoujingli/weopen-developer/WeChat'),
'Symfony\\Component\\OptionsResolver\\' => array($vendorDir . '/symfony/options-resolver'),
'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'),
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
@ -22,5 +23,6 @@ return array(
'Opis\\Closure\\' => array($vendorDir . '/opis/closure/src'),
'League\\Flysystem\\Cached\\' => array($vendorDir . '/league/flysystem-cached-adapter/src'),
'League\\Flysystem\\' => array($vendorDir . '/league/flysystem/src'),
'Endroid\\QrCode\\' => array($vendorDir . '/endroid/qr-code/src'),
'AliPay\\' => array($vendorDir . '/zoujingli/wechat-developer/AliPay'),
);

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit078c2496db47e2e94f2057948fdfa517
class ComposerAutoloaderInitada0e677dd8f1307ba83d0cf07626e6c
{
private static $loader;
@ -19,15 +19,15 @@ class ComposerAutoloaderInit078c2496db47e2e94f2057948fdfa517
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit078c2496db47e2e94f2057948fdfa517', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitada0e677dd8f1307ba83d0cf07626e6c', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit078c2496db47e2e94f2057948fdfa517', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitada0e677dd8f1307ba83d0cf07626e6c', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit078c2496db47e2e94f2057948fdfa517::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitada0e677dd8f1307ba83d0cf07626e6c::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
@ -48,19 +48,19 @@ class ComposerAutoloaderInit078c2496db47e2e94f2057948fdfa517
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit078c2496db47e2e94f2057948fdfa517::$files;
$includeFiles = Composer\Autoload\ComposerStaticInitada0e677dd8f1307ba83d0cf07626e6c::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire078c2496db47e2e94f2057948fdfa517($fileIdentifier, $file);
composerRequireada0e677dd8f1307ba83d0cf07626e6c($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequire078c2496db47e2e94f2057948fdfa517($fileIdentifier, $file)
function composerRequireada0e677dd8f1307ba83d0cf07626e6c($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit078c2496db47e2e94f2057948fdfa517
class ComposerStaticInitada0e677dd8f1307ba83d0cf07626e6c
{
public static $files = array (
'9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php',
@ -31,6 +31,10 @@ class ComposerStaticInit078c2496db47e2e94f2057948fdfa517
'WeMini\\' => 7,
'WeChat\\' => 7,
),
'S' =>
array (
'Symfony\\Component\\OptionsResolver\\' => 34,
),
'P' =>
array (
'Psr\\SimpleCache\\' => 16,
@ -47,6 +51,10 @@ class ComposerStaticInit078c2496db47e2e94f2057948fdfa517
'League\\Flysystem\\Cached\\' => 24,
'League\\Flysystem\\' => 17,
),
'E' =>
array (
'Endroid\\QrCode\\' => 15,
),
'A' =>
array (
'AliPay\\' => 7,
@ -95,6 +103,10 @@ class ComposerStaticInit078c2496db47e2e94f2057948fdfa517
0 => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeChat',
1 => __DIR__ . '/..' . '/zoujingli/weopen-developer/WeChat',
),
'Symfony\\Component\\OptionsResolver\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/options-resolver',
),
'Psr\\SimpleCache\\' =>
array (
0 => __DIR__ . '/..' . '/psr/simple-cache/src',
@ -123,6 +135,10 @@ class ComposerStaticInit078c2496db47e2e94f2057948fdfa517
array (
0 => __DIR__ . '/..' . '/league/flysystem/src',
),
'Endroid\\QrCode\\' =>
array (
0 => __DIR__ . '/..' . '/endroid/qr-code/src',
),
'AliPay\\' =>
array (
0 => __DIR__ . '/..' . '/zoujingli/wechat-developer/AliPay',
@ -137,6 +153,20 @@ class ComposerStaticInit078c2496db47e2e94f2057948fdfa517
'AliPay\\Transfer' => __DIR__ . '/..' . '/zoujingli/wechat-developer/AliPay/Transfer.php',
'AliPay\\Wap' => __DIR__ . '/..' . '/zoujingli/wechat-developer/AliPay/Wap.php',
'AliPay\\Web' => __DIR__ . '/..' . '/zoujingli/wechat-developer/AliPay/Web.php',
'Endroid\\QrCode\\Bundle\\Controller\\QrCodeController' => __DIR__ . '/..' . '/endroid/qr-code/src/Bundle/Controller/QrCodeController.php',
'Endroid\\QrCode\\Bundle\\DependencyInjection\\Configuration' => __DIR__ . '/..' . '/endroid/qr-code/src/Bundle/DependencyInjection/Configuration.php',
'Endroid\\QrCode\\Bundle\\DependencyInjection\\EndroidQrCodeExtension' => __DIR__ . '/..' . '/endroid/qr-code/src/Bundle/DependencyInjection/EndroidQrCodeExtension.php',
'Endroid\\QrCode\\Bundle\\EndroidQrCodeBundle' => __DIR__ . '/..' . '/endroid/qr-code/src/Bundle/EndroidQrCodeBundle.php',
'Endroid\\QrCode\\Bundle\\Twig\\Extension\\QrCodeExtension' => __DIR__ . '/..' . '/endroid/qr-code/src/Bundle/Twig/Extension/QrCodeExtension.php',
'Endroid\\QrCode\\Exceptions\\DataDoesntExistsException' => __DIR__ . '/..' . '/endroid/qr-code/src/Exceptions/DataDoesntExistsException.php',
'Endroid\\QrCode\\Exceptions\\FreeTypeLibraryMissingException' => __DIR__ . '/..' . '/endroid/qr-code/src/Exceptions/FreeTypeLibraryMissingException.php',
'Endroid\\QrCode\\Exceptions\\ImageFunctionFailedException' => __DIR__ . '/..' . '/endroid/qr-code/src/Exceptions/ImageFunctionFailedException.php',
'Endroid\\QrCode\\Exceptions\\ImageFunctionUnknownException' => __DIR__ . '/..' . '/endroid/qr-code/src/Exceptions/ImageFunctionUnknownException.php',
'Endroid\\QrCode\\Exceptions\\ImageSizeTooLargeException' => __DIR__ . '/..' . '/endroid/qr-code/src/Exceptions/ImageSizeTooLargeException.php',
'Endroid\\QrCode\\Exceptions\\ImageTypeInvalidException' => __DIR__ . '/..' . '/endroid/qr-code/src/Exceptions/ImageTypeInvalidException.php',
'Endroid\\QrCode\\Exceptions\\VersionTooLargeException' => __DIR__ . '/..' . '/endroid/qr-code/src/Exceptions/VersionTooLargeException.php',
'Endroid\\QrCode\\Factory\\QrCodeFactory' => __DIR__ . '/..' . '/endroid/qr-code/src/Factory/QrCodeFactory.php',
'Endroid\\QrCode\\QrCode' => __DIR__ . '/..' . '/endroid/qr-code/src/QrCode.php',
'Ip2Region' => __DIR__ . '/..' . '/zoujingli/ip2region/Ip2Region.php',
'League\\Flysystem\\AdapterInterface' => __DIR__ . '/..' . '/league/flysystem/src/AdapterInterface.php',
'League\\Flysystem\\Adapter\\AbstractAdapter' => __DIR__ . '/..' . '/league/flysystem/src/Adapter/AbstractAdapter.php',
@ -226,6 +256,18 @@ class ComposerStaticInit078c2496db47e2e94f2057948fdfa517
'Psr\\SimpleCache\\CacheException' => __DIR__ . '/..' . '/psr/simple-cache/src/CacheException.php',
'Psr\\SimpleCache\\CacheInterface' => __DIR__ . '/..' . '/psr/simple-cache/src/CacheInterface.php',
'Psr\\SimpleCache\\InvalidArgumentException' => __DIR__ . '/..' . '/psr/simple-cache/src/InvalidArgumentException.php',
'Symfony\\Component\\OptionsResolver\\Debug\\OptionsResolverIntrospector' => __DIR__ . '/..' . '/symfony/options-resolver/Debug/OptionsResolverIntrospector.php',
'Symfony\\Component\\OptionsResolver\\Exception\\AccessException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/AccessException.php',
'Symfony\\Component\\OptionsResolver\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/ExceptionInterface.php',
'Symfony\\Component\\OptionsResolver\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/InvalidArgumentException.php',
'Symfony\\Component\\OptionsResolver\\Exception\\InvalidOptionsException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/InvalidOptionsException.php',
'Symfony\\Component\\OptionsResolver\\Exception\\MissingOptionsException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/MissingOptionsException.php',
'Symfony\\Component\\OptionsResolver\\Exception\\NoConfigurationException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/NoConfigurationException.php',
'Symfony\\Component\\OptionsResolver\\Exception\\NoSuchOptionException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/NoSuchOptionException.php',
'Symfony\\Component\\OptionsResolver\\Exception\\OptionDefinitionException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/OptionDefinitionException.php',
'Symfony\\Component\\OptionsResolver\\Exception\\UndefinedOptionsException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/UndefinedOptionsException.php',
'Symfony\\Component\\OptionsResolver\\Options' => __DIR__ . '/..' . '/symfony/options-resolver/Options.php',
'Symfony\\Component\\OptionsResolver\\OptionsResolver' => __DIR__ . '/..' . '/symfony/options-resolver/OptionsResolver.php',
'We' => __DIR__ . '/..' . '/zoujingli/wechat-developer/We.php',
'WeChat\\Bind' => __DIR__ . '/..' . '/zoujingli/weopen-developer/WeChat/Bind.php',
'WeChat\\Card' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeChat/Card.php',
@ -300,16 +342,18 @@ class ComposerStaticInit078c2496db47e2e94f2057948fdfa517
'app\\admin\\controller\\api\\Update' => __DIR__ . '/../..' . '/app/admin/controller/api/Update.php',
'app\\admin\\controller\\api\\Upload' => __DIR__ . '/../..' . '/app/admin/controller/api/Upload.php',
'app\\index\\controller\\Index' => __DIR__ . '/../..' . '/app/index/controller/Index.php',
'app\\service\\controller\\Config' => __DIR__ . '/../..' . '/app/service/controller/Config.php',
'app\\service\\controller\\Fans' => __DIR__ . '/../..' . '/app/service/controller/Fans.php',
'app\\service\\controller\\Wechat' => __DIR__ . '/../..' . '/app/service/controller/Wechat.php',
'app\\service\\controller\\api\\Client' => __DIR__ . '/../..' . '/app/service/controller/api/Client.php',
'app\\service\\controller\\api\\Push' => __DIR__ . '/../..' . '/app/service/controller/api/Push.php',
'app\\service\\serivce\\ClientService' => __DIR__ . '/../..' . '/app/service/serivce/ClientService.php',
'app\\service\\serivce\\ConfigService' => __DIR__ . '/../..' . '/app/service/serivce/ConfigService.php',
'app\\service\\serivce\\PublishService' => __DIR__ . '/../..' . '/app/service/serivce/PublishService.php',
'app\\service\\serivce\\ReceiveService' => __DIR__ . '/../..' . '/app/service/serivce/ReceiveService.php',
'app\\service\\serivce\\WechatService' => __DIR__ . '/../..' . '/app/service/serivce/WechatService.php',
'app\\wechat\\controller\\Config' => __DIR__ . '/../..' . '/app/wechat/controller/Config.php',
'app\\wechat\\controller\\Fans' => __DIR__ . '/../..' . '/app/wechat/controller/Fans.php',
'app\\wechat\\controller\\Keys' => __DIR__ . '/../..' . '/app/wechat/controller/Keys.php',
'app\\wechat\\controller\\Menu' => __DIR__ . '/../..' . '/app/wechat/controller/Menu.php',
'app\\wechat\\controller\\News' => __DIR__ . '/../..' . '/app/wechat/controller/News.php',
'app\\wechat\\controller\\api\\Js' => __DIR__ . '/../..' . '/app/wechat/controller/api/Js.php',
'app\\wechat\\controller\\api\\Push' => __DIR__ . '/../..' . '/app/wechat/controller/api/Push.php',
'app\\wechat\\controller\\api\\Review' => __DIR__ . '/../..' . '/app/wechat/controller/api/Review.php',
'app\\wechat\\controller\\api\\Test' => __DIR__ . '/../..' . '/app/wechat/controller/api/Test.php',
'app\\wechat\\service\\FansService' => __DIR__ . '/../..' . '/app/wechat/service/FansService.php',
'app\\wechat\\service\\MediaService' => __DIR__ . '/../..' . '/app/wechat/service/MediaService.php',
'app\\wechat\\service\\WechatService' => __DIR__ . '/../..' . '/app/wechat/service/WechatService.php',
'think\\App' => __DIR__ . '/..' . '/topthink/framework/src/think/App.php',
'think\\Cache' => __DIR__ . '/..' . '/topthink/framework/src/think/Cache.php',
'think\\Collection' => __DIR__ . '/..' . '/topthink/think-helper/src/Collection.php',
@ -585,9 +629,9 @@ class ComposerStaticInit078c2496db47e2e94f2057948fdfa517
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit078c2496db47e2e94f2057948fdfa517::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit078c2496db47e2e94f2057948fdfa517::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit078c2496db47e2e94f2057948fdfa517::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitada0e677dd8f1307ba83d0cf07626e6c::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitada0e677dd8f1307ba83d0cf07626e6c::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitada0e677dd8f1307ba83d0cf07626e6c::$classMap;
}, null, ClassLoader::class);
}

@ -1,4 +1,72 @@
[
{
"name": "endroid/qr-code",
"version": "1.9.3",
"version_normalized": "1.9.3.0",
"source": {
"type": "git",
"url": "https://github.com/endroid/qr-code.git",
"reference": "c9644bec2a9cc9318e98d1437de3c628dcd1ef93"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/endroid/qr-code/zipball/c9644bec2a9cc9318e98d1437de3c628dcd1ef93",
"reference": "c9644bec2a9cc9318e98d1437de3c628dcd1ef93",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"ext-gd": "*",
"php": ">=5.4",
"symfony/options-resolver": "^2.3|^3.0"
},
"require-dev": {
"phpunit/phpunit": "^4.0|^5.0",
"sensio/framework-extra-bundle": "^3.0",
"symfony/browser-kit": "^2.3|^3.0",
"symfony/framework-bundle": "^2.3|^3.0",
"symfony/http-kernel": "^2.3|^3.0"
},
"time": "2017-04-08T09:13:59+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"Endroid\\QrCode\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jeroen van den Enden",
"email": "info@endroid.nl",
"homepage": "http://endroid.nl/"
}
],
"description": "Endroid QR Code",
"homepage": "https://github.com/endroid/QrCode",
"keywords": [
"bundle",
"code",
"endroid",
"qr",
"qrcode",
"symfony"
]
},
{
"name": "league/flysystem",
"version": "1.0.61",
@ -437,6 +505,68 @@
"simple-cache"
]
},
{
"name": "symfony/options-resolver",
"version": "v3.4.36",
"version_normalized": "3.4.36.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/options-resolver.git",
"reference": "b224d20be60e6f7b55cd66914379a13a0b28651a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/b224d20be60e6f7b55cd66914379a13a0b28651a",
"reference": "b224d20be60e6f7b55cd66914379a13a0b28651a",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": "^5.5.9|>=7.0.8"
},
"time": "2019-10-26T11:02:01+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.4-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"Symfony\\Component\\OptionsResolver\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony OptionsResolver Component",
"homepage": "https://symfony.com",
"keywords": [
"config",
"configuration",
"options"
]
},
{
"name": "topthink/framework",
"version": "v6.0.0",
@ -805,12 +935,12 @@
"source": {
"type": "git",
"url": "https://github.com/zoujingli/ThinkLibrary.git",
"reference": "a53c211c23698ff2299b499714ba16001af84551"
"reference": "1246ce655df8db112a60bf57037a9a17f4b11d77"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/a53c211c23698ff2299b499714ba16001af84551",
"reference": "a53c211c23698ff2299b499714ba16001af84551",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/1246ce655df8db112a60bf57037a9a17f4b11d77",
"reference": "1246ce655df8db112a60bf57037a9a17f4b11d77",
"shasum": "",
"mirrors": [
{
@ -826,7 +956,7 @@
"ext-json": "*",
"topthink/framework": "^6.0"
},
"time": "2019-12-07T06:46:30+00:00",
"time": "2019-12-09T10:17:25+00:00",
"type": "library",
"extra": {
"think": {

5
vendor/endroid/qr-code/.gitignore vendored Normal file

@ -0,0 +1,5 @@
/bin
/composer.lock
/composer.phar
/phpunit.xml
/vendor

21
vendor/endroid/qr-code/.travis.yml vendored Normal file

@ -0,0 +1,21 @@
language: php
php:
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
- hhvm
matrix:
fast_finish: true
before_install:
- if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then phpenv config-rm xdebug.ini; fi;
- composer self-update && composer install --no-interaction
script: bin/phpunit
notifications:
email: info@endroid.nl

19
vendor/endroid/qr-code/LICENSE vendored Normal file

@ -0,0 +1,19 @@
Copyright (c) Jeroen van den Enden
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

132
vendor/endroid/qr-code/README.md vendored Normal file

@ -0,0 +1,132 @@
QR Code
=======
*By [endroid](http://endroid.nl/)*
[![Latest Stable Version](http://img.shields.io/packagist/v/endroid/qrcode.svg)](https://packagist.org/packages/endroid/qrcode)
[![Build Status](http://img.shields.io/travis/endroid/QrCode.svg)](http://travis-ci.org/endroid/QrCode)
[![Total Downloads](http://img.shields.io/packagist/dt/endroid/qrcode.svg)](https://packagist.org/packages/endroid/qrcode)
[![Monthly Downloads](http://img.shields.io/packagist/dm/endroid/qrcode.svg)](https://packagist.org/packages/endroid/qrcode)
[![License](http://img.shields.io/packagist/l/endroid/qrcode.svg)](https://packagist.org/packages/endroid/qrcode)
This library based on QRcode Perl CGI & PHP scripts by Y. Swetake helps you generate images containing a QR code.
## Installation
Use [Composer](https://getcomposer.org/) to install the library.
``` bash
$ composer require endroid/qrcode
```
## Usage
```php
use Endroid\QrCode\QrCode;
$qrCode = new QrCode();
$qrCode
->setText('Life is too short to be generating QR codes')
->setSize(300)
->setPadding(10)
->setErrorCorrection('high')
->setForegroundColor(['r' => 0, 'g' => 0, 'b' => 0, 'a' => 0])
->setBackgroundColor(['r' => 255, 'g' => 255, 'b' => 255, 'a' => 0])
->setLabel('Scan the code')
->setLabelFontSize(16)
->setImageType(QrCode::IMAGE_TYPE_PNG)
;
// now we can directly output the qrcode
header('Content-Type: '.$qrCode->getContentType());
$qrCode->render();
// save it to a file
$qrCode->save('qrcode.png');
// or create a response object
$response = new Response($qrCode->get(), 200, ['Content-Type' => $qrCode->getContentType()]);
```
![QR Code](http://endroid.nl/qrcode/Life%20is%20too%20short%20to%20be%20generating%20QR%20codes.png?label=Scan%20the%20code)
## Symfony integration
Register the Symfony bundle in the kernel.
```php
// app/AppKernel.php
public function registerBundles()
{
$bundles = [
// ...
new Endroid\QrCode\Bundle\EndroidQrCodeBundle(),
];
}
```
The default parameters can be overridden via the configuration.
Alpha channel available range is [0, 127] in foreground and background colors.
```yaml
endroid_qr_code:
size: 100
padding: 10
extension: gif
error_correction_level: high
foreground_color: { r: 0, g: 0, b: 0, a: 0 }
background_color: { r: 255, g: 255, b: 255, a: 0 }
label: 'My label'
label_font_size: 16
```
Now you can retrieve the factory as follows.
```php
$factory = $this->get('endroid.qrcode.factory');
$factory->createQrCode();
```
Add the following section to your routing to be able to handle QR code URLs.
This step can be skipped when you only use data URIs to display your images.
``` yml
EndroidQrCodeBundle:
resource: "@EndroidQrCodeBundle/Controller/"
type: annotation
prefix: /qrcode
```
After installation and configuration, QR codes can be generated by appending
the QR code text to the url as mounted, followed by .png, .jpg or .gif.
## Twig extension
The bundle also provides a Twig extension for quickly generating QR code urls.
Optional parameters are extension, size, padding and errorCorrectionLevel. When
a parameter is omitted, the value in the bundle configuration is used.
``` twig
<img src="{{ qrcode_url(message) }}" />
<img src="{{ qrcode_url(message, { extension: 'png' }) }}" />
<img src="{{ qrcode_url(message, { size: 150 }) }}" />
```
You can also use the data URI helper to embed the QR code within your HTML
instead of requiring a separate HTTP request to load your image.
``` twig
<img src="{{ qrcode_data_uri(message, { size: 200, padding: 10 }) }}" />
```
## Versioning
Version numbers follow the MAJOR.MINOR.PATCH scheme. Backwards compatibility
breaking changes will be kept to a minimum but be aware that these can occur.
Lock your dependencies for production and test your code when upgrading.
## License
This bundle is under the MIT license. For the full copyright and license
information please view the LICENSE file that was distributed with this source code.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More