//兼容Server酱³Sendkey,使用正则表达式提取数字部分 valmatchResult=Regex("^sctp(\\d+)t",RegexOption.IGNORE_CASE).find(setting.sendKey) valrequestUrl=if(matchResult!=null&&matchResult.groups[1]!=null) { "https://${matchResult.groups[1]?.value}.push.ft07.com/send/${setting.sendKey}.send...
$prepare_apikey_length = 32; while(1) { $api_key = Str::random(32); if(false === Model::where(['api_key'=>$api_key])->exists()) { break; } } return $api_key; 只是简单写,你也可以直接用雪花 刚好前面有人问了3年前 评论 ...
`https://${matchResult[1]}.push.ft07.com/send/${notification.serverChanSendKey}.send` : `https://sctapi.ftqq.com/${notification.serverChanSendKey}.send`; kotlin不太熟,用GPT改了一个版本,测试了下应该没有语法错。 // 兼容Server酱³Sendkey,使用正则表达式提取数字部分 val matchResult = ...