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
aa0e9f51
Commit
aa0e9f51
authored
Oct 12, 2024
by
chenwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature' into 'release'
积分日志兑换日志 时间展示 See merge request
!31
parents
0375725d
dd79d7c3
Changes
2
Show 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 @
aa0e9f51
<
template
>
<
template
>
<div
class=
"container"
>
<div
class=
"container"
>
<div
v-for=
"item in list"
:key=
"item.id"
class=
"item"
@
click=
"toDetail(item.id)"
>
<div
<div
class=
"item-title"
>
{{
$t
(
'
log.redeemGifts
'
)
}}
</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=
"item-box"
>
<div
class=
"box-img"
>
<div
class=
"box-img"
>
<img
<img
class=
"imgs"
class=
"imgs"
:src=
"locale === 'zh_CN' ? item.imgZh : item.imgEn"
:src=
"locale === 'zh_CN' ? item.imgZh : item.imgEn"
>
/
>
</div>
</div>
<div
class=
"box-content"
>
<div
class=
"box-content"
>
<div
class=
"content-text"
>
<div
class=
"content-text"
>
{{
locale
===
'
zh_CN
'
?
item
.
rewardTitleZh
:
item
.
rewardTitleEn
}}
{{
locale
===
"
zh_CN
"
?
item
.
rewardTitleZh
:
item
.
rewardTitleEn
}}
</div>
</div>
<div
class=
"content-time"
>
{{
formatDate
(
item
.
createTime
)
}}
</div>
<div
class=
"content-time"
>
{{
formatDate
(
item
.
createTime
)
}}
</div>
</div>
</div>
...
@@ -25,50 +30,53 @@
...
@@ -25,50 +30,53 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
exchangeLogList
}
from
'
@/api/log
'
import
{
exchangeLogList
}
from
"
@/api/log
"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
list
:
[]
list
:
[]
,
}
}
;
},
},
computed
:
{
computed
:
{
locale
()
{
locale
()
{
return
this
.
$store
.
getters
.
language
return
this
.
$store
.
getters
.
language
;
}
}
,
},
},
created
()
{
created
()
{
this
.
getList
()
this
.
getList
()
;
},
},
methods
:
{
methods
:
{
async
getList
()
{
async
getList
()
{
try
{
try
{
const
memberId
=
this
.
$store
.
getters
.
id
const
memberId
=
this
.
$store
.
getters
.
id
;
const
{
code
,
data
}
=
await
exchangeLogList
({
memberId
})
const
{
code
,
data
}
=
await
exchangeLogList
({
memberId
})
;
if
(
code
===
0
)
{
if
(
code
===
0
)
{
this
.
list
=
data
this
.
list
=
data
;
}
}
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
log
(
err
)
console
.
log
(
err
)
;
}
}
},
},
// 时间戳转换为YYYY-MM-DD HH:mm:ss
// 时间戳转换为YYYY-MM-DD HH:mm:ss
formatDate
(
time
)
{
formatDate
(
time
)
{
const
date
=
new
Date
(
time
)
const
date
=
new
Date
(
time
);
const
Y
=
date
.
getFullYear
()
+
'
-
'
const
Y
=
date
.
getFullYear
()
+
"
-
"
;
const
M
=
(
date
.
getMonth
()
+
1
<
10
?
'
0
'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
)
+
'
-
'
const
M
=
const
D
=
date
.
getDate
()
+
'
'
(
date
.
getMonth
()
+
1
<
10
const
h
=
date
.
getHours
()
+
'
:
'
?
"
0
"
+
(
date
.
getMonth
()
+
1
)
const
m
=
date
.
getMinutes
()
+
'
:
'
:
date
.
getMonth
()
+
1
)
+
"
-
"
;
const
s
=
date
.
getSeconds
()
const
D
=
`
${
date
.
getDate
()}
`
.
padStart
(
2
,
"
0
"
)
+
"
"
;
return
Y
+
M
+
D
+
h
+
m
+
s
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
)
{
toDetail
(
id
)
{
this
.
$router
.
push
({
path
:
`/jiedao/jd-exchange-details`
,
query
:
{
id
}
})
this
.
$router
.
push
({
path
:
`/jiedao/jd-exchange-details`
,
query
:
{
id
}
});
}
}
,
}
}
,
}
}
;
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
src/views/jiedao/profile/integralLog.vue
View file @
aa0e9f51
<
template
>
<
template
>
<div
class=
"container"
>
<div
class=
"container"
>
<div
v-for=
"(item, index) in list"
:key=
"index"
class=
"item"
>
<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=
"item-box"
>
<div
class=
"box-img"
>
<div
class=
"box-img"
>
<img
<img
class=
"imgs"
:src=
"imgArr[item.sourceType]"
/>
class=
"imgs"
:src=
"imgArr[item.sourceType]"
>
</div>
</div>
<div
class=
"box-content"
>
<div
class=
"box-content"
>
<div
class=
"content-text"
>
<div
class=
"content-text"
>
{{
locale
==
'
zh_CN
'
?
item
.
descZh
:
item
.
descEn
}}
{{
locale
==
"
zh_CN
"
?
item
.
descZh
:
item
.
descEn
}}
</div>
</div>
<div
class=
"content-time"
>
{{
formatDate
(
item
.
createTime
)
}}
</div>
<div
class=
"content-time"
>
{{
formatDate
(
item
.
createTime
)
}}
</div>
</div>
</div>
<div
class=
"box-right"
>
<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"
>
<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>
<div
class=
"box-right-text"
>
{{
item
.
operateType
}}
 
{{
item
.
scoreCount
}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -28,57 +31,60 @@
...
@@ -28,57 +31,60 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
logList
}
from
'
@/api/log
'
import
{
logList
}
from
"
@/api/log
"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
list
:
[]
list
:
[]
,
}
}
;
},
},
computed
:
{
computed
:
{
locale
()
{
locale
()
{
return
this
.
$store
.
getters
.
language
return
this
.
$store
.
getters
.
language
;
},
},
imgArr
()
{
imgArr
()
{
return
{
return
{
'
1
'
:
require
(
'
@/assets/log/log_type1.png
'
),
1
:
require
(
"
@/assets/log/log_type1.png
"
),
'
2
'
:
require
(
'
@/assets/log/log_type2.png
'
),
2
:
require
(
"
@/assets/log/log_type2.png
"
),
'
4
'
:
require
(
'
@/assets/log/log_type4.png
'
),
4
:
require
(
"
@/assets/log/log_type4.png
"
),
'
5
'
:
require
(
'
@/assets/log/log_type5.png
'
),
5
:
require
(
"
@/assets/log/log_type5.png
"
),
'
6
'
:
require
(
'
@/assets/log/log_type6.png
'
),
6
:
require
(
"
@/assets/log/log_type6.png
"
),
'
7
'
:
require
(
'
@/assets/log/log_type7.png
'
),
7
:
require
(
"
@/assets/log/log_type7.png
"
),
'
8
'
:
require
(
'
@/assets/log/log_type8.png
'
)
8
:
require
(
"
@/assets/log/log_type8.png
"
),
}
}
;
}
}
,
},
},
created
()
{
created
()
{
this
.
getList
()
this
.
getList
()
;
},
},
methods
:
{
methods
:
{
async
getList
()
{
async
getList
()
{
try
{
try
{
const
id
=
this
.
$store
.
getters
.
id
const
id
=
this
.
$store
.
getters
.
id
;
const
{
code
,
data
}
=
await
logList
({
id
})
const
{
code
,
data
}
=
await
logList
({
id
})
;
if
(
code
===
0
)
{
if
(
code
===
0
)
{
this
.
list
=
data
this
.
list
=
data
;
}
}
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
log
(
err
)
console
.
log
(
err
)
;
}
}
},
},
// 时间戳转换为YYYY-MM-DD HH:mm:ss
// 时间戳转换为YYYY-MM-DD HH:mm:ss
formatDate
(
time
)
{
formatDate
(
time
)
{
const
date
=
new
Date
(
time
)
const
date
=
new
Date
(
time
);
const
Y
=
date
.
getFullYear
()
+
'
-
'
const
Y
=
date
.
getFullYear
()
+
"
-
"
;
const
M
=
(
date
.
getMonth
()
+
1
<
10
?
'
0
'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
)
+
'
-
'
const
M
=
const
D
=
date
.
getDate
()
+
'
'
(
date
.
getMonth
()
+
1
<
10
const
h
=
date
.
getHours
()
+
'
:
'
?
"
0
"
+
(
date
.
getMonth
()
+
1
)
const
m
=
date
.
getMinutes
()
+
'
:
'
:
date
.
getMonth
()
+
1
)
+
"
-
"
;
const
s
=
date
.
getSeconds
()
const
D
=
`
${
date
.
getDate
()}
`
.
padStart
(
2
,
"
0
"
)
+
"
"
;
return
Y
+
M
+
D
+
h
+
m
+
s
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
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
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