mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
Update Wechat.php
This commit is contained in:
parent
4862fe3a76
commit
5cc35a0a48
@ -94,14 +94,23 @@ class Wechat extends Controller
|
|||||||
* 网页授权测试
|
* 网页授权测试
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function test()
|
public function test(): string
|
||||||
{
|
{
|
||||||
$base = sysuri('data/api.wechat/oauth', [], false, true);
|
$base = sysuri('data/api.wechat/oauth', [], false, true);
|
||||||
return <<<EOL
|
return <<<EOL
|
||||||
<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
|
<html lang="zh">
|
||||||
<script src="{$base}?mode=1"></script>
|
<head>
|
||||||
<div id="content"></div>
|
<title>网页授权测试</title>
|
||||||
<script>document.getElementById('content').innerText = JSON.stringify(wx);</script>
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="content"></div>
|
||||||
|
<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
|
||||||
|
<script src="{$base}?mode=1"></script>
|
||||||
|
<script>document.getElementById('content').innerText = JSON.stringify(window.WeChatFansInfo);</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
EOL;
|
EOL;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user