getConfig($this->site_id, 'WECHAT_MENU')['value'] ?? []; } /** * 更新微信菜单 * @param array $data * @return SysConfig|bool|Model * @throws GuzzleException * @throws InvalidConfigException */ public function edit(array $data){ $core_wechat_api_service = new CoreWechatApiService(); $menu_result = $core_wechat_api_service->menuCreate($this->site_id, $data); if(!empty($menu_result['errcode']) && $menu_result['errcode'] != 0) throw new WechatException($menu_result['errmsg']); //先尝试改变微信接口菜单 $core_config_service = new CoreConfigService(); return $core_config_service->setConfig($this->site_id, 'WECHAT_MENU', $data); } }