|
|
@@ -26,8 +26,12 @@ export default new Vuex.Store({
|
|
|
actions: {
|
|
|
getUserInfo(context) {
|
|
|
return http.http.get('/user/my').then(res => {
|
|
|
- res.phone = res.phone || '';
|
|
|
- context.commit('setUserInfo', res);
|
|
|
+ if (res.sex || res.nickname.indexOf('用户') === -1) {
|
|
|
+ context.commit('setUserInfo', res);
|
|
|
+ } else {
|
|
|
+ context.commit('setUserInfo', null);
|
|
|
+ }
|
|
|
+
|
|
|
return Promise.resolve(res);
|
|
|
});
|
|
|
}
|