chore: 入库生产基线(2026-10-26 与 shop.douba.top 一致)

- 11 个已跟踪文件的在途改动此前只存在于工作区,生产已在运行
- 补入两个从未入库的文件:InternalController.php(app_03/box_app 内部接口)、
  config/internal.php(内部通信 key,值从 .env 读取,不含硬编码密钥)
- 逐文件 md5 比对过生产,内容一致

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-26 17:08:55 +08:00
parent c7f85ffbda
commit fc353899a9
13 changed files with 331 additions and 37 deletions

View File

@@ -51,7 +51,7 @@ class LoginServices extends BaseServices
*/
public function login($account, $password, $spread_uid)
{
$user = $this->dao->getOne(['phone' => $account], 'uid,pwd,status');
$user = $this->dao->getOne(['phone' => $account], 'uid,pwd,status,phone');
if ($user) {
if ($user->pwd !== md5((string)$password))
throw new ValidateException('账号或密码错误');
@@ -65,7 +65,7 @@ class LoginServices extends BaseServices
$uid = (int)$user['uid'];
//更新用户信息
$token = $this->createToken($uid, 'api', $user->pwd);
$token = $this->createToken($uid, 'api', $user->pwd, ['phone' => $user->phone ?? '']);
if ($token) {
$this->updateUserInfo(['spread_uid' => $spread_uid], $user);
// 用户登录成功事件
@@ -268,7 +268,7 @@ class LoginServices extends BaseServices
$this->updateUserInfo(['spread_uid' => $spread_uid], $user);
$uid = (int)$user['uid'];
$token = $this->createToken($uid, 'api', $user->pwd);
$token = $this->createToken($uid, 'api', $user->pwd, ['phone' => $user->phone ?? '']);
if ($token) {
// 用户登录成功事件
event('user.login', [$uid, app('request')->ip()]);
@@ -305,7 +305,7 @@ class LoginServices extends BaseServices
throw new ValidateException('修改新用户登录类型出错');
}
$uid = (int)$switch_user['uid'];
$token = $this->createToken($uid, 'api', $switch_user['pwd']);
$token = $this->createToken($uid, 'api', $switch_user['pwd'], ['phone' => $switch_user->phone ?? '']);
if ($token) {
// 用户登录成功事件
event('user.login', [$uid, app('request')->ip()]);
@@ -336,7 +336,10 @@ class LoginServices extends BaseServices
$wechatUser = app()->make(WechatUserServices::class);
//更新用户信息
$user = $wechatUser->wechatOauthAfter([$openid, $wechatInfo, $spread_uid, $login_type, $userType]);
$token = $this->createToken((int)$user['uid'], $userType, $user['pwd']);
$token = $this->createToken((int)$user['uid'], $userType, $user['pwd'], [
'phone' => $user['phone'] ?? $phone,
'openid' => $openid,
]);
if ($token) {
return [
'token' => $token['token'],