From aa0f3d760fb6c259c20e9fe1feceb09550ce18ae Mon Sep 17 00:00:00 2001
From: Lkeme <19500576+lkeme@users.noreply.github.com>
Date: Sun, 30 Apr 2023 15:14:56 +0800
Subject: [PATCH] [fix] login mode 2(sendSms faild)
---
captcha/index.php | 3 ++-
captcha/static/index.html | 4 ++++
captcha/static/js/index.js | 5 ++++-
plugin/Login/Login.php | 2 +-
plugin/MainSite/MainSite.php | 2 +-
plugin/PolishMedal/PolishMedal.php | 2 +-
6 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/captcha/index.php b/captcha/index.php
index ce222b7..f5a5770 100644
--- a/captcha/index.php
+++ b/captcha/index.php
@@ -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,
];
diff --git a/captcha/static/index.html b/captcha/static/index.html
index 52c8745..cf848cb 100644
--- a/captcha/static/index.html
+++ b/captcha/static/index.html
@@ -40,6 +40,10 @@
验证结果
+
+
+
+
diff --git a/captcha/static/js/index.js b/captcha/static/js/index.js
index 6715151..4bb9ac1 100644
--- a/captcha/static/js/index.js
+++ b/captcha/static/js/index.js
@@ -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
},
diff --git a/plugin/Login/Login.php b/plugin/Login/Login.php
index dd12e51..3e72175 100644
--- a/plugin/Login/Login.php
+++ b/plugin/Login/Login.php
@@ -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);
}
diff --git a/plugin/MainSite/MainSite.php b/plugin/MainSite/MainSite.php
index cbd2a6b..3801f7b 100644
--- a/plugin/MainSite/MainSite.php
+++ b/plugin/MainSite/MainSite.php
@@ -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;
}
//
diff --git a/plugin/PolishMedal/PolishMedal.php b/plugin/PolishMedal/PolishMedal.php
index 58d37b1..a3464ef 100644
--- a/plugin/PolishMedal/PolishMedal.php
+++ b/plugin/PolishMedal/PolishMedal.php
@@ -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) {