config.php 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php
  2. $lid =1;
  3. $sid = isset($_GET['sid'])?$_GET['sid']:1;
  4. define('IN_WEB', true);
  5. include (dirname(__FILE__)."/../com.php");
  6. header('Access-Control-Allow-Origin:*');//允许跨域(临时)
  7. $ret = oo::commonOprModel('readconfig')->getStaticConfigPath("",$sid);
  8. $ret['Lang'] = oo::commonOprModel('readconfig')->getLangStaticConfigPath();
  9. $md5 = oo::commonOprModel('readconfig')->getStaticMd5ConfigPath();
  10. foreach ($md5 as $key=>$row){
  11. $ret[ucfirst($key)."Md5"] = $row;
  12. }
  13. oo::commonOprRedis('common')->incr(okeys::getVersionCount());//登陆成功率统计
  14. if(!oo::compareVersion(funs::changeVersionLength($_GET['version']),oo::commonOprRedis('common')->get(okeys::CurForeVersion($sid)))){
  15. $ret['Version'] = str_replace('Version','VersionForce',$ret['Version']);
  16. }
  17. if(!oo::compareVersion($_GET['version'],'1.7.4')){
  18. $ret['VipConfig'] = 'VipConfig1599446560.json';
  19. }
  20. if(!oo::compareVersion($_GET['version'],'1.7.3')){
  21. $ret['LuckyDraw'] = 'LuckyDraw1585289352.json';
  22. }
  23. //签到进度 版本区分
  24. if(!oo::compareVersion($_GET['version'],'1.7.0')){
  25. $ret['Signin'] = 'Signin1600949611.json';
  26. }
  27. //分享配置 版本区分
  28. if(!oo::compareVersion($_GET['version'],'1.7.4')){
  29. $ret['Share'] = 'ShareConfig1584067106.json';
  30. $ret['LDE'] = "LDE.json";
  31. $ret['LEN'] = "LEN.json";
  32. $ret['LES'] = "LES.json";
  33. $ret['LFR'] = "LFR.json";
  34. $ret['LID'] = "LID.json";
  35. $ret['LNO'] = "LNO.json";
  36. $ret['LPT'] = "LPT.json";
  37. $ret['LTH'] = "LTH.json";
  38. $ret['LTW'] = "LTW.json";
  39. $ret['LVI'] = "LVI.json";
  40. $ret['LZH'] = "LZH.json";
  41. }
  42. if(!oo::compareVersion($_GET['version'],'1.7.3')){
  43. $ret['MiningGameConfig'] = 'MiningGameConfig1598514140.json';
  44. }
  45. if(!oo::compareVersion($_GET['version'],'1.7.8')){
  46. if(IS_DEBUF){
  47. $ret['RemoteAssets'] = 'RemoteAssets_1770.json';
  48. $ret['MainBgConfig'] = 'MainBgConfig1598320209.json';
  49. }else{
  50. $ret['RemoteAssets'] = 'RemoteAssets_1770.json';
  51. $ret['MainBgConfig'] = 'MainBgConfig1601470837.json';
  52. }
  53. }else{
  54. if(!oo::compareVersion($_GET['version'],'1.8.3')){
  55. if(IS_DEBUF){
  56. $ret['RemoteAssets'] = 'RemoteAssets1615770897.json';
  57. }else{
  58. $ret['RemoteAssets'] = 'RemoteAssets1615607975.json';
  59. }
  60. }
  61. }
  62. if(strpos($_SERVER['HTTP_HOST'],"vivo") !== false){
  63. $ret['Version'] = "AndroidVersion1605767730.json"; //临时处理:vivo包不跟随Android更新
  64. $version = oo::commonOprModel('readconfig')->getStaticConfigPath("VivoVersion",$sid);
  65. if(!empty($version)){
  66. $ret['Version'] = $version;
  67. }
  68. }
  69. $ret["hotupdate"] = oo::commonOprModel('Gameupdate')->getGameUpdateHotfix($sid,funs::changeVersionLength($_GET['version'],3));
  70. die(json_encode($ret,JSON_NUMERIC_CHECK));
  71. ?>