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
cf29e757
Commit
cf29e757
authored
Aug 28, 2024
by
chenwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature' into 'dev'
t年月日格式 See merge request
!5
parents
1b9a16fd
266d0666
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
90 deletions
+77
-90
activity_detail.vue
src/pages/activity_detail/activity_detail.vue
+45
-41
exchange_detail.vue
src/pages/exchange_detail/exchange_detail.vue
+32
-49
No files found.
src/pages/activity_detail/activity_detail.vue
View file @
cf29e757
...
...
@@ -10,46 +10,50 @@
</view>
<view
class=
"container-main"
>
<view
class=
"activity-title"
>
{{
locale
===
'
zh
'
?
detailInfo
.
titleZh
:
detailInfo
.
titleEn
locale
===
"
zh
"
?
detailInfo
.
titleZh
:
detailInfo
.
titleEn
}}
</view>
<view
class=
"activity-remark"
v-if=
"detailInfo.type == 4"
v-html=
"
locale === 'zh_CN'
? detailInfo.extraShare.activityDescZh
: detailInfo.extraShare.activityDescEn
"
>
<view
class=
"activity-remark"
v-if=
"detailInfo.type == 4"
v-html=
"
locale === 'zh_CN'
? detailInfo.extraShare.activityDescZh
: detailInfo.extraShare.activityDescEn
"
>
</view>
<view
class=
"activity-cell"
>
<view
class=
"cell-label"
>
{{
detail
.
illustrate
}}
</view>
<view
class=
"cell-content"
>
<image
class=
"cell-image"
src=
"../../static/img/score_b.png"
></image>
<span
v-if=
"detailInfo.type == 4"
>
{{
detail
.
shareLabel
(
detailInfo
.
getScoreOnce
)
}}
</span>
<span
v-if=
"detailInfo.type == 3"
>
{{
detail
.
referralCodeLabel
(
detailInfo
.
getScoreOnce
)
}}
</span>
<view
class=
"cell-text"
v-if=
"detailInfo.type == '2'"
>
{{
detail
.
registerLabel
(
detailInfo
.
getScoreOnce
)
}}
</view>
<view
v-if=
"detailInfo.type == 1"
>
<view
class=
"rule"
v-for=
"ruleItem in detailInfo.extraOrderV.orderVRule"
:key=
"ruleItem.low"
>
{{
detail
.
orderRuleLabel
(
{
low
:
ruleItem
.
low
,
high
:
ruleItem
.
high
,
score
:
ruleItem
.
score
,
unit
:
detailInfo
.
extraOrderVtransportType
==
1
?
"
m³
"
:
"
kg
"
,
}
)
}}
<
/view
>
<
/view
>
<span
v-if=
"detailInfo.type == 4"
>
{{
detail
.
shareLabel
(
detailInfo
.
getScoreOnce
)
}}
</span>
<span
v-if=
"detailInfo.type == 3"
>
{{
detail
.
referralCodeLabel
(
detailInfo
.
getScoreOnce
)
}}
</span>
<view
class=
"cell-text"
v-if=
"detailInfo.type == '2'"
>
{{
detail
.
registerLabel
(
detailInfo
.
getScoreOnce
)
}}
</view>
<view
v-if=
"detailInfo.type == 1"
>
<view
class=
"rule"
v-for=
"ruleItem in detailInfo.extraOrderV.orderVRule"
:key=
"ruleItem.low"
>
{{
detail
.
orderRuleLabel
({
low
:
ruleItem
.
low
,
high
:
ruleItem
.
high
,
score
:
ruleItem
.
score
,
unit
:
detailInfo
.
extraOrderVtransportType
==
1
?
"
m³
"
:
"
kg
"
}
)
}}
<
/view
>
<
/view
>
<
/view
>
<
/view
>
<
view
class
=
"
activity-cell
"
v
-
if
=
"
detailInfo.type
!=
2
"
>
<
view
class
=
"
activity-cell
"
v
-
if
=
"
detailInfo.type
!=
2
"
>
<
view
class
=
"
cell-label
"
>
{{
detail
.
maxIntegral
}}
<
/view
>
<
view
class
=
"
cell-content
"
>
<
image
class
=
"
cell-image
"
src
=
"
../../static/img/score_b.png
"
><
/image
>
...
...
@@ -65,7 +69,7 @@
<
view
class
=
"
activity-cell
"
>
<
view
class
=
"
cell-label
"
>
{{
detail
.
rulesIllustrate
}}
<
/view
>
<
view
class
=
"
cell-content
"
>
{{
locale
===
'
zh
'
?
detailInfo
.
descZh
:
detailInfo
.
descEn
}}
{{
locale
===
"
zh
"
?
detailInfo
.
descZh
:
detailInfo
.
descEn
}}
<
/view
>
<
/view
>
<
/view
>
...
...
@@ -74,7 +78,7 @@
<
/template
>
<
script
>
import
dHeader
from
'
../../components/dHeader/index.vue
'
import
dHeader
from
"
../../components/dHeader/index.vue
"
export
default
{
components
:
{
dHeader
...
...
@@ -102,7 +106,7 @@ export default {
// 获取详情
getDetail
()
{
this
.
$request
.
post
(
'
/app-api/member/score-rule/get
'
,
{
id
:
this
.
id
}
)
.
post
(
"
/app-api/member/score-rule/get
"
,
{
id
:
this
.
id
}
)
.
then
(({
code
,
data
}
)
=>
{
if
(
code
===
0
&&
data
)
{
this
.
detailInfo
=
data
...
...
@@ -114,12 +118,12 @@ export default {
const
formatDate
=
(
timestamp
)
=>
{
const
date
=
new
Date
(
timestamp
)
const
year
=
date
.
getFullYear
()
const
month
=
String
(
date
.
getMonth
()
+
1
).
padStart
(
2
,
'
0
'
)
const
day
=
String
(
date
.
getDate
()).
padStart
(
2
,
'
0
'
)
const
hours
=
String
(
date
.
getHours
()).
padStart
(
2
,
'
0
'
)
const
minutes
=
String
(
date
.
getMinutes
()).
padStart
(
2
,
'
0
'
)
const
seconds
=
String
(
date
.
getSeconds
()).
padStart
(
2
,
'
0
'
)
return
`${year
}
:${month
}
:
${day
}
`
const
month
=
String
(
date
.
getMonth
()
+
1
).
padStart
(
2
,
"
0
"
)
const
day
=
String
(
date
.
getDate
()).
padStart
(
2
,
"
0
"
)
const
hours
=
String
(
date
.
getHours
()).
padStart
(
2
,
"
0
"
)
const
minutes
=
String
(
date
.
getMinutes
()).
padStart
(
2
,
"
0
"
)
const
seconds
=
String
(
date
.
getSeconds
()).
padStart
(
2
,
"
0
"
)
return
`${year
}
-${month
}
-
${day
}
`
}
return
`${formatDate(start)
}
${this.detail.to
}
${formatDate(end)
}
`
}
...
...
src/pages/exchange_detail/exchange_detail.vue
View file @
cf29e757
...
...
@@ -18,18 +18,11 @@
</div>
<div
class=
"nav"
>
<div
class=
"nav-image"
>
<image
class=
"img"
:src=
"locale === 'zh' ? detailInfo.imgZh : detailInfo.imgEn"
></image>
<image
class=
"img"
:src=
"locale === 'zh' ? detailInfo.imgZh : detailInfo.imgEn"
></image>
</div>
<div
class=
"nav-content"
>
<div
class=
"nav-content-text"
>
{{
locale
===
"
zh
"
?
detailInfo
.
rewardTitleZh
:
detailInfo
.
rewardTitleEn
}}
{{
locale
===
"
zh
"
?
detailInfo
.
rewardTitleZh
:
detailInfo
.
rewardTitleEn
}}
</div>
<div
class=
"nav-content-tag"
>
<div
class=
"tag-image"
>
...
...
@@ -52,28 +45,20 @@
<div
class=
"main-cell"
>
<div
class=
"cell-label"
>
{{
detail
.
exchangeOutlets
}}
</div>
<div
class=
"cell-content"
>
{{
locale
===
"
zh
"
?
detailInfo
.
nodeTitleZh
:
detailInfo
.
nodeTitleEn
}}
{{
locale
===
"
zh
"
?
detailInfo
.
nodeTitleZh
:
detailInfo
.
nodeTitleEn
}}
</div>
</div>
<div
class=
"main-cell"
>
<div
class=
"cell-label"
>
{{
detail
.
exchangeType
}}
</div>
<div
class=
"cell-content"
>
{{
locale
===
"
zh
"
?
detailInfo
.
redeemTypeZh
:
detailInfo
.
redeemTypeEn
}}
{{
locale
===
"
zh
"
?
detailInfo
.
redeemTypeZh
:
detailInfo
.
redeemTypeEn
}}
</div>
</div>
<template
v-if=
"detailInfo.redeemType != 1"
>
<div
class=
"main-cell"
>
<div
class=
"cell-label"
>
{{
detail
.
address
}}
</div>
<div
class=
"cell-content"
>
{{
detailInfo
.
recipientName
}}
 
+
{{
detailInfo
.
recipientPhoneNum
}}
,
{{
detailInfo
.
recipientName
}}
 
+
{{
detailInfo
.
recipientPhoneNum
}}
,
{{
detailInfo
.
recipientAddress
}}
<view
class=
"red"
>
{{
detail
.
errorMsg
}}
</view>
</div>
...
...
@@ -103,66 +88,64 @@
</template>
<
script
>
import
dHeader
from
"
../../components/dHeader/index.vue
"
;
import
dHeader
from
"
../../components/dHeader/index.vue
"
export
default
{
components
:
{
dHeader
,
dHeader
},
data
()
{
return
{
id
:
null
,
detailInfo
:
{}
,
}
;
detailInfo
:
{}
}
},
onLoad
(
route
)
{
console
.
log
(
route
)
;
this
.
id
=
route
.
id
;
this
.
getDetail
()
;
console
.
log
(
route
)
this
.
id
=
route
.
id
this
.
getDetail
()
},
computed
:
{
locale
()
{
return
this
.
$lang
.
locale
;
return
this
.
$lang
.
locale
},
detail
()
{
return
this
.
$lang
.
lang
.
detail
;
}
,
return
this
.
$lang
.
lang
.
detail
}
},
methods
:
{
// 获取详情
getDetail
()
{
this
.
$request
.
post
(
"
/app-api/reward/redeem/record/detail
"
,
{
redeemId
:
this
.
id
,
redeemId
:
this
.
id
})
.
then
(({
code
,
data
})
=>
{
if
(
code
==
0
&&
data
)
{
this
.
detailInfo
=
data
;
this
.
detailInfo
=
data
}
})
.
catch
((
error
)
=>
{
console
.
log
(
error
)
;
})
;
console
.
log
(
error
)
})
},
// 时间范围返回
getTimeRange
(
start
,
end
)
{
return
`
${
this
.
formatDate
(
start
)}${
this
.
detail
.
to
}${
this
.
formatDate
(
end
)}
`
;
return
`
${
this
.
formatDate
(
start
)}${
this
.
detail
.
to
}${
this
.
formatDate
(
end
)}
`
},
// 时间戳转换为YYYY-MM-DD HH:mm:ss
formatDate
(
timestamp
)
{
if
(
!
timestamp
)
return
""
;
const
date
=
new
Date
(
timestamp
)
;
const
year
=
date
.
getFullYear
()
;
const
month
=
String
(
date
.
getMonth
()
+
1
).
padStart
(
2
,
"
0
"
)
;
const
day
=
String
(
date
.
getDate
()).
padStart
(
2
,
"
0
"
)
;
const
hours
=
String
(
date
.
getHours
()).
padStart
(
2
,
"
0
"
)
;
const
minutes
=
String
(
date
.
getMinutes
()).
padStart
(
2
,
"
0
"
)
;
const
seconds
=
String
(
date
.
getSeconds
()).
padStart
(
2
,
"
0
"
)
;
return
`
${
year
}
:
${
month
}
:
${
day
}
`
;
}
,
}
,
}
;
if
(
!
timestamp
)
return
""
const
date
=
new
Date
(
timestamp
)
const
year
=
date
.
getFullYear
()
const
month
=
String
(
date
.
getMonth
()
+
1
).
padStart
(
2
,
"
0
"
)
const
day
=
String
(
date
.
getDate
()).
padStart
(
2
,
"
0
"
)
const
hours
=
String
(
date
.
getHours
()).
padStart
(
2
,
"
0
"
)
const
minutes
=
String
(
date
.
getMinutes
()).
padStart
(
2
,
"
0
"
)
const
seconds
=
String
(
date
.
getSeconds
()).
padStart
(
2
,
"
0
"
)
return
`
${
year
}
-
${
month
}
-
${
day
}
`
}
}
}
</
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