original_string: public function getPreAuthorizationUrl(string $callbackUrl, $optional = []): string
      {
          // 兼容旧版 API 设计
          if (\is_string($optional)) {
              $optional = [
                  'pre_auth_code' => $optional,
              ];
          } else {
              $optional['pre_auth_code'] = $this->createPreAuthorizationCode()['pre_auth_code'];
          }
  
          $queries = \array_merge($optional, [
              'component_appid' => $this['config']['app_id'],
              'redirect_uri' => $callbackUrl,
          ]);
  
          return 'https://mp.weixin.qq.com/cgi-bin/componentloginpage?'.http_build_query($queries);
      }
code: public function getPreAuthorizationUrl(string $callbackUrl, $optional = []): string
      {
          // 兼容旧版 API 设计
          if (\is_string($optional)) {
              $optional = [
                  'pre_auth_code' => $optional,
              ];
          } else {
              $optional['pre_auth_code'] = $this->createPreAuthorizationCode()['pre_auth_code'];
          }
  
          $queries = \array_merge($optional, [
              'component_appid' => $this['config']['app_id'],
              'redirect_uri' => $callbackUrl,
          ]);
  
          return 'https://mp.weixin.qq.com/cgi-bin/componentloginpage?'.http_build_query($queries);
      }
code_tokens: public function getPreAuthorizationUrl ( string $ callbackUrl , $ optional = [ ] ) : string { // 兼容旧版 API 设计 if ( \ is_string ( $ optional ) ) { $ optional = [ 'pre_auth_code' => $ optional , ] ; } else { $ optional [ 'pre_auth_code' ] = $ this -> createPreAuthorizationCode ( ) [ 'pre_auth_code' ] ; } $ queries = \ array_merge ( $ optional , [ 'component_appid' => $ this [ 'config' ] [ 'app_id' ] , 'redirect_uri' => $ callbackUrl , ] ) ; return 'https://mp.weixin.qq.com/cgi-bin/componentloginpage?' . http_build_query ( $ queries ) ; }
docstring: Return the pre-authorization login page url.
  
  @param string            $callbackUrl
  @param string|array|null $optional
  
  @return string
docstring_tokens: Return the pre - authorization login page url .