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
904471eb
Commit
904471eb
authored
Oct 12, 2024
by
chenwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature' into 'dev'
积分日志兑换日志 时间展示 See merge request
!32
parents
3c380a96
dd79d7c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
78 additions
and
64 deletions
+78
-64
exchangeLog.vue
src/views/jiedao/profile/exchangeLog.vue
+34
-26
integralLog.vue
src/views/jiedao/profile/integralLog.vue
+44
-38
No files found.
src/views/jiedao/profile/exchangeLog.vue
View file @
904471eb
<
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
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
}}
{{
locale
===
"
zh_CN
"
?
item
.
rewardTitleZh
:
item
.
rewardTitleEn
}}
</div>
<div
class=
"content-time"
>
{{
formatDate
(
item
.
createTime
)
}}
</div>
</div>
...
...
@@ -25,50 +30,53 @@
</
template
>
<
script
>
import
{
exchangeLogList
}
from
'
@/api/log
'
import
{
exchangeLogList
}
from
"
@/api/log
"
;
export
default
{
data
()
{
return
{
list
:
[]
}
list
:
[]
,
}
;
},
computed
:
{
locale
()
{
return
this
.
$store
.
getters
.
language
}
return
this
.
$store
.
getters
.
language
;
}
,
},
created
()
{
this
.
getList
()
this
.
getList
()
;
},
methods
:
{
async
getList
()
{
try
{
const
memberId
=
this
.
$store
.
getters
.
id
const
{
code
,
data
}
=
await
exchangeLogList
({
memberId
})
const
memberId
=
this
.
$store
.
getters
.
id
;
const
{
code
,
data
}
=
await
exchangeLogList
({
memberId
})
;
if
(
code
===
0
)
{
this
.
list
=
data
this
.
list
=
data
;
}
}
catch
(
err
)
{
console
.
log
(
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
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
()}
`
.
padStart
(
2
,
"
0
"
)
+
"
"
;
const
h
=
`
${
date
.
getHours
()}
`
.
padStart
(
2
,
"
0
"
)
+
"
:
"
;
const
m
=
`
${
date
.
getMinutes
()}
`
.
padStart
(
2
,
"
0
"
)
+
"
:
"
;
const
s
=
`
${
date
.
getSeconds
()}
`
.
padStart
(
2
,
"
0
"
);
return
Y
+
M
+
D
+
h
+
m
+
s
;
},
// 跳转详情
toDetail
(
id
)
{
this
.
$router
.
push
({
path
:
`/jiedao/jd-exchange-details`
,
query
:
{
id
}
})
}
}
}
this
.
$router
.
push
({
path
:
`/jiedao/jd-exchange-details`
,
query
:
{
id
}
});
}
,
}
,
}
;
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
src/views/jiedao/profile/integralLog.vue
View file @
904471eb
<
template
>
<div
class=
"container"
>
<div
v-for=
"(item, index) in list"
:key=
"index"
class=
"item"
>
<div
class=
"item-title"
>
{{
locale
==
'
zh_CN
'
?
item
.
sourceTypeZh
:
item
.
sourceTypeEn
}}
</div>
<div
class=
"item-title"
>
{{
locale
==
"
zh_CN
"
?
item
.
sourceTypeZh
:
item
.
sourceTypeEn
}}
</div>
<div
class=
"item-box"
>
<div
class=
"box-img"
>
<img
class=
"imgs"
:src=
"imgArr[item.sourceType]"
>
<img
class=
"imgs"
:src=
"imgArr[item.sourceType]"
/>
</div>
<div
class=
"box-content"
>
<div
class=
"content-text"
>
{{
locale
==
'
zh_CN
'
?
item
.
descZh
:
item
.
descEn
}}
{{
locale
==
"
zh_CN
"
?
item
.
descZh
:
item
.
descEn
}}
</div>
<div
class=
"content-time"
>
{{
formatDate
(
item
.
createTime
)
}}
</div>
</div>
<div
class=
"box-right"
>
<div
v-if=
"item.rewardCount"
class=
"box-right-num"
>
X
{{
item
.
rewardCount
}}
</div>
<div
v-if=
"item.rewardCount"
class=
"box-right-num"
>
X
{{
item
.
rewardCount
}}
</div>
<div
v-if=
"item.expired"
class=
"box-right-img"
>
<img
class=
"imgs"
src=
"@/assets/log/overdue.png"
alt
>
<img
class=
"imgs"
src=
"@/assets/log/overdue.png"
alt
/>
</div>
<div
class=
"box-right-text"
>
{{
item
.
operateType
}}
 
{{
item
.
scoreCount
}}
</div>
<div
class=
"box-right-text"
>
{{
item
.
operateType
}}
 
{{
item
.
scoreCount
}}
</div>
</div>
</div>
</div>
...
...
@@ -28,57 +31,60 @@
</
template
>
<
script
>
import
{
logList
}
from
'
@/api/log
'
import
{
logList
}
from
"
@/api/log
"
;
export
default
{
data
()
{
return
{
list
:
[]
}
list
:
[]
,
}
;
},
computed
:
{
locale
()
{
return
this
.
$store
.
getters
.
language
return
this
.
$store
.
getters
.
language
;
},
imgArr
()
{
return
{
'
1
'
:
require
(
'
@/assets/log/log_type1.png
'
),
'
2
'
:
require
(
'
@/assets/log/log_type2.png
'
),
'
4
'
:
require
(
'
@/assets/log/log_type4.png
'
),
'
5
'
:
require
(
'
@/assets/log/log_type5.png
'
),
'
6
'
:
require
(
'
@/assets/log/log_type6.png
'
),
'
7
'
:
require
(
'
@/assets/log/log_type7.png
'
),
'
8
'
:
require
(
'
@/assets/log/log_type8.png
'
)
}
}
1
:
require
(
"
@/assets/log/log_type1.png
"
),
2
:
require
(
"
@/assets/log/log_type2.png
"
),
4
:
require
(
"
@/assets/log/log_type4.png
"
),
5
:
require
(
"
@/assets/log/log_type5.png
"
),
6
:
require
(
"
@/assets/log/log_type6.png
"
),
7
:
require
(
"
@/assets/log/log_type7.png
"
),
8
:
require
(
"
@/assets/log/log_type8.png
"
),
}
;
}
,
},
created
()
{
this
.
getList
()
this
.
getList
()
;
},
methods
:
{
async
getList
()
{
try
{
const
id
=
this
.
$store
.
getters
.
id
const
{
code
,
data
}
=
await
logList
({
id
})
const
id
=
this
.
$store
.
getters
.
id
;
const
{
code
,
data
}
=
await
logList
({
id
})
;
if
(
code
===
0
)
{
this
.
list
=
data
this
.
list
=
data
;
}
}
catch
(
err
)
{
console
.
log
(
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
}
}
}
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
()}
`
.
padStart
(
2
,
"
0
"
)
+
"
"
;
const
h
=
`
${
date
.
getHours
()}
`
.
padStart
(
2
,
"
0
"
)
+
"
:
"
;
const
m
=
`
${
date
.
getMinutes
()}
`
.
padStart
(
2
,
"
0
"
)
+
"
:
"
;
const
s
=
`
${
date
.
getSeconds
()}
`
.
padStart
(
2
,
"
0
"
);
return
Y
+
M
+
D
+
h
+
m
+
s
;
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
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