作者 Your Name

gx

  1 +<html>
  2 +<head><title>404 Not Found</title></head>
  3 +<body>
  4 +<center><h1>404 Not Found</h1></center>
  5 +<hr><center>nginx</center>
  6 +</body>
  7 +</html>
@@ -21,7 +21,7 @@ use Illuminate\Support\Facades\Cache; @@ -21,7 +21,7 @@ use Illuminate\Support\Facades\Cache;
21 */ 21 */
22 class Wechat 22 class Wechat
23 { 23 {
24 - public $alias = '_v6-test'; 24 + public $alias = '_v6';
25 public $appid = 'wx8253a38fd7ae78f0'; 25 public $appid = 'wx8253a38fd7ae78f0';
26 public $appSecret = '20981cca3d00c074a8886f115d19548d'; 26 public $appSecret = '20981cca3d00c074a8886f115d19548d';
27 27
@@ -34,7 +34,7 @@ class Wechat @@ -34,7 +34,7 @@ class Wechat
34 */ 34 */
35 public function getAccessToken() 35 public function getAccessToken()
36 { 36 {
37 - $token = file_get_contents("http://wechat.globalso.com/api/accesstoken/v6-test"); 37 + $token = file_get_contents("http://wechat.globalso.com/api/accesstoken/v6");
38 return $token; 38 return $token;
39 } 39 }
40 /** 40 /**
@@ -164,10 +164,16 @@ class LoginController extends BaseController @@ -164,10 +164,16 @@ class LoginController extends BaseController
164 * @time :2023/8/24 9:30 164 * @time :2023/8/24 9:30
165 */ 165 */
166 public function eventMessage(){ 166 public function eventMessage(){
167 -// $message = file_get_contents("php://input");  
168 -// $message = simplexml_load_string($message, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOERROR);  
169 -// @file_put_contents(storage_path('logs/lyh_error.log'), $message . PHP_EOL, FILE_APPEND);  
170 - $this->response('success'); 167 + $message = file_get_contents("php://input");
  168 + $message = simplexml_load_string($message, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOERROR);
  169 + @file_put_contents(storage_path('logs/hook/wx.log'), var_export($message, true) . PHP_EOL, FILE_APPEND);
  170 + return "<xml>
  171 + <ToUserName><![CDATA[$message->FromUserName]]></ToUserName>
  172 + <FromUserName><![CDATA[$message->ToUserName]]></FromUserName>
  173 + <CreateTime>".time()."</CreateTime>
  174 + <MsgType><![CDATA[text]]></MsgType>
  175 + <Content><![CDATA[扫码成功了]]></Content>
  176 + </xml>";
171 } 177 }
172 178
173 179
  1 +<!doctype html>
  2 +<html>
  3 +<head>
  4 + <meta charset="utf-8">
  5 + <title>恭喜,站点创建成功!</title>
  6 + <style>
  7 + .container {
  8 + width: 60%;
  9 + margin: 10% auto 0;
  10 + background-color: #f0f0f0;
  11 + padding: 2% 5%;
  12 + border-radius: 10px
  13 + }
  14 +
  15 + ul {
  16 + padding-left: 20px;
  17 + }
  18 +
  19 + ul li {
  20 + line-height: 2.3
  21 + }
  22 +
  23 + a {
  24 + color: #20a53a
  25 + }
  26 + </style>
  27 +</head>
  28 +<body>
  29 + <div class="container">
  30 + <h1>恭喜, 站点创建成功!</h1>
  31 + <h3>这是默认index.html,本页面由系统自动生成</h3>
  32 + <ul>
  33 + <li>本页面在FTP根目录下的index.html</li>
  34 + <li>您可以修改、删除或覆盖本页面</li>
  35 + <li>FTP相关信息,请到“面板系统后台 > FTP” 查看</li>
  36 + </ul>
  37 + </div>
  38 +</body>
  39 +</html>
  1 +OVatVgfhsrm_aegL02EYqhICpZAaunOZPfn8yEuby2s.3cPo6boRQoXspiio5AnhCF8zPCXVJzlazJRcktmRn-Y
  1 +kxWexxJJFyqeRjaKdORH93QIf3VQ0PU4aQuFuGWlkTY.3cPo6boRQoXspiio5AnhCF8zPCXVJzlazJRcktmRn-Y