Ver Fonte

Merge branch 'wx-kw' into test

zqwang há 1 ano atrás
pai
commit
85cc5adb98

+ 1 - 6
modules/WechatPlatform/Http/Controllers/WechatMenuController.php

@@ -190,11 +190,6 @@ class WechatMenuController extends CatchController
 
 
     public function test()
     public function test()
     {
     {
-        $info = WechatOpenPlatformService::getAppInfoById(8);
-        $componentInfo = WechatOpenPlatformService::getComponentInfoByAppid($info->component_appid);
-        $openPlatform = WechatOpenPlatformService::buildApplication($componentInfo);
-        $app = $openPlatform->officialAccount($info->authorizer_appid, getProp($info, 'authorizer_refresh_token'));
-        unset($appInfo);
-        return $app->menu->list();
+        // return  WechatMenuService::getClickInfoContent(8,'1-3');
     }
     }
 }
 }

+ 7 - 1
modules/WechatPlatform/Services/WechatMenuService.php

@@ -370,7 +370,13 @@ class WechatMenuService extends BaseService
         if (empty($content)){
         if (empty($content)){
             return  "";
             return  "";
         }
         }
-        $content = getProp($content,$key);
+        foreach ($content as  $val){
+
+            if (isset($val[$key])){echo "<pre><hr>";
+               $content  =  $val[$key];
+               break ;
+            }
+        }
         return  $content ?: "";
         return  $content ?: "";
     }
     }