Test.php 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. namespace App\Console\Commands;
  3. use App\Consts\SysConsts;
  4. use App\Libs\Push\OPPOPush\OPPOPushCommon;
  5. use App\Libs\Utils;
  6. use App\Modules\User\Services\UserService;
  7. use Hashids;
  8. use Illuminate\Console\Command;
  9. class Test extends Command
  10. {
  11. /**
  12. * The name and signature of the console command.
  13. *
  14. * @var string
  15. */
  16. protected $signature = 'test';
  17. /**
  18. * The console command description.
  19. *
  20. * @var string
  21. */
  22. protected $description = '测试';
  23. /**
  24. * Execute the console command.
  25. *
  26. * @return mixed
  27. */
  28. public function handle()
  29. {
  30. dd(UserService::qappAddDesktop(205384691, 1));
  31. $sign = 'd1192936959b3c79be1e1582f7b7c27f';
  32. $timestamp = 1646118354;
  33. $key = 'a!A&AFRWT65Nb3NlklezUiqHyQAA@Z8M';
  34. // $params = '/api/login';
  35. $params = array (
  36. 'androidid' => 'a682b826a7ce46473f30e238647fa38b983f03605a792d0492f561f075c61424',
  37. 'device_info' => '{"brand":"HONOR","manufacturer":"HONOR","model":"ALA-AN70","product":"ALA-AN70","osType":"android","osVersionName":"10","osVersionCode":29,"platformVersionName":"1.080","platformVersionCode":1080,"language":"zh","region":"CN","screenWidth":1080,"screenHeight":2122,"timeZone":"GMT+08:00","emuiApiLevel":"26","emuiVer":"11.0.1","vendorOsName":"magicUI","vendorOsVersion":"11.0.1","fontScale":1,"characteristics":"default","windowWidth":1080,"windowHeight":1978,"cutout":[{"left":501,"top":0,"right":501,"bottom":2238}],"statusBarHeight":102,"pixelRatio":3,"engineProvider":"huawei","screenDensity":3,"screenLogicWidth":750,"screenLogicHeight":1474,"windowLogicWidth":750,"windowLogicHeight":1374,"marketingName":"荣耀V40轻奢版","harmonyOSVer":""}',
  38. 'device_no' => 'a682b826a7ce46473f30e238647fa38b983f03605a792d0492f561f075c61424',
  39. 'package' => 'com.beidao.kuaiying.haohan',
  40. 'send_order_id' => '',
  41. 'timestamp' => '1646118354',
  42. 'sign' => 'd1192936959b3c79be1e1582f7b7c27f',
  43. '_url' => '/api/login',
  44. );
  45. if ($timestamp && $sign == _sign($params, $key)) {
  46. dd(1);
  47. } else {
  48. dd(2,$sign,_sign($params, $key));
  49. }
  50. $bid = $this->argument('bid');
  51. $enBid = Hashids::encode($bid);
  52. $enHotBids = array_map(function ($bid) {
  53. return Utils::getEncodeId($bid);
  54. }, [$bid]);
  55. dd($bid, $enBid, $enHotBids);
  56. }
  57. }