forked from wuancake/wuancake_web
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bf43605
commit b82324e
Showing
4 changed files
with
19 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,12 @@ | |
<div class="set-group-content"> | ||
<p> | ||
<label>昵称: </label> | ||
<input v-model="nickName" type="text" placeholder=""/> | ||
<input v-model="nickName" type="text" :placeholder="user_info.user_name"/> | ||
</p> | ||
<p> | ||
<label>邮箱:</label> | ||
<!-- <span>{{ user_info.email }}</span> --> | ||
<span>[email protected]</span> | ||
<span>{{ user_info.email }}</span> | ||
<!-- <span>[email protected]</span> --> | ||
</p> | ||
<p> | ||
<label>分组:</label> | ||
|
@@ -26,7 +26,7 @@ | |
|
||
<script> | ||
import { changeNickName } from '../../api' | ||
import { mapState } from 'vuex' | ||
import { mapState, mapMutations } from 'vuex' | ||
export default { | ||
name: 'account', | ||
data () { | ||
|
@@ -38,6 +38,9 @@ export default { | |
...mapState(['user_info']) | ||
}, | ||
methods: { | ||
...mapMutations({ | ||
setUserInfo: 'SET_USER_INFO' | ||
}), | ||
exit () { | ||
this.$router.push({ path: '/exitGroup' }) | ||
}, | ||
|
@@ -49,11 +52,14 @@ export default { | |
userid: this.user_info.user_id, | ||
userName: this.nickName | ||
}).then(res => { | ||
if (res.infoCode === '200') { | ||
if (res.infoCode === '200' || res.infoCode === 200) { | ||
this.$notify.success({ | ||
title: '设置成功', | ||
message: '设置个人信息成功' | ||
}) | ||
this.setUserInfo({ | ||
user_name: this.nickName | ||
}) | ||
this.$router.push({ path: '/' }) | ||
} else { | ||
this.$notify.error({ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters