| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- import i18n from './locales/index';
- import {LOCAL_WD_PASS, LOCAL_WD_PASS_SET_TIME} from "@constants/localkey";
- import {decrypt, encrypt, localStorageGet, localStorageSet} from "@utils/helpers";
- // import symbol from "@assets/symbol-defs.svg";
- // import symbol_m from "@assets/symbol-mobile.svg";
- global.i18n=i18n;
- // global.symbol=symbol;
- // global.symbol_m=symbol_m;
- global.CASH_BASE=100;
- global.DOLLAR="R$";
- global.dispatch=null;
- global.msgBox=null;
- global.msgBoxShow=(params)=>{
- if (global.msgBox)global.msgBox.show(params);
- }
- global.msgBoxHide=()=>{
- if (global.msgBox)global.msgBox.hide();
- }
- global.authLockPath=null;
- global.device="mobile";
- global.width=100;
- global.height=100;
- global.isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent);
- //游客id 指纹
- global.BFP=null;
- //wd pass
- global.getWDPass=()=>{
- let pass=localStorageGet(LOCAL_WD_PASS,"");
- if (pass!=null&&pass!==""){
- pass=decrypt(pass);
- let lsettime=localStorageGet(LOCAL_WD_PASS_SET_TIME,"");
- if (lsettime!=null){
- lsettime=Number(lsettime);
- let now=Date.now();
- let during=now-lsettime;
- //10m
- let deadline=10*60*1000;
- if (during<deadline)return pass;
- else {
- localStorageSet(LOCAL_WD_PASS,"");
- localStorageSet(LOCAL_WD_PASS_SET_TIME,"");
- }
- }
- }
- return "";
- }
- global.setWDPass=(value)=>{
- if (value==null)return;
- if (value!==""){
- value=encrypt(value);
- }
- localStorageSet(LOCAL_WD_PASS,value);
- localStorageSet(LOCAL_WD_PASS_SET_TIME,Date.now());
- }
- global.showDropCoins=()=>{
- if (global.dropCoins)global.dropCoins.show();
- }
- global.hideDropCoins=()=>{
- if (global.dropCoins)global.dropCoins.hide();
- }
- global.showMailNew=()=>{
- if (global.mailNew)global.mailNew.show();
- }
- global.hideMailNew=()=>{
- if (global.mailNew)global.mailNew.hide();
- }
- global.showInstallBox=()=>{
- if (global.installBox)global.installBox.show();
- }
- global.hideInstallBox=()=>{
- if (global.installBox)global.installBox.hide();
- }
- global.showBindPhone=()=>{
- if (global.bindPhone)global.bindPhone.show();
- }
- global.hideBindPhone=()=>{
- if (global.bindPhone)global.bindPhone.hide();
- }
- global.showBindPrompt=()=>{
- if (global.bindPrompt)global.bindPrompt.show();
- }
- global.hideBindPrompt=()=>{
- if (global.bindPrompt)global.bindPrompt.hide();
- }
- global.showProtectReward=()=>{
- if (global.protectReward)global.protectReward.show();
- }
- global.hideProtectReward=()=>{
- if (global.protectReward)global.protectReward.hide();
- }
- global.showLoadingCircular=(showMask=false)=>{
- if (global.loadingCircular)global.loadingCircular.show(showMask);
- }
- global.hideLoadingCircular=()=>{
- if (global.loadingCircular)global.loadingCircular.hide();
- }
- global.showFirstPay=()=>{
- if (global.firstPay)global.firstPay.show();
- }
- global.hideFirstPay=()=>{
- if (global.firstPay)global.firstPay.hide();
- }
- //wd pass
|