'wx', 'wx' => array( "appId" => '', "nonceStr" => '', "timestamp" => '', "url" => '', "signature" => '', "rawString" => '', ), ); if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') !== false ) { $config['type'] = self::type_wx; } // if ( stripos($_SERVER['HTTP_USER_AGENT'], 'qq') !== false ) { // $config['type'] = self::type_qq; // } // // if ( stripos($_SERVER['HTTP_USER_AGENT'], 'weibo') !== false ) { // $config['type'] = self::type_wb; // } if ($config['type'] == self::type_wx) { $APPID = \Common\Common\share\WxShareServer::APPID; $APPSECRET = \Common\Common\share\WxShareServer::APPSECRET; $wxShare = new \Common\Common\share\WxShareServer($APPID, $APPSECRET); $wx_config = $wxShare->getSignPackage(); $config['wx'] = $wx_config; } return $config; } }