|
|
@@ -42,7 +42,10 @@ export const getBowserType = () => { |
|
|
|
if (navigator.userAgent.match(/Android/i)) return "Android_Chrome" |
|
|
|
if (navigator.userAgent.match(/iPhone|iPad|iPod/i)) return "iOS_Chrome" |
|
|
|
return "PC_Browser" |
|
|
|
} else if (navigator.userAgent.indexOf("Safari") != -1) { |
|
|
|
} else if (navigator.userAgent.indexOf('CriOS') != -1) { |
|
|
|
if (navigator.userAgent.match(/iPhone|iPad|iPod/i)) return "iOS_Chrome" |
|
|
|
return "PC_Browser" |
|
|
|
} else if (navigator.userAgent.indexOf("Safari") != -1 && navigator.userAgent.indexOf("Chrome") == -1) { |
|
|
|
if (navigator.userAgent.match(/iPhone|iPad|iPod/i)) return "iOS_Safari" |
|
|
|
return "PC_Browser" |
|
|
|
} else if (navigator.userAgent.indexOf("Firefox") != -1) { |
|
|
@@ -74,7 +77,7 @@ export const isGranted = (auth) => { |
|
|
|
const abilities = getUserData() ? getUserData()["abilities"] : null; |
|
|
|
if (abilities == null || abilities.length == 0) return false; |
|
|
|
if (!Array.isArray(auth)) return _checkAuth(abilities, auth); |
|
|
|
|
|
|
|
|
|
|
|
if (auth.length > abilities.length) return false; |
|
|
|
let haveAuth = true; |
|
|
|
for (let i = 0; i < auth.length; i++) { |
|
|
@@ -123,8 +126,8 @@ export const local = { en: "en-us", zh: "zh-hk", cn: "zh-cn" }; |
|
|
|
export const preferpaymentmethods = ['visa', 'mastercard', 'pps', 'creditcard', 'fps']; |
|
|
|
|
|
|
|
export const getPaymentMethod = (paymentMethod) => { |
|
|
|
if(paymentMethod == "online") return 'payOnlineMethod'; |
|
|
|
if(paymentMethod == "demandNote") return 'payDnMethod'; |
|
|
|
if(paymentMethod == "office") return 'payNPGOMethod'; |
|
|
|
if (paymentMethod == "online") return 'payOnlineMethod'; |
|
|
|
if (paymentMethod == "demandNote") return 'payDnMethod'; |
|
|
|
if (paymentMethod == "office") return 'payNPGOMethod'; |
|
|
|
return "other"; |
|
|
|
} |