|
@@ -6,6 +6,7 @@ from django.views import View
|
|
|
|
|
|
from Object.ResponseObject import ResponseObject
|
|
|
from Object.TokenObject import TokenObject
|
|
|
+from Ansjer.config import CONFIG_INFO, CONFIG_EUR
|
|
|
|
|
|
|
|
|
class AppToAppView(View):
|
|
@@ -78,8 +79,12 @@ class AppToAppView(View):
|
|
|
|
|
|
# 获取用户授权码
|
|
|
url = redirect_uri + '/appToApp/oa2/getAuthCode'
|
|
|
+ region_code = 'EU'
|
|
|
+ if CONFIG_INFO != CONFIG_EUR:
|
|
|
+ region_code = 'US'
|
|
|
params = {
|
|
|
- 'user_id': user_id
|
|
|
+ 'user_id': user_id,
|
|
|
+ 'region_code': region_code
|
|
|
}
|
|
|
r = requests.get(url=url, params=params, timeout=10)
|
|
|
assert r.status_code == 200
|