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