流程
This commit is contained in:
@@ -301,12 +301,15 @@ class Home(http.Controller):
|
||||
headers=[('Content-Type', 'application/json')]
|
||||
)
|
||||
|
||||
@http.route('/phone/wechat/callback', type='http', auth="none", csrf=False, cors='*', methods=['GET'])
|
||||
def phone_wechat_callback(self, code=None, state=None, **kw):
|
||||
@http.route([
|
||||
'/phone/wechat/callback',
|
||||
'/phone/wechat/callback/<string:v_route>'
|
||||
], type='http', auth="none", csrf=False, cors='*', methods=['GET'])
|
||||
def phone_wechat_callback(self, code=None, state=None, v_route='Workbench', **kw):
|
||||
try:
|
||||
frontend_base_url = 'https://phone.thtzjt.com'
|
||||
if code:
|
||||
redirect_url = f"{frontend_base_url}/phone/WechatCallback?code={code}"
|
||||
redirect_url = f"{frontend_base_url}/phone/WechatCallback?code={code}?v_route={v_route}"
|
||||
if state:
|
||||
redirect_url += f"&state={state}"
|
||||
_logger.info(f"手机端OAuth回调,重定向到: {redirect_url}")
|
||||
|
||||
Reference in New Issue
Block a user