Test.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. UserService::qappAddDesktop(206594704, 1);
  31. UserService::qappAddDesktop(5555, 1);
  32. dd('success');
  33. $sign = 'd1192936959b3c79be1e1582f7b7c27f';
  34. $timestamp = 1646118354;
  35. $key = 'a!A&AFRWT65Nb3NlklezUiqHyQAA@Z8M';
  36. // $params = '/api/login';
  37. $params = array (
  38. 'androidid' => 'a682b826a7ce46473f30e238647fa38b983f03605a792d0492f561f075c61424',
  39. '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":""}',
  40. 'device_no' => 'a682b826a7ce46473f30e238647fa38b983f03605a792d0492f561f075c61424',
  41. 'package' => 'com.beidao.kuaiying.haohan',
  42. 'send_order_id' => '',
  43. 'timestamp' => '1646118354',
  44. 'sign' => 'd1192936959b3c79be1e1582f7b7c27f',
  45. '_url' => '/api/login',
  46. );
  47. if ($timestamp && $sign == _sign($params, $key)) {
  48. dd(1);
  49. } else {
  50. dd(2,$sign,_sign($params, $key));
  51. }
  52. $bid = $this->argument('bid');
  53. $enBid = Hashids::encode($bid);
  54. $enHotBids = array_map(function ($bid) {
  55. return Utils::getEncodeId($bid);
  56. }, [$bid]);
  57. dd($bid, $enBid, $enHotBids);
  58. }
  59. }