Update.php 920 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace app\mainapp\controller;
  3. use think\facade\Session;
  4. class Update
  5. {
  6. public function index()
  7. {
  8. header("Content-type:text/json");
  9. $appid = input('appid/s', "");
  10. $version = input('version/s', "");
  11. $rsp = array("status" => 0);
  12. if (isset($appid) && isset($version)) {
  13. if ($appid === "__UNI__6840E85") {
  14. $rsp = array(
  15. "status" => 1,
  16. "updatecon" => "功能升级",
  17. "downurl" => "https://sc.laowushangcheng.com/app/index.html",
  18. "statusAndroid" => 0,
  19. "statusIos" => 0
  20. );
  21. // Android
  22. if ($version !== "3.1.0") {
  23. $rsp["statusAndroid"] = 1;
  24. $rsp["downAndroidUrl"] = "https://sc.laowushangcheng.com/app/index.html";
  25. }
  26. // Ios
  27. if ($version !== "1.3.2") {
  28. $rsp["statusIos"] = 0;
  29. $rsp["downIosUrl"] = "https://sc.laowushangcheng.com/app/index.html";
  30. }
  31. }
  32. }
  33. page_result(1, "", $rsp);
  34. }
  35. }