Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
J
jd-vx-app
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
Administrator
jd-vx-app
Commits
3a27bcf0
Commit
3a27bcf0
authored
May 07, 2022
by
肖健
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
个人中心更改
parent
88204685
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
6 deletions
+23
-6
home.vue
pages/home.vue
+7
-0
personal.vue
pages/personal.vue
+16
-6
No files found.
pages/home.vue
View file @
3a27bcf0
...
@@ -68,6 +68,13 @@ export default {
...
@@ -68,6 +68,13 @@ export default {
},
},
methods
:
{
methods
:
{
getPrice
()
{
getPrice
()
{
let
token
=
uni
.
getStorageSync
(
'userToken'
);
if
(
!
token
){
uni
.
navigateTo
({
url
:
'/pages/binding/index?url=/pages/main&index=0'
})
return
;
}
uni
.
showToast
({
uni
.
showToast
({
title
:
"您的免费领取次数已用完"
,
title
:
"您的免费领取次数已用完"
,
icon
:
'none'
,
icon
:
'none'
,
...
...
pages/personal.vue
View file @
3a27bcf0
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"ps__btn"
@
click=
"loginOut"
>
退出登录
</div>
<div
class=
"ps__btn"
v-if=
"logoutFlag"
@
click=
"loginOut"
>
退出登录
</div>
</view>
</view>
<u-gap
bgColor=
"transparent"
height=
"70"
></u-gap>
<u-gap
bgColor=
"transparent"
height=
"70"
></u-gap>
</view>
</view>
...
@@ -66,6 +66,7 @@ export default {
...
@@ -66,6 +66,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
show
:
false
,
show
:
false
,
logoutFlag
:
true
,
menu
:
[{
menu
:
[{
icon
:
require
(
"@/static/my/my12.png"
),
icon
:
require
(
"@/static/my/my12.png"
),
title
:
"我的地址"
,
title
:
"我的地址"
,
...
@@ -129,8 +130,8 @@ export default {
...
@@ -129,8 +130,8 @@ export default {
uni
.
removeStorageSync
(
'xcxIndexPath'
)
uni
.
removeStorageSync
(
'xcxIndexPath'
)
// uni.removeStorageSync('openid')
// uni.removeStorageSync('openid')
uni
.
navigateTo
({
uni
.
reLaunch
({
url
:
'/pages/
binding/index
'
url
:
'/pages/
main
'
});
});
}
}
})
})
...
@@ -145,7 +146,7 @@ export default {
...
@@ -145,7 +146,7 @@ export default {
let
token
=
uni
.
getStorageSync
(
'userToken'
);
let
token
=
uni
.
getStorageSync
(
'userToken'
);
if
(
!
token
){
if
(
!
token
){
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/binding/index?url=/pages/main&
param
=4'
url
:
'/pages/binding/index?url=/pages/main&
index
=4'
})
})
return
;
return
;
}
}
...
@@ -163,12 +164,17 @@ export default {
...
@@ -163,12 +164,17 @@ export default {
url
:
'/pagesD/pages/personal/userInfo'
url
:
'/pagesD/pages/personal/userInfo'
});
});
},
},
getUserInfo
()
{
async
getUserInfo
()
{
let
token
=
uni
.
getStorageSync
(
'userToken'
);
if
(
!
token
){
this
.
logoutFlag
=
false
return
}
let
opts
=
{
let
opts
=
{
url
:
'/app/user/info'
,
url
:
'/app/user/info'
,
method
:
'get'
method
:
'get'
};
};
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
await
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
this
.
userInfo
=
res
.
data
.
data
this
.
userInfo
=
res
.
data
.
data
if
(
this
.
userInfo
.
avatar
){
if
(
this
.
userInfo
.
avatar
){
...
@@ -277,6 +283,10 @@ export default {
...
@@ -277,6 +283,10 @@ export default {
},
},
onShow
()
{
onShow
()
{
this
.
getUserInfo
()
this
.
getUserInfo
()
// setTimeout(() => {
// this.show=true
// }, 100);
},
},
};
};
</
script
>
</
script
>
...
...
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