浏览代码

call iAmSmart api with local

master
Anna Ho 1年前
父节点
当前提交
cd15a27ad5
共有 2 个文件被更改,包括 5 次插入4 次删除
  1. +3
    -2
      src/pages/authentication/RegisterCustom.js
  2. +2
    -2
      src/pages/authentication/auth-forms/AuthLoginCustom.js

+ 3
- 2
src/pages/authentication/RegisterCustom.js 查看文件

@@ -20,6 +20,7 @@ const RegisterCustom = () => {


const [isPopUp, setIsPopUp] = React.useState(false); const [isPopUp, setIsPopUp] = React.useState(false);
const intl = useIntl(); const intl = useIntl();
const { locale } = intl;


const registerWithIAmSmart = () => { const registerWithIAmSmart = () => {
setIsPopUp(true); setIsPopUp(true);
@@ -41,7 +42,7 @@ const RegisterCustom = () => {
+"&source=" + getBowserType() +"&source=" + getBowserType()
+"&redirectURI="+encodeURIComponent(callbackUrl) +"&redirectURI="+encodeURIComponent(callbackUrl)
+"&scope="+encodeURIComponent("eidapi_auth eidapi_profiles") +"&scope="+encodeURIComponent("eidapi_auth eidapi_profiles")
+"&lang=zh-HK"//en-US, zh-HK, or zh-CN
+"&lang="+(locale === 'en' ?"en-US":locale === 'zh-HK' ?"zh-HK":"zh-CN")
//+"&state=" //+"&state="
+"&brokerPage=false" +"&brokerPage=false"
window.location.assign(url); window.location.assign(url);
@@ -55,7 +56,7 @@ const RegisterCustom = () => {
+"&source=" + getBowserType() +"&source=" + getBowserType()
+"&redirectURI="+encodeURIComponent(callbackUrl) +"&redirectURI="+encodeURIComponent(callbackUrl)
+"&scope="+encodeURIComponent("eidapi_auth eidapi_profiles") +"&scope="+encodeURIComponent("eidapi_auth eidapi_profiles")
+"&lang=zh-HK"//en-US, zh-HK, or zh-CN
+"&lang="+(locale === 'en' ?"en-US":locale === 'zh-HK' ?"zh-HK":"zh-CN")
//+"&state=" //+"&state="
+"&brokerPage=true" +"&brokerPage=true"
window.location.assign(url); window.location.assign(url);


+ 2
- 2
src/pages/authentication/auth-forms/AuthLoginCustom.js 查看文件

@@ -205,7 +205,7 @@ const AuthLoginCustom = () => {
+ "&source=" + getBowserType() + "&source=" + getBowserType()
+ "&redirectURI=" + encodeURIComponent(callbackUrl) + "&redirectURI=" + encodeURIComponent(callbackUrl)
+ "&scope=" + encodeURIComponent("eidapi_auth eidapi_profiles") + "&scope=" + encodeURIComponent("eidapi_auth eidapi_profiles")
+ "&lang=zh-HK"//en-US, zh-HK, or zh-CN
+"&lang="+(locale === 'en' ?"en-US":locale === 'zh-HK' ?"zh-HK":"zh-CN")
//+"&state=" //+"&state="
+ "&brokerPage=false" + "&brokerPage=false"
window.location=url; window.location=url;
@@ -237,7 +237,7 @@ const AuthLoginCustom = () => {
+ "&source=" + getBowserType() + "&source=" + getBowserType()
+ "&redirectURI=" + encodeURIComponent(callbackUrl) + "&redirectURI=" + encodeURIComponent(callbackUrl)
+ "&scope=" + encodeURIComponent("eidapi_auth eidapi_profiles") + "&scope=" + encodeURIComponent("eidapi_auth eidapi_profiles")
+ "&lang=zh-HK"//en-US, zh-HK, or zh-CN
+"&lang="+(locale === 'en' ?"en-US":locale === 'zh-HK' ?"zh-HK":"zh-CN")
//+"&state=" //+"&state="
+ "&brokerPage=true" + "&brokerPage=true"
window.location=url; window.location=url;


正在加载...
取消
保存