diff --git a/components/common/portfolio/manager/bind/list.vue b/components/common/portfolio/manager/bind/list.vue index 9f6d903..a9f7bfc 100644 --- a/components/common/portfolio/manager/bind/list.vue +++ b/components/common/portfolio/manager/bind/list.vue @@ -1,6 +1,6 @@ diff --git a/pages/user/settings/account.vue b/pages/user/settings/account.vue index 4974239..7a14566 100644 --- a/pages/user/settings/account.vue +++ b/pages/user/settings/account.vue @@ -20,9 +20,14 @@ - 保存 + 保存基本信息 + + +

社交信息

+
+ @@ -47,7 +52,7 @@ - 保存 + 保存社交信息 @@ -87,12 +92,12 @@ let _ts = this; _ts.$axios.$get('/api/user-info/detail/' + _ts.idUser).then(function (res) { if (res) { - if (res.message) { - _ts.$message.error(res.message); - } else { - _ts.$set(_ts, 'user', res.user); - _ts.$set(_ts, 'userExtend', res.userExtend); - } + _ts.$set(_ts, 'user', res); + } + }) + _ts.$axios.$get('/api/user-info/detail/' + _ts.idUser + '/extend-info').then(function (res) { + if (res) { + _ts.$set(_ts, 'userExtend', res); } }) }, @@ -104,8 +109,8 @@ nickname: _ts.user.nickname } }).then(function (res) { - if (res && res.message) { - _ts.$message.error(res.message); + if (!res) { + _ts.$message.error('昵称已被占用!'); } }) }, @@ -120,13 +125,9 @@ if (valid) { _ts.$axios.$patch('/api/user-info/update', user).then(function (res) { if (res) { - if (res.message) { - _ts.$message.error(res.message); - } else { - _ts.$set(_ts, 'user', res.user); - _ts.$store.commit('setUserInfo', res.user); - _ts.$message.success('更新成功 !'); - } + _ts.$set(_ts, 'user', res); + _ts.$store.commit('setUserInfo', res); + _ts.$message.success('更新成功 !'); } }) } else { @@ -139,12 +140,8 @@ let userExtend = _ts.userExtend; _ts.$axios.$patch('/api/user-info/update-extend', userExtend).then(function (res) { if (res) { - if (res.message) { - _ts.$message.error(res.message); - } else { - _ts.$set(_ts, 'userExtend', res.userExtend); - _ts.$message.success('更新成功 !'); - } + _ts.$set(_ts, 'userExtend', res); + _ts.$message.success('更新成功 !'); } }) } diff --git a/store/portfolio.js b/store/portfolio.js index 53815b8..88d1560 100644 --- a/store/portfolio.js +++ b/store/portfolio.js @@ -50,7 +50,7 @@ export const mutations = { state.detail.fetching = action }, updateDetailData(state, action) { - state.detail.data = action.portfolio + state.detail.data = action }, updateArticleList(state, action) { state.articles = action