Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-web-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-web-master
Commits
6ecdff67
Commit
6ecdff67
authored
Aug 16, 2024
by
lizhan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
📝
【TASK-20240816-01】TASK:积分页面跳转
parent
9410aad4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
127 additions
and
7 deletions
+127
-7
vip_avatar.png
src/assets/Integral/vip_avatar.png
+0
-0
getters.js
src/store/getters.js
+3
-1
user.js
src/store/modules/user.js
+7
-2
integral.vue
src/views/jiedao/profile/integral.vue
+117
-4
No files found.
src/assets/Integral/vip_avatar.png
0 → 100644
View file @
6ecdff67
4.37 KB
src/store/getters.js
View file @
6ecdff67
...
@@ -15,6 +15,8 @@ const getters = {
...
@@ -15,6 +15,8 @@ const getters = {
// 数据字典
// 数据字典
dict_datas
:
state
=>
state
.
dict
.
dictDatas
,
dict_datas
:
state
=>
state
.
dict
.
dictDatas
,
// 用户信息
// 用户信息
loginUser
:
state
=>
state
.
user
.
loginUser
loginUser
:
state
=>
state
.
user
.
loginUser
,
// 用户id
id
:
state
=>
state
.
user
.
id
}
}
export
default
getters
export
default
getters
src/store/modules/user.js
View file @
6ecdff67
...
@@ -8,7 +8,8 @@ const state = {
...
@@ -8,7 +8,8 @@ const state = {
avatar
:
''
,
avatar
:
''
,
introduction
:
''
,
introduction
:
''
,
roles
:
[],
roles
:
[],
loginUser
:
null
loginUser
:
null
,
id
:
null
}
}
const
mutations
=
{
const
mutations
=
{
...
@@ -29,6 +30,9 @@ const mutations = {
...
@@ -29,6 +30,9 @@ const mutations = {
},
},
SET_USER
:
(
state
,
data
)
=>
{
SET_USER
:
(
state
,
data
)
=>
{
state
.
loginUser
=
data
state
.
loginUser
=
data
},
SET_ID
:
(
state
,
id
)
=>
{
state
.
id
=
id
}
}
}
}
...
@@ -73,13 +77,14 @@ const actions = {
...
@@ -73,13 +77,14 @@ const actions = {
}
}
// eslint-disable-next-line
// eslint-disable-next-line
const
{
roles
,
nickname
,
avatar
,
introduction
}
=
{...
data
,
roles
:
[
'
admin
'
]
}
const
{
roles
,
id
,
nickname
,
avatar
,
introduction
}
=
{
...
data
,
roles
:
[
'
admin
'
]
}
// roles must be a non-empty array
// roles must be a non-empty array
if
(
!
roles
||
roles
.
length
<=
0
)
{
if
(
!
roles
||
roles
.
length
<=
0
)
{
reject
(
'
getInfo: roles must be a non-null array!
'
)
reject
(
'
getInfo: roles must be a non-null array!
'
)
}
}
commit
(
'
SET_ID
'
,
id
)
commit
(
'
SET_ROLES
'
,
roles
)
commit
(
'
SET_ROLES
'
,
roles
)
commit
(
'
SET_NAME
'
,
nickname
)
commit
(
'
SET_NAME
'
,
nickname
)
localStorage
.
setItem
(
'
nickname
'
,
nickname
)
localStorage
.
setItem
(
'
nickname
'
,
nickname
)
...
...
src/views/jiedao/profile/integral.vue
View file @
6ecdff67
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"integral"
>
我的积分
<div
class=
"header"
>
<div
/>
<img
src=
"@/assets/setting/user.png"
/>
<div
class=
"header-content"
>
<div
class=
"content-box"
>
<div
class=
"avatar"
>
<img
class=
"imgs"
src=
"@/assets/Integral/vip_avatar.png"
alt=
""
>
</div>
<div
class=
"content-text"
>
<div
class=
"text-vip"
>
尊贵的白金会员
</div>
<div
class=
"text-integral"
>
已兑换积分为100
 
可用积分为80
</div>
</div>
<div
class=
"content-image"
>
<img
class=
"imgs"
src=
"@/assets/Integral/vip_avatar.png"
alt=
""
>
</div>
</div>
<div
class=
"content-divider"
>
<div
class=
"divider-vip"
>
vip1
</div>
<div
class=
"divider-num"
>
233
</div>
</div>
</div>
<div
class=
"header-menu"
>
<div
class=
"menu-item"
@
click=
"toJump(1)"
>
积分日志
 
<i
class=
"el-icon-arrow-right"
/></div>
<div
class=
"menu-item"
@
click=
"toJump(2)"
>
兑换日志
 
<i
class=
"el-icon-arrow-right"
/></div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
export
default
{
name
:
'
JdIntegral
'
,
data
()
{
return
{
integral
:
100
,
available
:
80
}
},
created
()
{
},
methods
:
{
// 跳转 日志
toJump
(
val
)
{
const
path
=
val
===
1
?
'
/jiedao/jd-integral-log
'
:
'
/jiedao/jd-exchange-log
'
this
.
$router
.
push
({
path
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.integral
{
box-shadow
:
0
2px
12px
0
rgba
(
0
,
0
,
0
,
0
.1
);
.header
{
width
:
100%
;
height
:
160px
;
color
:
#333
;
background
:
#B9BCC8
;
border-top-left-radius
:
10px
;
border-top-right-radius
:
10px
;
box-sizing
:
border-box
;
padding
:
20px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
.header-content
{
padding
:
20px
0
;
width
:
50%
;
height
:
inherit
;
box-sizing
:
border-box
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-between
;
.content-box
{
width
:
100%
;
display
:
flex
;
align-items
:
center
;
}
.avatar
{
margin-right
:
10px
;
width
:
60px
;
height
:
60px
;
overflow
:
hidden
;
.imgs
{
width
:
100%
;
height
:
100%
;
object-fit
:
cover
;
}
}
.content-image
{
margin-left
:
auto
;
width
:
60px
;
height
:
60px
;
overflow
:
hidden
;
.imgs
{
width
:
100%
;
height
:
100%
;
object-fit
:
cover
;
}
}
.content-text
{
.text-vip
{
font-size
:
16px
;
}
}
}
.header-menu
{
.menu-item
{
margin-bottom
:
20px
;
&
:last-child
{
margin-bottom
:
0
;
}
i
{
font-weight
:
700
;
}
}
}
}
}
</
style
>
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