Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
X
XiTianSenMall
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
leiqingsong
XiTianSenMall
Commits
c6a085cc
Commit
c6a085cc
authored
Mar 31, 2021
by
leiqingsong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试设置页获取用户信息
parent
e36c1ef7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
App.vue
H5/src/App.vue
+4
-3
settings.vue
H5/src/views/settings.vue
+4
-2
No files found.
H5/src/App.vue
View file @
c6a085cc
...
...
@@ -22,9 +22,9 @@ export default {
this
.
currentTitle
=
val
.
meta
.
title
;
}
},
async
created
()
{
created
()
{
console
.
log
(
"和App开始交互"
);
await
this
.
$bridgeToAppFun
this
.
$bridgeToAppFun
.
getAuthToken
()
.
then
(
res
=>
{
console
.
log
(
"获取到token成功"
,
res
);
...
...
@@ -38,8 +38,9 @@ export default {
methods
:
{
async
saveUser
(
data
)
{
if
(
data
)
{
console
.
log
(
"预存用户信息"
);
await
getUserInfo
().
then
(
res
=>
{
console
.
log
(
"存用户信息"
);
console
.
log
(
"
获取到,
存用户信息"
);
if
(
res
.
code
==
0
)
{
localStorage
.
setItem
(
"user"
,
JSON
.
stringify
(
res
.
data
));
}
...
...
H5/src/views/settings.vue
View file @
c6a085cc
...
...
@@ -90,10 +90,12 @@ export default {
};
},
mounted
()
{
console
.
log
(
"读取用户信息"
);
this
.
imageBaseUrl
=
process
.
env
.
VUE_APP_BASE_URL
;
this
.
getAppVersion
();
setTimeout
(()
=>
{
console
.
log
(
"读取用户信息"
);
this
.
getUser
();
},
1000
);
},
methods
:
{
onUpdateVersion
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment