[fix] login mode 2(sendSms faild)

This commit is contained in:
Lkeme 2023-04-30 15:14:56 +08:00
parent 4869d517b8
commit aa0f3d760f
6 changed files with 13 additions and 5 deletions

View File

@ -100,10 +100,11 @@ class HttpServer
// 获取参数从json里的读取
$data = $this->json->read();
$challenge = $_POST['challenge'];
$new_challenge = $_POST['new_challenge'];
$validate = $_POST['validate'];
$seccode = $_POST['seccode'];
$data[$challenge] = [
'challenge' => $challenge,
'challenge' => $new_challenge,
'validate' => $validate,
'seccode' => $seccode,
];

View File

@ -40,6 +40,10 @@
<div id="result" class="hide">
<div class="result-title">验证结果</div>
<div class="form">
<label class="form-label">new-challenge</label>
<input type="text" class="form-control" id="new-challenge" style="cursor: text;" disabled>
</div>
<div class="form">
<label class="form-label">validate</label>
<input type="text" class="form-control" id="validate" style="cursor: text;" disabled>

View File

@ -8,6 +8,7 @@ window.onload = function () {
const gtInput = document.querySelector("#gt")
const challengeInput = document.querySelector("#challenge")
const newChallengeInput = document.querySelector("#new-challenge")
const validateInput = document.querySelector("#validate")
const seccodeInput = document.querySelector("#seccode")
@ -43,7 +44,8 @@ window.onload = function () {
show(successBtn);
}
const result = captchaObj.getValidate();
console.log(result)
newChallengeInput.value = result.geetest_challenge;
validateInput.value = result.geetest_validate;
seccodeInput.value = result.geetest_seccode;
@ -141,6 +143,7 @@ window.onload = function () {
dataType: 'json',
data: {
challenge: challengeInput.value,
new_challenge : newChallengeInput.value,
validate: validateInput.value,
seccode: seccodeInput.value
},

View File

@ -632,7 +632,7 @@ class Login extends BasePlugin
$captcha_info = $this->matchCaptcha($target_url);
// 暂时不做额外处理
$captcha = $this->ocrCaptcha($captcha_info['gt'], $captcha_info['challenge']);
$this->sendSms($phone, $cid, $captcha['validate'], $captcha['challenge'], $recaptcha_token);
return $this->sendSms($phone, $cid, $captcha['validate'], $captcha['challenge'], $recaptcha_token);
}

View File

@ -255,7 +255,7 @@ class MainSite extends BasePlugin
$response = ApiCoin::addLog();
//
if ($response['code'] || !isset($response['data']['list'])) {
Log::warning("主站任务: 获取已硬币失败 {$response['code']} -> {$response['message']}");
Log::warning("主站任务: 获取已硬币失败 {$response['code']} -> {$response['message']}");
return 0;
}
//

View File

@ -97,7 +97,7 @@ class PolishMedal extends BasePlugin
for ($i = 1; $i <= 100; $i++) {
$de_raw = ApiFansMedal::panel($i, 50);
if (isset($de_raw['code']) && $de_raw['code']) {
Log::warning("获取徽章列表失败 => {$de_raw['message']}");
Log::warning("获取徽章列表失败 => {$de_raw['message']} => {$de_raw['code']}");
}
$keys = ['list', 'special_list'];
foreach ($keys as $key) {