def get_authorize_url(self, redirect_uri, scope='<STR_LIT>', state='<STR_LIT>'):
redirect_uri = quote(redirect_uri, safe=b'<STR_LIT>')<EOL>url_list = [<EOL>self.OAUTH_BASE_URL,<EOL>'<STR_LIT>',<EOL>self.app_id,<EOL>'<STR_LIT>',<EOL>redirect_uri,<EOL>'<STR_LIT>',<EOL>scope,<EOL>]<EOL>if state:<EOL><INDENT>url_list.extend(['<STR_LIT>', state])<EOL><DEDENT>url_list.extend([<EOL>'<STR_LIT>',<EOL>self.component.component_appid,<EOL>])<EOL>url_list.append('<STR_LIT>')<EOL>return '<STR_LIT>'.join(url_list)<EOL>
:param redirect_uri: 重定向地址，需要urlencode，这里填写的应是服务开发方的回调地址
:param scope: 可选，微信公众号 OAuth2 scope，默认为 ``snsapi_base``
:param state: 可选，重定向后会带上state参数，开发者可以填写任意参数值，最多128字节