This website works better with JavaScript.
Home
Explore
Help
Register
Sign In
Augcl
/
englishread-front
generated from
hly/uniapp-shop-templates
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Projects
0
Releases
0
Wiki
Activity
Browse Source
refactor: 移除重复的用户信息存储逻辑
在getUserInfo方法中,直接通过store更新用户信息,移除多余的本地变量赋值操作
hfll
主管理员
2 weeks ago
parent
296add5afc
commit
5895c7c607
1 changed files
with
1 additions
and
3 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-3
App.vue
+ 1
- 3
App.vue
View File
@ -43,9 +43,7 @@
async
getUserInfo
(
)
{
const
res
=
await
this
.
$api
.
login
.
getUserInfo
(
)
;
if
(
res
.
code
===
200
)
{
this
.
userInfo
=
res
.
result
;
/
/
存
储
用
户
信
息
到
s
t
o
r
e
this
.
$store
.
dispatch
(
'updateUserInfo'
,
this
.
userInfo
)
this
.
$store
.
dispatch
(
'updateUserInfo'
,
this
.
userInfo
)
}
}
,
Write
Preview
Loading…
Cancel
Save