TestCommand.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. namespace App\Console\Test;
  3. use App\Cache\UserCache;
  4. use App\Facade\Site;
  5. use App\Libs\TikTok\Kernel\Support\Str;
  6. use Illuminate\Console\Command;
  7. use Illuminate\Support\Facades\DB;
  8. use Illuminate\Support\Facades\Redis;
  9. use Illuminate\Support\Facades\Storage;
  10. use Vinkla\Hashids\Facades\Hashids;
  11. use function PHPSTORM_META\map;
  12. /**
  13. * 测试
  14. */
  15. class TestCommand extends Command
  16. {
  17. /**
  18. * @var string
  19. */
  20. protected $signature = 'test {--token=} {--uid=} {--eid=}';
  21. /**
  22. * The console command description.
  23. * php artisan Payment:BasePayment --bid='1'
  24. *
  25. * @var string
  26. */
  27. protected $description = '测试';
  28. public function __construct(
  29. )
  30. {
  31. parent::__construct();
  32. }
  33. /**
  34. * handle
  35. */
  36. public function handle()
  37. {
  38. $text = '"旁白(男):我再次醒来,是在一个破房子里。{中性}\r\n旁白(男):记忆中,这好像是杨梦艾的老家。{中性}\r\n杨梦艾(女):沈怀安,你醒了?{激动}\n杨梦艾(女):这里是我家,我接你回来,兑现承诺,和你结婚。{激动}\n杨梦艾(女):我想,这一次我没成功的原因是,没有嫁给你,所以我现在嫁给你,我一定会和净远哥哥一起成为人生赢家的!{癫狂}\n旁白(男):杨梦艾满脸癫狂地看着我。{恐惧}\n旁白(男):我不由心中慌张。{恐惧}\n沈怀安(男):杨梦艾,我们已经分手了,我不会娶你,你放了我,我就当什么事都没发生。{冷漠}\n杨梦艾(女):放了你?也行,拿5个亿给我。{冷漠}\n旁白(男):我皱眉看着他。{厌恶}"';
  39. $text = json_decode($text, true);
  40. // $token = getTextTokens($text);
  41. $result = handleScriptWords($text);
  42. dd($result);
  43. }
  44. }