Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-customer-new-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-app-customer-new-master
Commits
1b53d301
Commit
1b53d301
authored
Oct 12, 2024
by
chenwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改积分记录兑换记录时间展示的格式
parent
80b01c69
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
88 deletions
+64
-88
exchange.vue
src/pages/log/exchange.vue
+29
-43
integral.vue
src/pages/log/integral.vue
+35
-45
No files found.
src/pages/log/exchange.vue
View file @
1b53d301
...
...
@@ -2,23 +2,15 @@
<view>
<dHeader
:title=
"$lang.lang.log.logExchange"
></dHeader>
<view
class=
"container"
>
<view
class=
"item"
v-for=
"item in list"
:key=
"item.id"
@
click=
"toDetail(item.id)"
>
<view
class=
"item"
v-for=
"item in list"
:key=
"item.id"
@
click=
"toDetail(item.id)"
>
<div
class=
"item-title"
>
{{
$lang
.
lang
.
log
.
redeemGifts
}}
</div>
<div
class=
"item-box"
>
<div
class=
"box-img"
>
<image
class=
"imgs"
:src=
"locale === 'zh' ? item.imgZh : item.imgEn"
></image>
<image
class=
"imgs"
:src=
"locale === 'zh' ? item.imgZh : item.imgEn"
></image>
</div>
<div
class=
"box-content"
>
<div
class=
"content-text"
>
{{
locale
===
"
zh
"
?
item
.
rewardTitleZh
:
item
.
rewardTitleEn
}}
{{
locale
===
'
zh
'
?
item
.
rewardTitleZh
:
item
.
rewardTitleEn
}}
</div>
<div
class=
"content-time"
>
{{
formatDate
(
item
.
createTime
)
}}
</div>
</div>
...
...
@@ -33,63 +25,57 @@
</
template
>
<
script
>
import
dHeader
from
"
../../components/dHeader/index.vue
"
;
import
dHeader
from
'
../../components/dHeader/index.vue
'
export
default
{
components
:
{
dHeader
,
dHeader
},
data
()
{
return
{
list
:
[]
,
}
;
list
:
[]
}
},
created
()
{
this
.
getList
()
;
this
.
getList
()
},
computed
:
{
locale
()
{
return
this
.
$lang
.
locale
;
}
,
return
this
.
$lang
.
locale
}
},
methods
:
{
toDetail
(
id
)
{
uni
.
navigateTo
({
url
:
"
/pages/exchange_detail/exchange_detail?id=
"
+
id
,
})
;
url
:
'
/pages/exchange_detail/exchange_detail?id=
'
+
id
})
},
// 获取礼品列表
async
getList
()
{
try
{
const
memberId
=
this
.
$store
.
getters
.
id
;
const
{
code
,
data
}
=
await
this
.
$request
.
post
(
"
/app-api/reward/redeem/record/list
"
,
{
memberId
,
}
);
const
memberId
=
this
.
$store
.
getters
.
id
const
{
code
,
data
}
=
await
this
.
$request
.
post
(
'
/app-api/reward/redeem/record/list
'
,
{
memberId
})
if
(
code
==
0
&&
data
)
{
this
.
list
=
data
;
this
.
list
=
data
}
}
catch
(
error
)
{
console
.
log
(
error
)
;
console
.
log
(
error
)
}
},
// 时间戳转换为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"
>
...
...
src/pages/log/integral.vue
View file @
1b53d301
...
...
@@ -4,7 +4,7 @@
<view
class=
"container"
>
<view
class=
"item"
v-for=
"(item, index) in list"
:key=
"index"
>
<div
class=
"item-title"
>
{{
locale
==
"
zh
"
?
item
.
sourceTypeZh
:
item
.
sourceTypeEn
}}
{{
locale
==
'
zh
'
?
item
.
sourceTypeZh
:
item
.
sourceTypeEn
}}
</div>
<div
class=
"item-box"
>
<div
class=
"box-img"
>
...
...
@@ -12,20 +12,16 @@
</div>
<div
class=
"box-content"
>
<div
class=
"content-text"
>
{{
locale
==
"
zh
"
?
item
.
descZh
:
item
.
descEn
}}
{{
locale
==
'
zh
'
?
item
.
descZh
:
item
.
descEn
}}
</div>
<div
class=
"content-time"
>
{{
formatDate
(
item
.
createTime
)
}}
</div>
</div>
<div
class=
"box-right"
>
<view
class=
"box-right-num"
v-if=
"item.rewardCount"
>
X
{{
item
.
rewardCount
}}
</view
>
<view
class=
"box-right-num"
v-if=
"item.rewardCount"
>
X
{{
item
.
rewardCount
}}
</view>
<view
class=
"box-right-img"
v-if=
"item.expired"
>
<image
src=
"../../static/img/overdue.png"
></image>
</view>
<view
class=
"box-right-text"
>
{{
item
.
operateType
}}
 
{{
item
.
scoreCount
}}
</view
>
<view
class=
"box-right-text"
>
{{
item
.
operateType
}}
 
{{
item
.
scoreCount
}}
</view>
</div>
</div>
</view>
...
...
@@ -34,68 +30,62 @@
</
template
>
<
script
>
import
dHeader
from
"
../../components/dHeader/index.vue
"
;
import
dHeader
from
'
../../components/dHeader/index.vue
'
export
default
{
components
:
{
dHeader
,
dHeader
},
data
()
{
return
{
list
:
[]
,
}
;
list
:
[]
}
},
created
()
{
this
.
getList
()
;
this
.
getList
()
},
computed
:
{
locale
()
{
return
this
.
$lang
.
locale
;
return
this
.
$lang
.
locale
},
// 图片数组
imgArr
()
{
return
{
1
:
"
../../static/img/log_type1.png
"
,
2
:
"
../../static/img/log_type2.png
"
,
4
:
"
../../static/img/log_type4.png
"
,
5
:
"
../../static/img/log_type5.png
"
,
6
:
"
../../static/img/log_type6.png
"
,
7
:
"
../../static/img/log_type7.png
"
,
8
:
"
../../static/img/log_type8.png
"
,
}
;
}
,
1
:
'
../../static/img/log_type1.png
'
,
2
:
'
../../static/img/log_type2.png
'
,
4
:
'
../../static/img/log_type4.png
'
,
5
:
'
../../static/img/log_type5.png
'
,
6
:
'
../../static/img/log_type6.png
'
,
7
:
'
../../static/img/log_type7.png
'
,
8
:
'
../../static/img/log_type8.png
'
}
}
},
methods
:
{
// 获取列表
async
getList
()
{
try
{
const
id
=
this
.
$store
.
getters
.
id
;
const
{
code
,
data
}
=
await
this
.
$request
.
post
(
"
/app-api/member/user-score/log
"
,
{
id
,
}
);
const
id
=
this
.
$store
.
getters
.
id
const
{
code
,
data
}
=
await
this
.
$request
.
post
(
'
/app-api/member/user-score/log
'
,
{
id
})
if
(
code
==
0
&&
data
)
{
this
.
list
=
data
;
this
.
list
=
data
}
}
catch
(
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"
>
...
...
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