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

@@ -116,15 +116,19 @@ class WechatServices extends BaseServices
* 获取返回信息
* @param $user
* @param string $userType
* @param string $openid
* @return array
*/
public function getReturnInfo($user, string $userType = 'wechat')
public function getReturnInfo($user, string $userType = 'wechat', string $openid = '')
{
if (!$user || !isset($user['uid']) || !$user['uid']) {
throw new ValidateException('获取用户信息失败');
}
$uid = (int)$user['uid'];
$token = $this->createToken($uid, $userType, $user['pwd'] ?? '');
$token = $this->createToken($uid, $userType, $user['pwd'] ?? '', [
'phone' => $user['phone'] ?? '',
'openid' => $openid,
]);
if (!$token) {
throw new ValidateException('登录失败!');
}
@@ -179,7 +183,7 @@ class WechatServices extends BaseServices
} else {
$wechatUserServices->wechatUpdata([$user['uid'], $wechatInfo]);
}
return $this->getReturnInfo($user);
return $this->getReturnInfo($user, 'wechat', $openid);
}
/**
@@ -218,7 +222,7 @@ class WechatServices extends BaseServices
//更新用户信息
$wechatUserServices->wechatUpdata([$user['uid'], $wechatInfo]);
}
return $this->getReturnInfo($user);
return $this->getReturnInfo($user, 'wechat', $openid);
}
/**
@@ -260,7 +264,7 @@ class WechatServices extends BaseServices
//更新用户信息
$wechatUserServices->wechatUpdata([$user['uid'], $wechatInfo]);
}
return $this->getReturnInfo($user);
return $this->getReturnInfo($user, 'wechat', $openid);
}
/**
@@ -332,7 +336,7 @@ class WechatServices extends BaseServices
//更新用户信息
$wechatUserServices->wechatUpdata([$user['uid'], ['spread_uid' => $spread_uid]]);
}
return $this->getReturnInfo($user);
return $this->getReturnInfo($user, 'wechat', $openid);
}
/**
@@ -357,7 +361,7 @@ class WechatServices extends BaseServices
$wechatUser = app()->make(WechatUserServices::class);
//更新用户信息
$user = $wechatUser->wechatOauthAfter([$openid, $wechatInfo, $spread_uid, $login_type, $userType]);
return $this->getReturnInfo($user);
return $this->getReturnInfo($user, $userType, $openid);
}
/**
@@ -410,7 +414,7 @@ class WechatServices extends BaseServices
$wechatUser = app()->make(WechatUserServices::class);
//更新用户信息
$user = $wechatUser->wechatOauthAfter([$openid, $userInfo, $spread_uid, $login_type, $userType]);
$token = $this->getReturnInfo($user);
$token = $this->getReturnInfo($user, $userType, $openid);
$token['isbind'] = false;
return $token;
}