We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
提示Required request parameter 'followingId' for method parameter type Integer is not present
The text was updated successfully, but these errors were encountered:
先说解决方案,pages/user/_account.vue 中的 mounted() 函数直接删掉,然后原本的 fetch() 修改如下
async fetch() { let {store, params, query, error} = this.$nuxt.context; params.page = query.page || 1 await Promise.all([ store .dispatch('user/fetchDetail', params) .catch(err => error({statusCode: 404})), store.dispatch('user/fetchUserExtend', params), store.dispatch('user/fetchArticleList', params), store.dispatch('user/fetchPortfolioList', params), store.dispatch('user/fetchFollowerList', params), store.dispatch('user/fetchFollowingList', params) ]) let _ts = this; this.$store.commit('setActiveMenu', 'user'); if (_ts.loggedIn) { await _ts.$axios.$get('/api/follow/is-follow', { params: { followingId: _ts.user.idUser, followingType: 0 } }).then(function (res) { _ts.$set(_ts, 'isFollow', res); }) } }
原因就是 fetch 是更新 followingId 的,然后 mounted 是使用 followingId 的,但是执行顺序是先执行 mounted 再执行 fetch,导致没找到 followingId
Sorry, something went wrong.
No branches or pull requests
提示Required request parameter 'followingId' for method parameter type Integer is not present
The text was updated successfully, but these errors were encountered: