From 9e8f6f86cbe91045eb153bdb99f4f1d6d1e95e9b Mon Sep 17 00:00:00 2001 From: zhangjialiang Date: Wed, 11 Jun 2025 17:14:15 +0800 Subject: [PATCH] * [story#75371,doing,0.2h] Community login. --- module/officialwebsite/control.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/module/officialwebsite/control.php b/module/officialwebsite/control.php index 55c21e8849..fde7b9fa8d 100644 --- a/module/officialwebsite/control.php +++ b/module/officialwebsite/control.php @@ -13,14 +13,26 @@ class officialwebsite extends control { /** - * 加入社区。 - * Join community. + * 加入社区。 + * Join community. * * @access public - * @return void + * @return int|void|null */ public function index() { + if(!empty($_POST)) + { + $apiRoot = 'https://zentao.xsj.oop.cc'; + $apiURL = $apiRoot . "/user-mobileLogin.json"; + $response = common::http($apiURL, $_POST); + $response = json_decode($response, true); + if($response['result'] == 'fail') + { + return $this->send(array('result' => 'fail', 'message' => $response['message'])); + } + return $this->send(array('result' => 'success', 'load' => $this->createLink('index', 'index'))); + } $this->display(); }