diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 73d09fd..733e537 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -415,7 +415,8 @@ export default { // 检查用户信息,若缓存中没有则调接口获取 if (!this.userId) { 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 || {}; if (infoData.user_id) { const existing = getCachedUserInfo() || {};