查询用户信息接口增加open_id参数
Uni-app H5 Deploy (Prod + Staging) / deploy (release) Successful in 47s

This commit is contained in:
kk
2026-07-11 20:21:58 +08:00
parent 842defea21
commit e12663052f
+2 -1
View File
@@ -415,7 +415,8 @@ export default {
// 检查用户信息,若缓存中没有则调接口获取 // 检查用户信息,若缓存中没有则调接口获取
if (!this.userId) { if (!this.userId) {
try { try {
const infoRes = await gatewayGet('/api/v1/user/info', {}); const openId = uni.getStorageSync('openid') || '';
const infoRes = await gatewayGet('/api/v1/user/info', { open_id: openId });
const infoData = (infoRes.data || {}).data || {}; const infoData = (infoRes.data || {}).data || {};
if (infoData.user_id) { if (infoData.user_id) {
const existing = getCachedUserInfo() || {}; const existing = getCachedUserInfo() || {};