From b2730580f245dc4e694b96874de5b14f6523cc08 Mon Sep 17 00:00:00 2001 From: zhangjialiang Date: Mon, 16 Jun 2025 15:28:15 +0800 Subject: [PATCH] * [story#75371,doing,0.2h] Modify the value of sessionVar, Login to the official website. --- module/admin/control.php | 35 ++++++++++++++++++------------- module/admin/ui/register.html.php | 2 +- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/module/admin/control.php b/module/admin/control.php index 35ce3bffff..fec7c10cde 100755 --- a/module/admin/control.php +++ b/module/admin/control.php @@ -525,13 +525,16 @@ class admin extends control { if(!empty($_POST)) { - $apiRoot = $this->config->admin->register->apiRoot; - $zentaosid = $_COOKIE['zentaosid']; - $apiURL = $apiRoot . "/user-mobileLogin.json" . '?zentaosid=' . $zentaosid; + $apiRoot = $this->config->admin->register->apiRoot; + $sessionVar = $this->config->sessionVar; + $zentaosid = $_COOKIE[$sessionVar]; + $apiURL = $apiRoot . "/user-apiRegister.json" . "?{$sessionVar}={$zentaosid}"; - $_POST['sn'] = $this->config->global->sn; + $httpData['sn'] = $this->config->global->sn; + $httpData['mobile'] = $this->post->agreeUX; + $httpData['code'] = $this->post->code; - $response = common::http($apiURL, $_POST); + $response = common::http($apiURL, $httpData); $response = json_decode($response, true); if($response['result'] == 'fail') return $this->send(array('result' => 'fail', 'message' => $response['message'])); @@ -594,11 +597,12 @@ class admin extends control */ public function getCaptcha() { - $apiRoot = $this->config->admin->register->apiRoot; - $zentaosid = $_COOKIE['zentaosid']; - $apiURL = $apiRoot . "/guarder-apiGetCaptcha.json" . '?zentaosid=' . $zentaosid; - $response = common::http($apiURL); - $response = json_decode($response, true); + $apiRoot = $this->config->admin->register->apiRoot; + $sessionVar = $this->config->sessionVar; + $zentaosid = $_COOKIE[$sessionVar]; + $apiURL = $apiRoot . "/guarder-apiGetCaptcha.json" . "?{$sessionVar}={$zentaosid}"; + $response = common::http($apiURL); + $response = json_decode($response, true); return $this->send($response); } @@ -611,11 +615,12 @@ class admin extends control */ public function sendcode() { - $apiRoot = $this->config->admin->register->apiRoot; - $zentaosid = $_COOKIE['zentaosid']; - $apiURL = $apiRoot . "/sms-apiSendCode.json" . '?zentaosid=' . $zentaosid; - $response = common::http($apiURL, $_POST); - $response = json_decode($response, true); + $apiRoot = $this->config->admin->register->apiRoot; + $sessionVar = $this->config->sessionVar; + $zentaosid = $_COOKIE[$sessionVar]; + $apiURL = $apiRoot . "/sms-apiSendCode.json" . "?{$sessionVar}={$zentaosid}"; + $response = common::http($apiURL, $_POST); + $response = json_decode($response, true); return $this->send($response); } diff --git a/module/admin/ui/register.html.php b/module/admin/ui/register.html.php index 70f01a93ca..ce64792a72 100644 --- a/module/admin/ui/register.html.php +++ b/module/admin/ui/register.html.php @@ -103,7 +103,7 @@ else set::label('短信验证码'), input ( - set::name('captcha') + set::name('code') ) ), a