File tree Expand file tree Collapse file tree 2 files changed +16
-14
lines changed Expand file tree Collapse file tree 2 files changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -67,10 +67,12 @@ import pinyin from 'pinyin'
67
67
if (pinyin (item .username , {style: pinyin .STYLE_NORMAL })[0 ][0 ].charAt (0 ).toUpperCase () == findSym) {
68
68
if (! status) {
69
69
addedList .push (findSym)
70
+ console .log (' item' , item .url , index)
70
71
addedList .push (item)
71
72
status = true
72
73
} else {
73
74
addedList .push (item)
75
+ console .log (' item' , item .url , index)
74
76
}
75
77
} else {
76
78
findSym = pinyin (item .username , {style: pinyin .STYLE_NORMAL })[0 ][0 ].charAt (0 ).toUpperCase ()
Original file line number Diff line number Diff line change @@ -79,24 +79,24 @@ import settings from '../settings.js'
79
79
}
80
80
if(!norepeatFriend) {
81
81
this.show = false
82
- console.log('result.url', result.url)
83
- result.friendslist.push({
84
- username: this.loginId,
85
- url: result.url
86
- })
87
- let new_user = {
88
- _id: result._id,
89
- friendslist: result.friendslist
90
- }
91
- this.$http.post(settings.server + '/updateUser', new_user).then((res) => {
92
- let result = res.data
93
- })
94
82
this.$http.post(settings.server + '/getUserInfo', { username: this.loginId }).then((res) => {
95
83
let login_result = res.data.data.user
96
- console.log('login_result.url',login_result.url)
84
+
85
+ result.friendslist.push({
86
+ username: this.loginId,
87
+ url: login_result.url
88
+ })
89
+ let new_user = {
90
+ _id: result._id,
91
+ friendslist: result.friendslist
92
+ }
93
+ this.$http.post(settings.server + '/updateUser', new_user).then((res) => {
94
+ let result = res.data
95
+ })
96
+
97
97
login_result.friendslist.push({
98
98
username: this.add_friend,
99
- url: login_result .url
99
+ url: result .url
100
100
})
101
101
let new_login = {
102
102
_id: login_result._id,
You can’t perform that action at this time.
0 commit comments