Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CFFP-HB
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chao Sun
CFFP-HB
Commits
1b0f55db
Commit
1b0f55db
authored
Nov 15, 2022
by
sunchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
积分详情
parent
7fc0eee6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
197 additions
and
13 deletions
+197
-13
api/api.ts
+8
-0
pages/myPoints/myPoints.vue
+3
-2
pages/myPoints/pointsDetail.vue
+186
-11
No files found.
api/api.ts
View file @
1b0f55db
...
@@ -108,5 +108,13 @@ export default {
...
@@ -108,5 +108,13 @@ export default {
//我的积分查询接口
//我的积分查询接口
findByUserIdForFortuneStatistic
(
params
){
findByUserIdForFortuneStatistic
(
params
){
return
request
(
`
${
apiURL
}
/fortune/findByUserIdForFortuneStatistic`
,
"POST"
,
params
)
return
request
(
`
${
apiURL
}
/fortune/findByUserIdForFortuneStatistic`
,
"POST"
,
params
)
},
//我的积分明细
findForExchangeStatisticDtl
(
params
){
return
request
(
`
${
apiURL
}
/fortune/findForExchangeStatisticDtl`
,
"POST"
,
params
)
},
//分类查询
dropOptionsQuery
(
params
){
return
request
(
`
${
apiURL
}
/metadata/dropOptionsQuery`
,
"POST"
,
params
)
}
}
}
}
pages/myPoints/myPoints.vue
View file @
1b0f55db
...
@@ -139,7 +139,7 @@
...
@@ -139,7 +139,7 @@
},
},
toPointDetail
(
item
){
toPointDetail
(
item
){
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`../myPoints/point
Detail`
url
:
`../myPoints/point
sDetail?timeFlag=
${
this
.
timeFlag
}
&fortuneDate=
${
this
.
fortuneDate
}
&commissionType=
${
item
.
commissionType
}
&productType=
${
item
.
productType
}
`
,
})
})
}
}
}
}
...
@@ -231,9 +231,10 @@
...
@@ -231,9 +231,10 @@
li{
li{
width
:
20%
;
width
:
20%
;
text-align
:
center
;
text-align
:
center
;
overflow
:
hidden
;
}
}
li
:nth-child
(
2
)
{
li
:nth-child
(
2
)
{
width
:
3
0%
;
width
:
4
0%
;
}
}
.get_point
{
.get_point
{
color
:
#FF0000
;
color
:
#FF0000
;
...
...
pages/myPoints/pointsDetail.vue
View file @
1b0f55db
<
template
>
<
template
>
<view
class=
"container"
>
<view
class=
"container"
>
<view
class=
"top"
>
<picker
@
change=
"changeProductType"
:value=
"dropOptionName"
:range=
"productTypeList"
range-key=
"dropOptionName"
>
<view
class=
"uni-input"
>
{{
productTypeList
[
productTypeIdx
][
'dropOptionName'
]
}}
<text
class=
"iconfont icon-youjiantou"
></text>
</view>
</picker>
<picker
mode=
"date"
:value=
"fortuneDate"
:end=
"maxDate"
fields=
"month"
@
change=
"bindDateChange"
>
<view
class=
"uni-input"
>
{{
fortuneDate
}}
<text
class=
"iconfont icon-youjiantou"
></text>
</view>
</picker>
<picker
@
change=
"changeCommissionType"
:value=
"dropOptionName"
:range=
"commissionTypeList"
range-key=
"dropOptionName"
>
<view
class=
"uni-input"
>
{{
commissionTypeList
[
commissionTypeIdx
][
'dropOptionName'
]
}}
<text
class=
"iconfont icon-youjiantou"
></text>
</view>
</picker>
</view>
<view
class=
"total_wrapper"
>
<h4
class=
"total"
>
{{
fortuneDate
}}
总得分
</h4>
<h4
class=
"total_score_add"
:class=
"
{'total_score_reduce':sumCommissionAmount
<
=
0
}"
>
<text>
{{
sumCommissionAmount
>
0
?
'+'
:
'-'
}}
</text>
{{
sumCommissionAmount
}}
</h4>
</view>
<view
class=
"list_wrapper"
>
<view
class=
"fortune_list"
v-for=
"(fortuneItem,idx) in cffpFortuneDateList"
:key=
"idx"
>
<view
class=
"date_score_info"
>
<view>
{{
fortuneItem
.
orderDate
}}
</view>
<view
class=
"total_score_add"
:class=
"
{'total_score_reduce':fortuneItem.nowSumCommissionAmount
<
=
0
}"
>
<text>
{{
fortuneItem
.
nowSumCommissionAmount
>
0
?
'+'
:
'-'
}}
</text>
{{
fortuneItem
.
nowSumCommissionAmount
}}
</view>
</view>
<view
class=
"fortuneExchangeList"
v-for=
"(item,index) in fortuneItem.cffpFortuneExchangeList"
>
<text>
{{
item
.
productTypeName
}}
</text>
<text
class=
"iconfont icon-youjiantou"
></text>
</view>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
api
from
'../../api/api'
;
import
common
from
'../../common/common'
;
export
default
{
export
default
{
data
(){
data
(){
return
{
return
{
fortuneDate
:
null
,
timeFlag
:
null
,
commissionType
:
null
,
commissionTypeIdx
:
0
,
productType
:
null
,
productTypeIdx
:
0
,
cffpFortuneDateList
:[],
maxDate
:
`
${
new
Date
().
getFullYear
()}
-
${
new
Date
().
getMonth
()
+
1
}
`
,
commissionTypeList
:[{
dropOptionName
:
null
,
dropOptionCode
:
null
}],
productTypeList
:[{
dropOptionName
:
null
,
dropOptionCode
:
null
}],
sumCommissionAmount
:
null
}
}
},
},
components
:{},
components
:{},
onLoad
(){
onLoad
(){
this
.
fortuneDate
=
common
.
getQueryString
(
'fortuneDate'
);
this
.
productType
=
common
.
getQueryString
(
'productType'
);
this
.
timeFlag
=
common
.
getQueryString
(
'timeFlag'
);
this
.
commissionType
=
common
.
getQueryString
(
'commissionType'
);
if
(
this
.
timeFlag
==
'D'
||
this
.
timeFlag
==
'Y'
){
this
.
fortuneDate
=
`
${
new
Date
().
getFullYear
()}
-
${
new
Date
().
getMonth
()
+
1
}
-
${
new
Date
().
getDate
()}
`
}
this
.
getCommissionType
();
this
.
getProductType
();
this
.
getDetail
();
},
},
methods
:{
methods
:{
bindDateChange
:
function
(
e
)
{
this
.
fortuneDate
=
e
.
detail
.
value
;
this
.
getDetail
();
},
changeCommissionType
:
function
(
e
)
{
this
.
commissionTypeIdx
=
e
.
detail
.
value
;
this
.
commissionType
=
this
.
commissionTypeList
[
this
.
commissionTypeIdx
][
'dropOptionCode'
];
this
.
getDetail
();
},
changeProductType
:
function
(
e
)
{
this
.
productTypeIdx
=
e
.
detail
.
value
;
this
.
productType
=
this
.
productTypeList
[
this
.
productTypeIdx
][
'dropOptionCode'
];
this
.
getDetail
();
},
getDetail
(){
getDetail
(){
// const param = {
// isDtl: 1,
// userId: uni.getStorageSync('cffp_userId'),
// fortuneDate: this.fortuneDate,
// timeFlag: this.timeFlag,
// commissionType:this.commissionType,
// productType: this.productType
// }
const
param
=
{
const
param
=
{
"isDtl"
:
1
,
isDtl
:
1
,
"userId"
:
1
,
userId
:
1
,
"fortuneDate"
:
"2022-12"
,
fortuneDate
:
"2022-12"
,
"timeFlag"
:
"M"
,
timeFlag
:
"M"
,
"commissionType"
:
"A01"
,
commissionType
:
"A01"
,
"productType"
:
1
productType
:
1
}
api
.
findForExchangeStatisticDtl
(
param
).
then
((
res
)
=>
{
if
(
res
[
'success'
]){
this
.
cffpFortuneDateList
=
res
[
'data'
][
'cffpFortuneDateList'
];
console
.
log
(
this
.
cffpFortuneDateList
)
this
.
sumCommissionAmount
=
res
[
'data'
][
'sumCommissionAmount'
];
}
}
});
},
//commissionType
getProductType
(){
api
.
dropOptionsQuery
({
code
:
'cffp_course_classify'
}).
then
((
res
)
=>
{
this
.
productTypeList
=
[{
dropOptionName
:
'全部'
,
dropOptionCode
:
null
}].
concat
(
res
[
'data'
][
'dropMasterInfoList'
][
0
][
'dropOptionsInfoList'
]);
for
(
let
i
=
0
;
i
<
this
.
productTypeList
.
length
;
i
++
){
if
(
this
.
productType
==
this
.
productTypeList
[
i
][
'dropOptionCode'
]){
this
.
productTypeIdx
=
i
;
break
;
}
}
})
},
getCommissionType
(){
api
.
dropOptionsQuery
({
code
:
'CFFP_Commission_Item'
}).
then
((
res
)
=>
{
this
.
commissionTypeList
=
[{
dropOptionName
:
'全部'
,
dropOptionCode
:
null
}].
concat
(
res
[
'data'
][
'dropMasterInfoList'
][
0
][
'dropOptionsInfoList'
]);
for
(
let
i
=
0
;
i
<
this
.
commissionTypeList
.
length
;
i
++
){
if
(
this
.
commissionType
==
this
.
commissionTypeList
[
i
][
'dropOptionCode'
]){
this
.
commissionTypeIdx
=
i
;
break
;
}
}
console
.
log
(
this
.
commissionTypeIdx
)
})
}
}
}
}
}
}
</
script
>
</
script
>
<
style
>
<
style
lang=
"scss"
>
.container
{
.top{
padding
:
30
rpx
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
margin
:
0
auto
20
rpx
auto
;
background
:
#fff
;
}
.total_wrapper
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
padding
:
30
rpx
;
background
:
#fff
;
margin-bottom
:
20
rpx
;
.total_score_add{
color
:
#F15A1F
;
}
.total_score_reduce
{
color
:
#5C9D50
;
}
}
.list_wrapper
{
padding
:
30
rpx
;
background
:
#fff
;
.fortune_list{
.date_score_info,.fortuneExchangeList{
display
:
flex
;
justify-content
:
space-between
;
margin-bottom
:
20
rpx
;
.total_score_add{
color
:
#F15A1F
;
}
.total_score_reduce
{
color
:
#5C9D50
;
}
.iconfont
{
color
:
#999999
;
font-size
:
24
rpx
;
}
}
.date_score_info
{
font-size
:
28
rpx
;
}
.fortuneExchangeList
{
border-bottom
:
2
rpx
#F2F2F2
solid
;
padding-bottom
:
20
rpx
;
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
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