123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <?php
- namespace App\Console\Commands;
- use App\Consts\SysConsts;
- use App\Libs\Push\OPPOPush\OPPOPushCommon;
- use App\Libs\Utils;
- use App\Modules\User\Services\UserService;
- use Hashids;
- use Illuminate\Console\Command;
- class Test extends Command
- {
- /**
- * The name and signature of the console command.
- *
- * @var string
- */
- protected $signature = 'test';
- /**
- * The console command description.
- *
- * @var string
- */
- protected $description = '测试';
- /**
- * Execute the console command.
- *
- * @return mixed
- */
- public function handle()
- {
- UserService::qappAddDesktop(206594704, 1);
- UserService::qappAddDesktop(5555, 1);
- dd('success');
- $sign = 'd1192936959b3c79be1e1582f7b7c27f';
- $timestamp = 1646118354;
- $key = 'a!A&AFRWT65Nb3NlklezUiqHyQAA@Z8M';
- // $params = '/api/login';
- $params = array (
- 'androidid' => 'a682b826a7ce46473f30e238647fa38b983f03605a792d0492f561f075c61424',
- '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":""}',
- 'device_no' => 'a682b826a7ce46473f30e238647fa38b983f03605a792d0492f561f075c61424',
- 'package' => 'com.beidao.kuaiying.haohan',
- 'send_order_id' => '',
- 'timestamp' => '1646118354',
- 'sign' => 'd1192936959b3c79be1e1582f7b7c27f',
- '_url' => '/api/login',
- );
- if ($timestamp && $sign == _sign($params, $key)) {
- dd(1);
- } else {
- dd(2,$sign,_sign($params, $key));
- }
- $bid = $this->argument('bid');
- $enBid = Hashids::encode($bid);
- $enHotBids = array_map(function ($bid) {
- return Utils::getEncodeId($bid);
- }, [$bid]);
- dd($bid, $enBid, $enHotBids);
- }
- }
|