wupengfei il y a 2 ans
Parent
commit
a8045995b4
2 fichiers modifiés avec 19 ajouts et 4 suppressions
  1. 16 4
      application/extra/addons.php
  2. 3 0
      thinkphp/library/think/Hook.php

+ 16 - 4
application/extra/addons.php

@@ -15,17 +15,29 @@ return [
             'alisms',
             'qcloudsms',
         ],
+        'app_init' => [
+            'epay',
+            'shopro',
+        ],
+        'user_sidenav_after' => [
+            'invite',
+        ],
+        'user_register_successed' => [
+            'invite',
+        ],
+        'posters' => [
+            'posters',
+        ],
         'config_init' => [
             'qcloudsms',
         ],
         'upgrade' => [
             'shopro',
         ],
-        'app_init' => [
-            'shopro',
-        ],
     ],
-    'route' => [],
+    'route' => [
+        '/invite/[:id]$' => 'invite/index/index',
+    ],
     'priority' => [],
     'domain' => '',
 ];

+ 3 - 0
thinkphp/library/think/Hook.php

@@ -94,6 +94,8 @@ class Hook
         foreach (static::get($tag) as $key => $name) {
             $results[$key] = self::exec($name, $tag, $params, $extra);
             // 如果返回 false,或者仅获取一个有效返回则中断行为执行
+
+
             if (false === $results[$key] || (!is_null($results[$key]) && $once)) {
                 break;
             }
@@ -113,6 +115,7 @@ class Hook
      */
     public static function exec($class, $tag = '', &$params = null, $extra = null)
     {
+        var_dump($class);
         App::$debug && Debug::remark('behavior_start', 'time');
 
         $method = Loader::parseName($tag, 1, false);