Skip to content

Commit

Permalink
解决账号存取失败
Browse files Browse the repository at this point in the history
  • Loading branch information
TommyLemon committed Dec 2, 2018
1 parent 7f2b051 commit 6c27c54
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@
item.isLoggedIn = true

var data = res.data || {}
var user = data.code == 200 ? data.User : null
var user = data.code == 200 ? data.user : null
if (user != null) {
App.accounts[App.currentAccountIndex].name = user.name
App.saveCache(App.getBaseUrl(), 'currentAccountIndex', App.currentAccountIndex)
Expand Down Expand Up @@ -898,7 +898,7 @@
//由login按钮触发,不能通过callback回调来实现以下功能
var data = res.data || {}
if (data.code == 200) {
var user = data.User || {}
var user = data.user || {}
App.accounts.push( {
isLoggedIn: true,
id: user.id,
Expand Down Expand Up @@ -1238,7 +1238,7 @@
this.locals.unshift({
'Document': {
'userId': App.User.id,
'name': method + (StringUtil.isEmpty(req.tag, true) ? '' : ' ' + req.tag) + ' ' + App.formatDateTime(),
'name': App.formatDateTime() + (StringUtil.isEmpty(req.tag, true) ? '' : ' ' + req.tag),
'url': '/' + method,
'request': real
}
Expand Down

0 comments on commit 6c27c54

Please sign in to comment.