This commit is contained in:
尖叫 2023-10-27 17:50:45 +08:00
parent 8ed6873475
commit f628483503
81 changed files with 999 additions and 15374 deletions

View File

@ -6,9 +6,9 @@ return [
// 'username' => 'cxaibc',
// 'password' => 'tm2CtPfmRXSif6mn',
'dsn' => 'mysql:host=app.3dxh.dev.1nww.com;dbname=cxfoot',
'username' => 'cxfoot',
'password' => 'bm8kB3eKddhCW83s',
'dsn' => 'mysql:host=127.0.0.1;dbname=cxfoot',
'username' => 'root',
'password' => '123456',
'charset' => 'utf8mb4',

View File

@ -12,6 +12,7 @@
namespace app\modules\api\controllers;
use app\modules\api\behaviors\LoginBehavior;
use app\modules\api\models\LoginByWxoaForm;
use app\modules\api\models\LoginForm;
use app\modules\api\models\LogoutForm;
use app\modules\api\models\LoginByMobileForm;
@ -37,6 +38,8 @@ class AuthController extends Controller
'api/auth/login',
'api/auth/login-by-mobile',
'api/auth/login-by-wxmp',
'api/auth/login-by-wxoa',
'api/auth/signup-by-mobile',
'api/auth/access-token',
'api/auth/reset-pwd',
@ -175,17 +178,13 @@ class AuthController extends Controller
$data = $this->invaildRequest();
return $this->responseHandler($data);
}
if(!$this->lock->acquire()){
$data = ['code' => 1, 'msg' => '系统繁忙!稍后再试^v^!'];
return $this->responseHandler($data);
}
$form = new LoginByWxmpForm();
$form = new LoginByWxoaForm();
$form->attributes = \Yii::$app->request->post();
$form->cx_mch_id = $this->cx_mch_id;
$form->token_type = $this->_cx_token_type;
$form->wechat_mp = $this->wechat_mp;
$data = $form->login();
$this->lock->release();
return $this->responseHandler($data);
}

View File

@ -19,8 +19,10 @@ use app\models\QrcodeRecord;
use app\models\StoreUser;
use app\models\User;
use app\models\UserInformation;
use app\models\UserOauth;
use app\modules\api\behaviors\LoginBehavior;
use app\modules\api\models\CommentForm;
use app\modules\api\models\LoginForm;
use app\modules\api\models\UserBasicInfoForm;
use app\modules\api\models\UserModifyForm;
@ -32,7 +34,8 @@ class UserController extends Controller
'login' => [
'class' => LoginBehavior::className(),
'ignore' => [
'api/user/modify-user'
'api/user/modify-user',
'api/user/verify-user'
]
]
]);
@ -48,21 +51,30 @@ class UserController extends Controller
*/
public function actionVerifyUser()
{
//微信登陆后 判断去登陆 还是去绑定
$user_id = \Yii::$app->user->identity->id; //获取用户登陆ID
$post = \Yii::$app->request->post(); // attributes 转成键值对形式 key=> value
$user_outh = UserOauth::findOne(['openid' => $post['code']]);
if ($user_outh == null) {
return ['code' => 1, 'msg' => '授权失败,请重新进行微信公众号授权',];
}
if ($user_outh->user_id == 0) {
return ['code' => 1, 'msg' => '暂未填写信息',];
}
$user = User::findOne(['id' => $user_id]);
if (!empty($user->is_view)) {
$data = [
'code' => 1,
'msg' => '已绑定',
];
// 查用户信息
$user = User::findOne(['id' => $user_outh->user_id, 'type' => 0, 'status' => 0]);
//未绑定
if ($user == null || empty($user->mobile_phone) || empty($user->is_view)) {
$data = ['code' => 1, 'msg' => '未绑定'];
} else {
$data = [
'code' => 0,
'msg' => '未绑定',
];
//已绑定
$form = new LoginForm();
$form->cx_mch_id = $this->cx_mch_id;
$form->token_type = $this->_cx_token_type;
$form->username = $user->username;
$form->password = '123456';
$data = $form->login();
}
return $this->responseHandler($data);
}

View File

@ -56,113 +56,35 @@ class LoginByWxoaForm extends ApiModel
FlashStorage::setCache("m{$this->cx_mch_id}_c{$this->code}", $res, 864000);
}
$session_key = $res['data']['session_key'];
$openid = $res['data']['openid'];
$unionid = isset($res['data']['unionid']) ? $res['data']['unionid'] : null;
$res = $this->decrypted_data($session_key);
if ($res['code'] != 0) {
return $res;
}
$decrypted_info = json_decode($res['data'], true);
$openid = $openid ? $openid : $decrypted_info['openId'];
$nickname = $decrypted_info['nickName'];
$avatar_url = empty($decrypted_info['avatarUrl']) ? User::DEFAULT_AVATAR_URL : $decrypted_info['avatarUrl'];
$gender = $decrypted_info['gender'];
if ($unionid == null) {
$unionid = isset($decrypted_info['unionId']) ? $decrypted_info['unionId'] : '0';
}
$access_token = $res['data']['access_token'];
$openid = $res['data']['openid'];
//用户是否存在
$user_oauth = null;
if ($unionid != 0) {
if ($openid != 0) {
//优选使用unionid
$user_oauth = UserOauth::findOne([
'cx_mch_id' => $this->cx_mch_id,
'is_delete' => 0,
'unionid' => $unionid
]);
}
if ($user_oauth == null) {
$user_oauth = UserOauth::findOne([
'cx_mch_id' => $this->cx_mch_id,
'is_delete' => 0,
'type' => SysConst::$cxOauthProviderWxmp,
'openid' => $openid
]);
}
$t = \Yii::$app->db->beginTransaction();
if ($user_oauth != null) {
//用户是否存在
$user = User::findOne([
'id' => $user_oauth->user_id,
'is_delete' => 0,
'cx_mch_id' => $this->cx_mch_id,
'status' => User::STATUS_NORMAL
]);
if ($user == null) {
\Yii::error("[LoginByWxmpForm] 用户(ID:{$user_oauth->user_id})不存在");
return [
'code' => 1,
'msg' => '系统内部异常,请联系管理员'
];
}
} else {
$form = new CommonUserEditForm();
$form->scenario = 'wxmp_signup';
$form->model = new User();
$form->cx_mch_id = $this->cx_mch_id;
$form->username = User::generateUsername(3, "wx", 6);
$form->nickname = $nickname;
$form->avatar_url = $avatar_url;
$form->access_token = \Yii::$app->security->generateRandomString();
$form->gender = $gender;
$form->is_modify_un = 1;
$res = $form->save();
if ($res['code'] != 0)
return $res;
$user = $form->model;
if ($user_oauth == null) {
$user_oauth = new UserOauth();
$user_oauth->cx_mch_id = $this->cx_mch_id;
$user_oauth->type = SysConst::$cxOauthProviderWxmp;
$user_oauth->user_id = $user->id;
$user_oauth->cx_mch_id = 0;
$user_oauth->type = 'wxoa';
$user_oauth->openid = $openid;
$user_oauth->unionid = $unionid;
$user_oauth->is_delete = 0;
$user_oauth->created_at = time();
$res = $user_oauth->save();
if ($res['code'] != 0) {
return ['code' => 1, 'msg' => '登陆失败'];
}
}
//更新用户信息
$user_oauth->nickname = $nickname;
$user_oauth->avatar_url = $avatar_url;
if ($unionid !== 0 && $user_oauth->unionid == 0) {
$user_oauth->unionid = $unionid;
}
if (!$user_oauth->save()) {
$t->rollBack();
return $this->getModelError($user_oauth);
}
if (!\Yii::$app->user->login($user)) {
$t->commit();
return [
'code' => 1,
'msg' => '登录失败'
];
}
$args = [];
$args['cx_mch_id'] = $this->cx_mch_id;
$args['token_type'] = $this->token_type;
$atoken = new AToken($args);
$data = $atoken->generate_access_token();
if ($data['code'] == 0) {
$err_msg = "微信小程序登录成功";
User::lastLogin($user->id, 1, $err_msg, $this->cx_mch_id);
}
$t->commit();
//是否需要绑定
$data = User::bindQuery($user_oauth->user, $data);
$data = ['code' => 1, 'msg' => '登陆成功', 'data' => $openid];
return $data;
}
@ -170,22 +92,33 @@ class LoginByWxoaForm extends ApiModel
/***
* 用户数据解密
*/
private function decrypted_data($session_key)
private function curl_wechat_user($access_token, $openid)
{
$pc = new WxBizDataCrypt($this->wechat_mp->appId, $session_key);
$errCode = $pc->decryptData($this->encrypted_data, $this->iv, $data);
if ($errCode == 0) {
return [
'code' => 0,
'msg' => 'success',
'data' => $data
];
} else {
$api = "https://api.weixin.qq.com/sns/userinfo?access_token=" . $access_token . "&openid=" . $openid . "&lang=zh_CN";
$this->wechat_mp->curl->get($api);
if ($this->wechat_mp->curl->error_code != 0) {
return [
'code' => 1,
'msg' => $errCode,
'msg' => "err_code:{$this->wechat_mp->curl->error_code}err_msg:{$this->wechat_mp->curl->error_msg}"
];
}
$resp = $this->wechat_mp->curl->response;
$res = json_decode($resp, true);
if (!isset($res['nickname']) || !isset($res['headimgurl'])) {
return [
'code' => 1,
'msg' => isset($res['errmsg']) ? $res['errmsg'] : 'error'
];
}
return [
'code' => 0,
'msg' => 'ok',
'data' => $res
];
}
private function code2session($code)

View File

@ -20,6 +20,7 @@ use app\models\User;
use app\components\auth\AToken;
use app\components\EncryptHelper;
use app\models\UserInformation;
use app\models\UserOauth;
use app\modules\api\components\ApiHelper;
use yii\data\Pagination;
@ -33,11 +34,15 @@ class UserModifyForm extends ApiModel
public $mobile_phone;
public $gender;
public $is_view;
public $openid;
public $token_type;
public function rules()
{
return [
[['openid'], 'string'],
[['real_name'], 'required'],
[['gender'], 'required'],
[['is_view'], 'required'],
@ -67,9 +72,9 @@ class UserModifyForm extends ApiModel
return $this->getModelError();
}
$form = new LoginForm();
//有绑定信息 去登陆
$user = User::findOne(['mobile_phone' => $this->mobile_phone]);
if (!empty($user->mobile_phone) && !empty($user->is_view)) {
$form = new LoginForm();
@ -80,6 +85,7 @@ class UserModifyForm extends ApiModel
return $form->login();
}
//没有信息 去绑定
$t = \Yii::$app->db->beginTransaction();
try {
@ -102,21 +108,33 @@ class UserModifyForm extends ApiModel
$user->username = $username;
$user->password = $password_encryption;
$user->auth_key = \Yii::$app->security->generateRandomString();;
$res = $user->save();
if (!$user->save()) {
if ($this->openid) {
$user_outh = UserOauth::findOne(['openid' => $this->openid]);
if ($user_outh == null) {
$t->rollBack();
return ['code' => 1, 'msg' => '请重新进行微信授权',];
}
if ($user_outh->user_id == 0) {
$user_outh->user_id = $user->id;
$res1 = $user_outh->save();
if (!$res1) {
$t->rollBack();
return $this->getModelError($user_outh);
}
}
}
if (!$res) {
$t->rollBack();
return $this->getModelError($user);
}
$t->commit();
$form->username = $username;
$form->password = $password;
$form->token_type = 3;
$data = $form->login();
return $data;
} catch (\Exception $e) {
$t->rollBack();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -53117,3 +53117,137 @@ $_SERVER = [
'REQUEST_TIME_FLOAT' => 1698387201.99
'REQUEST_TIME' => 1698387201
]
2023-10-27 17:32:20 [127.0.0.1][-][-][error][yii\db\Exception] PDOException: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) in D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\Connection.php:722
Stack trace:
#0 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\Connection.php(722): PDO->__construct('mysql:host=127....', 'root', 'root', NULL)
#1 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\Connection.php(637): yii\db\Connection->createPdoInstance()
#2 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\Connection.php(1067): yii\db\Connection->open()
#3 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\Connection.php(1054): yii\db\Connection->getMasterPdo()
#4 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\Command.php(261): yii\db\Connection->getSlavePdo()
#5 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\Command.php(1163): yii\db\Command->prepare(true)
#6 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\Command.php(410): yii\db\Command->queryInternal('fetchAll', NULL)
#7 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\mysql\Schema.php(320): yii\db\Command->queryAll()
#8 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\mysql\Schema.php(125): yii\db\mysql\Schema->findColumns(Object(yii\db\TableSchema))
#9 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\Schema.php(756): yii\db\mysql\Schema->loadTableSchema('cx_wechat_app')
#10 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\Schema.php(192): yii\db\Schema->getTableMetadata('{{%wechat_app}}', 'schema', false)
#11 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\ActiveRecord.php(439): yii\db\Schema->getTableSchema('{{%wechat_app}}')
#12 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\ActiveRecord.php(266): yii\db\ActiveRecord::getTableSchema()
#13 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\ActiveRecord.php(238): yii\db\ActiveRecord::filterValidColumnNames(Object(yii\db\Connection), Array)
#14 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\ActiveRecord.php(195): yii\db\ActiveRecord::filterCondition(Array, Array)
#15 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\BaseActiveRecord.php(110): yii\db\ActiveRecord::findByCondition(Array)
#16 D:\phpstudy_pro\WWW\cxfoot\modules\api\controllers\Controller.php(64): yii\db\BaseActiveRecord::findOne(Array)
#17 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\base\BaseObject.php(109): app\modules\api\controllers\Controller->init()
#18 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\base\Controller.php(95): yii\base\BaseObject->__construct(Array)
#19 [internal function]: yii\base\Controller->__construct('user', Object(app\modules\api\Module), Array)
#20 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\di\Container.php(411): ReflectionClass->newInstanceArgs(Array)
#21 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\di\Container.php(170): yii\di\Container->build('app\\modules\\api...', Array, Array)
#22 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\BaseYii.php(345): yii\di\Container->get('app\\modules\\api...', Array)
#23 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\base\Module.php(666): yii\BaseYii::createObject('app\\modules\\api...', Array)
#24 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\base\Module.php(620): yii\base\Module->createControllerByID('user')
#25 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\base\Module.php(612): yii\base\Module->createController('modify-user')
#26 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\base\Module.php(546): yii\base\Module->createController('user/modify-use...')
#27 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\web\Application.php(103): yii\base\Module->runAction('api/user/modify...', Array)
#28 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\base\Application.php(384): yii\web\Application->handleRequest(Object(yii\web\Request))
#29 D:\phpstudy_pro\WWW\cxfoot\web\index.php(11): yii\base\Application->run()
#30 {main}
Next yii\db\Exception: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) in D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\Connection.php:648
Stack trace:
#0 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\Connection.php(1067): yii\db\Connection->open()
#1 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\Connection.php(1054): yii\db\Connection->getMasterPdo()
#2 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\Command.php(261): yii\db\Connection->getSlavePdo()
#3 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\Command.php(1163): yii\db\Command->prepare(true)
#4 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\Command.php(410): yii\db\Command->queryInternal('fetchAll', NULL)
#5 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\mysql\Schema.php(320): yii\db\Command->queryAll()
#6 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\mysql\Schema.php(125): yii\db\mysql\Schema->findColumns(Object(yii\db\TableSchema))
#7 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\Schema.php(756): yii\db\mysql\Schema->loadTableSchema('cx_wechat_app')
#8 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\Schema.php(192): yii\db\Schema->getTableMetadata('{{%wechat_app}}', 'schema', false)
#9 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\ActiveRecord.php(439): yii\db\Schema->getTableSchema('{{%wechat_app}}')
#10 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\ActiveRecord.php(266): yii\db\ActiveRecord::getTableSchema()
#11 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\ActiveRecord.php(238): yii\db\ActiveRecord::filterValidColumnNames(Object(yii\db\Connection), Array)
#12 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\ActiveRecord.php(195): yii\db\ActiveRecord::filterCondition(Array, Array)
#13 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\db\BaseActiveRecord.php(110): yii\db\ActiveRecord::findByCondition(Array)
#14 D:\phpstudy_pro\WWW\cxfoot\modules\api\controllers\Controller.php(64): yii\db\BaseActiveRecord::findOne(Array)
#15 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\base\BaseObject.php(109): app\modules\api\controllers\Controller->init()
#16 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\base\Controller.php(95): yii\base\BaseObject->__construct(Array)
#17 [internal function]: yii\base\Controller->__construct('user', Object(app\modules\api\Module), Array)
#18 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\di\Container.php(411): ReflectionClass->newInstanceArgs(Array)
#19 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\di\Container.php(170): yii\di\Container->build('app\\modules\\api...', Array, Array)
#20 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\BaseYii.php(345): yii\di\Container->get('app\\modules\\api...', Array)
#21 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\base\Module.php(666): yii\BaseYii::createObject('app\\modules\\api...', Array)
#22 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\base\Module.php(620): yii\base\Module->createControllerByID('user')
#23 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\base\Module.php(612): yii\base\Module->createController('modify-user')
#24 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\base\Module.php(546): yii\base\Module->createController('user/modify-use...')
#25 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\web\Application.php(103): yii\base\Module->runAction('api/user/modify...', Array)
#26 D:\phpstudy_pro\WWW\cxfoot\vendor\yiisoft\yii2\base\Application.php(384): yii\web\Application->handleRequest(Object(yii\web\Request))
#27 D:\phpstudy_pro\WWW\cxfoot\web\index.php(11): yii\base\Application->run()
#28 {main}
Additional Information:
2023-10-27 17:32:20 [127.0.0.1][-][-][info][application] $_GET = [
'access_token' => 'bVM2WGUxaVgwZk1nelZuMnpheXE5cDA0dXQ1dkI0QzIyaHlJbVpNWTNIWT0='
'X-Csrf' => 'ag7x1Afy1r0q8j4y05vk3s4118hx7124'
]
$_POST = [
'real_name' => '王五'
'gender' => '1'
'is_view' => '42.5'
'mobile_phone' => '18222222225'
]
$_FILES = []
$_COOKIE = [
'_csrf' => 'a8b4fcde61c1d69f745885f519eaae91db7a8668afe5a409e03eff0c43484ba8a:2:{i:0'
's:5:\"_csrf\"' => ''
'i:1' => ''
's:32:\"0agcdEBhUF7RG5gXkV_cPYEVrmXq3BPd\"' => ''
'}' => ''
]
$_SERVER = [
'PATH' => 'C:\\imagemagick;C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\redist\\intel64_win\\compiler;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;E:\\anzhuang\\QTSystem\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;D:\\Git\\cmd;D:\\svn\\bin;C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python311;C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python311\\Scripts;D:\\Xftp 7\\;D:\\微信web开发者工具\\dll;C:\\Users\\Administrator\\AppData\\Local\\Microsoft\\WindowsApps;;D:\\PhpStorm 2021.2.1\\bin;;D:\\Microsoft VS Code\\bin;D:\\phpstudy_pro\\Extensions\\php\\php7.4.3nts;C:\\Users\\Administrator\\AppData\\Local\\ComposerSetup\\bin;C:\\Users\\Administrator\\AppData\\Roaming\\Composer\\vendor\\bin'
'SYSTEMROOT' => 'C:\\WINDOWS'
'COMSPEC' => 'C:\\WINDOWS\\system32\\cmd.exe'
'PATHEXT' => '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC'
'WINDIR' => 'C:\\WINDOWS'
'PHPRC' => 'D:/phpstudy_pro/Extensions/php/php7.3.4nts'
'_FCGI_SHUTDOWN_EVENT_' => '9080'
'SCRIPT_NAME' => '/index.php'
'REQUEST_URI' => '/api/user/modify-user?access_token=bVM2WGUxaVgwZk1nelZuMnpheXE5cDA0dXQ1dkI0QzIyaHlJbVpNWTNIWT0%3D&X-Csrf=ag7x1Afy1r0q8j4y05vk3s4118hx7124'
'QUERY_STRING' => 'access_token=bVM2WGUxaVgwZk1nelZuMnpheXE5cDA0dXQ1dkI0QzIyaHlJbVpNWTNIWT0%3D&X-Csrf=ag7x1Afy1r0q8j4y05vk3s4118hx7124'
'REQUEST_METHOD' => 'POST'
'SERVER_PROTOCOL' => 'HTTP/1.1'
'GATEWAY_INTERFACE' => 'CGI/1.1'
'REDIRECT_QUERY_STRING' => 'access_token=bVM2WGUxaVgwZk1nelZuMnpheXE5cDA0dXQ1dkI0QzIyaHlJbVpNWTNIWT0%3D&X-Csrf=ag7x1Afy1r0q8j4y05vk3s4118hx7124'
'REDIRECT_URL' => '/api/user/modify-user'
'REMOTE_PORT' => '54260'
'SCRIPT_FILENAME' => 'D:/phpstudy_pro/WWW/cxfoot/web/index.php'
'SERVER_ADMIN' => 'admin@example.com'
'CONTEXT_DOCUMENT_ROOT' => 'D:/phpstudy_pro/WWW/cxfoot/web'
'CONTEXT_PREFIX' => ''
'REQUEST_SCHEME' => 'http'
'DOCUMENT_ROOT' => 'D:/phpstudy_pro/WWW/cxfoot/web'
'REMOTE_ADDR' => '127.0.0.1'
'SERVER_PORT' => '80'
'SERVER_ADDR' => '127.0.0.1'
'SERVER_NAME' => 'cxfoot.com'
'SERVER_SOFTWARE' => 'Apache/2.4.39 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9a mod_log_rotate/1.02'
'SERVER_SIGNATURE' => ''
'SystemRoot' => 'C:\\WINDOWS'
'CONTENT_LENGTH' => '508'
'CONTENT_TYPE' => 'multipart/form-data; boundary=--------------------------830050929129078381707191'
'HTTP_HOST' => 'cxfoot.com'
'HTTP_COOKIE' => '_csrf=a8b4fcde61c1d69f745885f519eaae91db7a8668afe5a409e03eff0c43484ba8a:2:%7Bi:0;s:5:%22_csrf%22;i:1;s:32:%220agcdEBhUF7RG5gXkV_cPYEVrmXq3BPd%22;%7D'
'HTTP_CONNECTION' => 'close'
'HTTP_ACCEPT_ENCODING' => 'gzip, deflate, br'
'HTTP_ACCEPT' => '*/*'
'HTTP_CACHE_CONTROL' => 'no-cache'
'HTTP_USER_AGENT' => 'PostmanRuntime-ApipostRuntime/1.1.0'
'REDIRECT_STATUS' => '200'
'FCGI_ROLE' => 'RESPONDER'
'PHP_SELF' => '/index.php'
'REQUEST_TIME_FLOAT' => 1698399140.4461
'REQUEST_TIME' => 1698399140
]