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
2180de03
Commit
2180de03
authored
Aug 20, 2024
by
lizhan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
📝
【TASK-20240820-01】TASK:兑换日志
兑换日志页完善,多语言增加log字段
parent
18f0135e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
172 additions
and
5 deletions
+172
-5
log.js
src/api/log.js
+19
-1
zh.js
src/lang/zh.js
+3
-0
exchangeLog.vue
src/views/jiedao/profile/exchangeLog.vue
+146
-1
integralLog.vue
src/views/jiedao/profile/integralLog.vue
+4
-3
No files found.
src/api/log.js
View file @
2180de03
import
request
from
'
@/utils/request
'
// 获取
兑换
日志列表
// 获取
积分
日志列表
export
function
logList
(
data
)
{
return
request
({
url
:
'
/app-api/member/user-score/log
'
,
...
...
@@ -8,3 +8,21 @@ export function logList(data) {
data
})
}
// 获取兑换日志列表 礼品
export
function
exchangeLogList
(
data
)
{
return
request
({
url
:
'
/app-api/reward/redeem/record/list
'
,
method
:
'
post
'
,
data
})
}
// 获取礼品详情
export
function
exchangeLogDetail
(
data
)
{
return
request
({
url
:
'
/app-api/reward/redeem/record/detail
'
,
method
:
'
post
'
,
data
})
}
src/lang/zh.js
View file @
2180de03
...
...
@@ -1113,5 +1113,8 @@ export default {
maxIntegral
:
'
累计最高积分
'
,
date
:
'
有效期
'
,
rulesIllustrate
:
'
规则说明
'
},
log
:
{
redeemGifts
:
'
礼品兑换
'
}
}
src/views/jiedao/profile/exchangeLog.vue
View file @
2180de03
<
template
><div
class=
"container"
>
兑换日志
</div></
template
>
<
template
>
<div
class=
"container"
>
<div
v-for=
"item in list"
:key=
"item.id"
class=
"item"
@
click=
"toDetail(item.id)"
>
<div
class=
"item-title"
>
{{
$t
(
'
log.redeemGifts
'
)
}}
</div>
<div
class=
"item-box"
>
<div
class=
"box-img"
>
<img
class=
"imgs"
:src=
"locale === 'zh_CN' ? item.imgZh : item.imgEn"
>
</div>
<div
class=
"box-content"
>
<div
class=
"content-text"
>
{{
locale
===
'
zh_CN
'
?
item
.
rewardTitleZh
:
item
.
rewardTitleEn
}}
</div>
<div
class=
"content-time"
>
{{
formatDate
(
item
.
createTime
)
}}
</div>
</div>
<div
class=
"box-right"
>
<div
class=
"box-right-num"
>
X
{{
item
.
rewardCount
}}
</div>
<div
class=
"box-right-text"
>
-
{{
item
.
scoreCount
}}
</div>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
exchangeLogList
}
from
'
@/api/log
'
export
default
{
data
()
{
return
{
list
:
[]
}
},
computed
:
{
locale
()
{
return
this
.
$store
.
getters
.
language
}
},
created
()
{
this
.
getList
()
},
methods
:
{
async
getList
()
{
try
{
const
memberId
=
this
.
$store
.
getters
.
id
const
{
code
,
data
}
=
await
exchangeLogList
({
memberId
})
if
(
code
===
0
)
{
this
.
list
=
data
}
}
catch
(
err
)
{
console
.
log
(
err
)
}
},
// 时间戳转换为YYYY-MM-DD HH:mm:ss
formatDate
(
time
)
{
const
date
=
new
Date
(
time
)
const
Y
=
date
.
getFullYear
()
+
'
-
'
const
M
=
(
date
.
getMonth
()
+
1
<
10
?
'
0
'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
)
+
'
-
'
const
D
=
date
.
getDate
()
+
'
'
const
h
=
date
.
getHours
()
+
'
:
'
const
m
=
date
.
getMinutes
()
+
'
:
'
const
s
=
date
.
getSeconds
()
return
Y
+
M
+
D
+
h
+
m
+
s
},
// 跳转详情
toDetail
(
id
)
{
this
.
$router
.
push
({
path
:
`/jiedao/jd-exchange-details`
,
query
:
{
id
}})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.container
{
padding
:
10px
;
box-sizing
:
border-box
;
.item
{
padding
:
10px
15px
15px
15px
;
margin-bottom
:
15px
;
width
:
100%
;
box-sizing
:
border-box
;
border-radius
:
8px
;
box-shadow
:
0
1px
6px
0
rgba
(
0
,
0
,
0
,
0
.1
);
}
}
.item-title
{
font-size
:
14px
;
font-weight
:
500
;
margin-bottom
:
10px
;
}
.item-box
{
width
:
100%
;
display
:
flex
;
box-sizing
:
border-box
;
}
.box-img
{
width
:
50px
;
height
:
60px
;
margin-right
:
10px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
.imgs
{
width
:
50px
;
height
:
50px
;
object-fit
:
cover
;
}
}
.box-content
{
flex
:
1
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-between
;
.content-text
{
font-size
:
14px
;
color
:
#7f7f7f
;
display
:
-
webkit-box
;
-webkit-box-orient
:
vertical
;
-webkit-line-clamp
:
2
;
line-clamp
:
2
;
overflow
:
hidden
;
}
.content-time
{
font-size
:
12px
;
color
:
#7f7f7f
;
}
}
.box-right
{
margin-left
:
5px
;
width
:
60px
;
height
:
60px
;
display
:
flex
;
align-items
:
flex-end
;
flex-direction
:
column
;
justify-content
:
space-between
;
border-radius
:
50%
;
font-size
:
12px
;
color
:
#333333
;
}
.box-right-img
{
transform
:
translate
(
10px
,
-30px
);
width
:
60upx
;
height
:
60upx
;
}
</
style
>
src/views/jiedao/profile/integralLog.vue
View file @
2180de03
...
...
@@ -95,7 +95,8 @@ export default {
}
}
.item-title
{
font-size
:
12px
;
font-size
:
14px
;
font-weight
:
500
;
margin-bottom
:
10px
;
}
.item-box
{
...
...
@@ -122,7 +123,7 @@ export default {
flex-direction
:
column
;
justify-content
:
space-between
;
.content-text
{
font-size
:
1
2
px
;
font-size
:
1
4
px
;
color
:
#7f7f7f
;
display
:
-
webkit-box
;
-webkit-box-orient
:
vertical
;
...
...
@@ -131,7 +132,7 @@ export default {
overflow
:
hidden
;
}
.content-time
{
font-size
:
1
0
px
;
font-size
:
1
2
px
;
color
:
#7f7f7f
;
}
}
...
...
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