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
9842fcd0
Commit
9842fcd0
authored
Nov 15, 2022
by
kyle
Browse files
Options
Browse Files
Download
Plain Diff
销售课程
parents
3d890d98
1b0f55db
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
474 additions
and
68 deletions
+474
-68
api/api.ts
+20
-0
common/common.ts
+9
-0
pages.json
+8
-1
pages/index/index.vue
+4
-4
pages/myPoints/myPoints.vue
+54
-13
pages/myPoints/pointsDetail.vue
+241
-0
pages/orderDetail/orderDetail.vue
+4
-0
pages/saleCourseLists/saleCourseLists.vue
+134
-50
No files found.
api/api.ts
View file @
9842fcd0
...
@@ -108,5 +108,25 @@ export default {
...
@@ -108,5 +108,25 @@ 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
)
},
// 销售课程统计
userCourseCount
(
params
){
return
request
(
`
${
cffpURL
}
/course/userCourseCount`
,
"POST"
,
params
)
},
// 销售课程列表查询
userCourseList
(
params
){
return
request
(
`
${
cffpURL
}
/course/userCourseList`
,
"POST"
,
params
)
},
// 分享课程列表查询
userShareCourseList
(
params
){
return
request
(
`
${
cffpURL
}
/course/userShareCourseList`
,
"POST"
,
params
)
}
}
}
}
common/common.ts
View file @
9842fcd0
...
@@ -32,5 +32,13 @@ export default {
...
@@ -32,5 +32,13 @@ export default {
}
}
});
});
},
},
// 下拉选单通过code获取name
getNameByCode
(
code
:
String
,
arr
:
Array
<
any
>
){
if
(
arr
&&
arr
.
filter
(
item
=>
item
.
dropOptionCode
==
code
).
pop
()){
return
arr
.
filter
(
item
=>
item
.
dropOptionCode
==
code
).
pop
().
dropOptionName
}
else
{
return
;
}
}
}
}
\ No newline at end of file
pages.json
View file @
9842fcd0
...
@@ -153,7 +153,7 @@
...
@@ -153,7 +153,7 @@
"path"
:
"pages/myPoints/myPoints"
,
"path"
:
"pages/myPoints/myPoints"
,
"style"
:
"style"
:
{
{
"navigationBarTitleText"
:
""
,
"navigationBarTitleText"
:
"
我的积分
"
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
}
}
...
@@ -196,6 +196,13 @@
...
@@ -196,6 +196,13 @@
"navigationBarTitleText"
:
"销售课程"
,
"navigationBarTitleText"
:
"销售课程"
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
},{
"path"
:
"pages/myPoints/pointsDetail"
,
"style"
:
{
"navigationBarTitleText"
:
"积分明细"
,
"enablePullDownRefresh"
:
false
}
}
}
],
],
//
"tabBar"
:
{
//
"tabBar"
:
{
...
...
pages/index/index.vue
View file @
9842fcd0
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
data
()
{
data
()
{
return
{
return
{
featureLists
:[
featureLists
:[
{
key
:
'00'
,
name
:
'销售课程'
,
icon
:
'salesCourse'
,
link
:
'/pages/saleCourseLists/saleCourseLists'
,
isOpen
:
fals
e
},
{
key
:
'00'
,
name
:
'销售课程'
,
icon
:
'salesCourse'
,
link
:
'/pages/saleCourseLists/saleCourseLists'
,
isOpen
:
tru
e
},
{
key
:
'01'
,
name
:
'我的积分'
,
icon
:
'integral'
,
link
:
'../myPoints/myPoints'
,
isOpen
:
true
},
{
key
:
'01'
,
name
:
'我的积分'
,
icon
:
'integral'
,
link
:
'../myPoints/myPoints'
,
isOpen
:
true
},
{
key
:
'02'
,
name
:
'申请加盟'
,
icon
:
'applyJoin'
,
link
:
'../application-process/basic-info'
,
isOpen
:
true
},
{
key
:
'02'
,
name
:
'申请加盟'
,
icon
:
'applyJoin'
,
link
:
'../application-process/basic-info'
,
isOpen
:
true
},
{
key
:
'03'
,
name
:
'学习认证'
,
icon
:
'learningCertify'
,
link
:
'../learnCertify/learnCertify'
,
isOpen
:
true
},
{
key
:
'03'
,
name
:
'学习认证'
,
icon
:
'learningCertify'
,
link
:
'../learnCertify/learnCertify'
,
isOpen
:
true
},
...
@@ -122,12 +122,12 @@
...
@@ -122,12 +122,12 @@
},
},
queryAreaCenterInfo
(){
queryAreaCenterInfo
(){
api
.
queryAreaCenterInfo
({
userId
:
1
}).
then
((
res
)
=>
{
api
.
queryAreaCenterInfo
({
userId
:
1
}).
then
((
res
)
=>
{
if
(
res
[
'
commonResult'
][
'
success'
]){
if
(
res
[
'success'
]){
this
.
cffpUserInfo
=
res
;
this
.
cffpUserInfo
=
res
[
'data'
]
;
// this.cffpUserInfo.logo = res['logo'];
// this.cffpUserInfo.logo = res['logo'];
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
[
'
commonResult'
][
'
message'
],
title
:
res
[
'message'
],
duration
:
2000
,
duration
:
2000
,
icon
:
'none'
icon
:
'none'
})
})
...
...
pages/myPoints/myPoints.vue
View file @
9842fcd0
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<view
class=
"top"
>
<view
class=
"top"
>
<view
class=
"exchange_wrapper"
>
<view
class=
"exchange_wrapper"
>
<view>
可兑换积分
<text
style=
"color: #FF7704;"
>
{{
yesExchangeFortune
}}
积分
</text></view>
<view>
可兑换积分
<text
style=
"color: #FF7704;"
>
{{
yesExchangeFortune
}}
积分
</text></view>
<view
style=
"color:#C85E04;text-decoration: underline;"
>
可兑换提现
5555.55
</view>
<view
style=
"color:#C85E04;text-decoration: underline;"
>
可兑换提现
{{
yesExchangeFortune
}}
</view>
</view>
</view>
<view
class=
"bg"
>
<view
class=
"bg"
>
<image
src=
"/static/mypoint_pic.png"
mode=
"widthFix"
></image>
<image
src=
"/static/mypoint_pic.png"
mode=
"widthFix"
></image>
...
@@ -29,16 +29,16 @@
...
@@ -29,16 +29,16 @@
</view>
</view>
<view
class=
"statistics_wrapper"
>
<view
class=
"statistics_wrapper"
>
<view
class=
""
>
<view
class=
""
>
<text
style=
"color: #0A2F99;"
>
11111
</text>
<text
style=
"color: #0A2F99;"
>
{{
sumCommissionAmount
}}
</text>
<text>
累计积分
</text>
<text>
累计积分
</text>
</view>
</view>
<view
class=
""
>
<view
class=
""
>
<text
style=
"color: #F15A1F;"
>
333
</text>
<text
style=
"color: #F15A1F;"
>
{{
nowSumCommissionAmount
}}
</text>
<text>
今日
获得积分
</text>
<text>
{{
getName
(
timeFlag
)
}}
获得积分
</text>
</view>
</view>
<view
class=
""
>
<view
class=
""
>
<text
style=
"color: #0A2F99;"
>
-222
</text>
<text
style=
"color: #0A2F99;"
>
{{
prePercent
}}
%
</text>
<text>
{{
prePercent
}}
</text>
<text>
比
{{
getInfo
(
timeFlag
)
}}
得分
</text>
</view>
</view>
</view>
</view>
<view
class=
"point_content"
>
<view
class=
"point_content"
>
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
<li>
获得积分
</li>
<li>
获得积分
</li>
<li>
操作
</li>
<li>
操作
</li>
</ul>
</ul>
<ul
class=
"point_content_list"
v-for=
"pointItem in cffpFortuneDeductionList"
>
<ul
class=
"point_content_list"
v-for=
"pointItem in cffpFortuneDeductionList"
@
click=
"toPointDetail(pointItem)"
>
<li>
{{
pointItem
.
productTypeName
}}
</li>
<li>
{{
pointItem
.
productTypeName
}}
</li>
<li>
{{
pointItem
.
commissionTypeName
}}
</li>
<li>
{{
pointItem
.
commissionTypeName
}}
</li>
<li
class=
"get_point"
>
{{
pointItem
.
commissionAmount
}}
</li>
<li
class=
"get_point"
>
{{
pointItem
.
commissionAmount
}}
</li>
...
@@ -91,11 +91,18 @@
...
@@ -91,11 +91,18 @@
this
.
fortuneDate
=
e
.
detail
.
value
;
this
.
fortuneDate
=
e
.
detail
.
value
;
},
},
findByUserIdForFortuneStatistic
(){
findByUserIdForFortuneStatistic
(){
// const param = {
// isDtl:2,
// userId:uni.getStorageSync('cffp_userId'),
// fortuneDate:this.fortuneDate,
// timeFlag:this.timeFlag
// }
const
param
=
{
const
param
=
{
isDtl
:
2
,
"isDtl"
:
2
,
userId
:
uni
.
getStorageSync
(
'cffp_userId'
),
"userId"
:
1
,
fortuneDate
:
this
.
fortuneDate
,
"fortuneDate"
:
"2022-11-01"
,
timeFlag
:
this
.
timeFlag
"timeFlag"
:
"D"
}
}
api
.
findByUserIdForFortuneStatistic
(
param
).
then
((
res
)
=>
{
api
.
findByUserIdForFortuneStatistic
(
param
).
then
((
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
...
@@ -104,8 +111,35 @@
...
@@ -104,8 +111,35 @@
this
.
nowSumCommissionAmount
=
res
[
'data'
][
'nowSumCommissionAmount'
]
//当前(日月年)积分
this
.
nowSumCommissionAmount
=
res
[
'data'
][
'nowSumCommissionAmount'
]
//当前(日月年)积分
this
.
prePercent
=
res
[
'data'
][
'prePercent'
]
//比前日、上月,上年多或少的百分比数据
this
.
prePercent
=
res
[
'data'
][
'prePercent'
]
//比前日、上月,上年多或少的百分比数据
this
.
yesExchangeFortune
=
res
[
'data'
][
'yesExchangeFortune'
]
//可兑换金额
this
.
yesExchangeFortune
=
res
[
'data'
][
'yesExchangeFortune'
]
//可兑换金额
this
.
cffpFortuneDeductionList
=
res
[
'data'
][
'cffpFortuneDeductionList'
];
this
.
cffpFortuneDeductionList
=
res
[
'data'
][
'cffpFortuneDeductionList'
]
}
})
},
getInfo
(
str
){
if
(
str
==
'D'
){
return
'上次'
;
}
if
(
str
==
'M'
){
return
'上月'
;
}
if
(
str
==
'Y'
){
return
'去年'
;
}
},
getName
(
str
){
if
(
str
==
'D'
){
return
'当日'
;
}
if
(
str
==
'M'
){
return
'当月'
;
}
}
if
(
str
==
'Y'
){
return
'当年'
;
}
},
toPointDetail
(
item
){
uni
.
navigateTo
({
url
:
`../myPoints/pointsDetail?timeFlag=
${
this
.
timeFlag
}
&fortuneDate=
${
this
.
fortuneDate
}
&commissionType=
${
item
.
commissionType
}
&productType=
${
item
.
productType
}
`
,
})
})
}
}
}
}
...
@@ -195,8 +229,15 @@
...
@@ -195,8 +229,15 @@
align-items
:
center
;
align-items
:
center
;
height
:
70
rpx
;
height
:
70
rpx
;
li{
li{
width
:
2
5
%
;
width
:
2
0
%
;
text-align
:
center
;
text-align
:
center
;
overflow
:
hidden
;
}
li
:nth-child
(
2
)
{
width
:
40%
;
}
li
:nth-child
(
2
)
{
width
:
30%
;
}
}
.get_point
{
.get_point
{
color
:
#FF0000
;
color
:
#FF0000
;
...
...
pages/myPoints/pointsDetail.vue
0 → 100644
View file @
9842fcd0
<
template
>
<view
class=
"container"
>
<<<<<<<
Updated
upstream
<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>
=======
>>>>>>> Stashed changes
</view>
</
template
>
<
script
>
<<<<<<<
Updated
upstream
import
api
from
'../../api/api'
;
import
common
from
'../../common/common'
;
export
default
{
data
(){
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
=======
export
default
{
data
(){
return
{
>>>>>>>
Stashed
changes
}
},
components
:{},
onLoad
(){
<<<<<<<
Updated
upstream
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
:{
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
(){
// const param = {
// isDtl: 1,
// userId: uni.getStorageSync('cffp_userId'),
// fortuneDate: this.fortuneDate,
// timeFlag: this.timeFlag,
// commissionType:this.commissionType,
// productType: this.productType
// }
const
param
=
{
isDtl
:
1
,
userId
:
1
,
fortuneDate
:
"2022-12"
,
timeFlag
:
"M"
,
commissionType
:
"A01"
,
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
>
<
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
;
}
}
}
}
=======
}
,
methods
:
{
getDetail(){
const
param
=
{
"isDtl":
1,
"userId":
1,
"fortuneDate":
"2022-12",
"timeFlag":
"M",
"commissionType":"A01",
"productType":
1
}
}
}
}
</
script
>
<
style
>
>>>>>>>
Stashed
changes
</
style
>
\ No newline at end of file
pages/orderDetail/orderDetail.vue
View file @
9842fcd0
...
@@ -64,6 +64,10 @@
...
@@ -64,6 +64,10 @@
},
},
mounted
()
{
mounted
()
{
this
.
userCourseInfo
()
this
.
userCourseInfo
()
},
onLoad
(
option
)
{
this
.
orderId
=
option
.
id
console
.
log
(
option
)
}
}
}
}
...
...
pages/saleCourseLists/saleCourseLists.vue
View file @
9842fcd0
...
@@ -10,48 +10,58 @@
...
@@ -10,48 +10,58 @@
<!-- 销售统计 -->
<!-- 销售统计 -->
<view
class=
"saleStatisticalContent"
>
<view
class=
"saleStatisticalContent"
>
<view
class=
"statisticItem"
>
<view
class=
"statisticItem"
>
<text>
{{
coursesCountInfos
.
shareFrequencyMonth
}}
</text>
<text>
{{
coursesCountInfos
.
integralCount
}}
</text>
<text>
累计积分
</text>
<text>
累计积分
</text>
</view>
</view>
<view
class=
"statisticItem"
@
click=
"viewIntegral()"
>
<view
class=
"statisticItem"
@
click=
"viewIntegral()"
>
<text
class=
"colorText"
>
{{
coursesCountInfos
.
integral
Month
}}
</text>
<text
class=
"colorText"
>
{{
coursesCountInfos
.
integral
Day
}}
</text>
<text>
今日获得积分
</text>
<text>
今日获得积分
</text>
</view>
</view>
<view
class=
"statisticItem"
>
<view
class=
"statisticItem"
>
<text>
{{
coursesCountInfos
.
shareSection
Month
}}
</text>
<text>
{{
coursesCountInfos
.
integral
Month
}}
</text>
<text>
本月得分
</text>
<text>
本月得分
</text>
</view>
</view>
<view
class=
"statisticItem"
>
<view
class=
"statisticItem"
>
<text>
{{
coursesCountInfos
.
shareFrequency
Count
}}
</text>
<text>
{{
coursesCountInfos
.
order
Count
}}
</text>
<text>
累计订单
</text>
<text>
累计订单
</text>
</view>
</view>
<view
class=
"statisticItem"
@
click=
"viewIntegral()"
>
<view
class=
"statisticItem"
@
click=
"viewIntegral()"
>
<text
class=
"colorText"
>
{{
coursesCountInfos
.
integralCount
}}
</text>
<text
class=
"colorText"
>
{{
coursesCountInfos
.
orderDay
}}
</text>
<text>
今日成交单数
</text>
<text>
今日成交单数
</text>
</view>
</view>
<view
class=
"statisticItem"
>
<view
class=
"statisticItem"
>
<text>
{{
coursesCountInfos
.
shareSectionCount
}}
</text>
<text>
{{
coursesCountInfos
.
orderMonth
}}
</text>
<text>
本月单数
</text>
<text>
本月单数
</text>
</view>
</view>
</view>
</view>
<!-- 分享明细 -->
<!-- 分享明细 -->
<view
class=
"saleDetailContent"
>
<view
class=
"saleDetailContent"
>
<view
class=
"courseTab"
>
<view
class=
"courseTab"
>
<text>
我的课程
</text>
<text
:class=
"
{'actived':tabType===1}" @click="switchTab(1)"
>我的课程
</text>
<text>
分享课程
</text>
<text
:class=
"
{'actived':tabType===2}" @click="switchTab(2)"
>分享课程
</text>
</view>
</view>
<view
class=
"totalCountBox"
>
合计(单):
<text>
12
</text></view>
<view
class=
"totalCountBox"
>
合计(单):
<text>
{{
userCourseCountNum
}}
</text></view>
<h4
class=
"noListTip"
v-if=
"!userShareCourses"
>
暂无销售记录!
</h4>
<h4
class=
"noListTip"
v-if=
"!userCourses && tabType===1"
>
暂无销售记录!
</h4>
<template
v-if=
"userShareCourses"
>
<h4
class=
"noListTip"
v-if=
"!userShareCourseOrders && tabType===2"
>
暂无分享记录!
</h4>
<view
class=
"saleOrderInfoItem"
v-for=
"item in userShareCourses"
:key=
"item.fileId"
>
<template
v-if=
"userCourses && tabType===1"
>
<view
class=
"saleOrderInfoItem"
v-for=
"item in userCourses"
:key=
"item.fileId"
>
<view
class=
"courseInfoContent"
>
<view
class=
"courseInfoContent"
>
<course-item
:thumbnailPath=
"item.displayImage"
:title=
"item.fileTitle"
:summaryBox=
"item.fileSynopsis"
:dataList=
"
{coursePrice:item.coursePrice,salesNumber:item.salesNumber}" :tagList="{v1:item.fileLecturerRanks,v2:item.fileLecturerName}">
</course-item>
<course-item
:thumbnailPath=
"item.displayImage"
:title=
"item.fileTitle"
:summaryBox=
"item.fileSynopsis"
:dataList=
"
{coursePrice:item.coursePrice,salesNumber:item.salesNumber}" :tagList="{v1:item.fileLecturerRanks,v2:item.fileLecturerName}">
</course-item>
</view>
</view>
<view
class=
"countsContent"
@
click=
"goDetail(item.fileId)"
>
<view
class=
"countsContent"
@
click=
"goDetail(item.fileId)"
>
<view>
<text>
实际支付:¥199.00
</text>
<text>
实际支付:¥199.00
</text>
</view>
</view>
</view>
</view>
</
template
>
<
template
v-if=
"userCourses && tabType===2"
>
<view
class=
"orderItemDetailBox"
v-for=
"item in userShareCourseOrders"
>
<view><text>
订单编号
</text><text>
{{
item
.
orderNo
}}
</text></view>
<view><text>
课程名称
</text><text>
{{
item
.
fileTitle
}}
</text></view>
<view><text>
购买人
</text><text>
{{
item
.
userName
}}
</text></view>
<view
class=
"orderDetailLine"
>
<text></text>
<text
@
click=
"viewDetail(item.orderId)"
>
订单详情>
</text>
</view>
</view>
</view>
</
template
>
</
template
>
</view>
</view>
...
@@ -69,39 +79,58 @@
...
@@ -69,39 +79,58 @@
return
{
return
{
queryDate
:
`
${
new
Date
().
getFullYear
()}
-
${
new
Date
().
getMonth
()
+
1
}
`
,
queryDate
:
`
${
new
Date
().
getFullYear
()}
-
${
new
Date
().
getMonth
()
+
1
}
`
,
maxDate
:
`
${
new
Date
().
getFullYear
()}
-
${
new
Date
().
getMonth
()
+
1
}
`
,
maxDate
:
`
${
new
Date
().
getFullYear
()}
-
${
new
Date
().
getMonth
()
+
1
}
`
,
userId
:
null
,
userId
:
'1'
,
coursesCountInfos
:{},
coursesCountInfos
:{},
userShareCourse
:[]
userCourses
:[],
userShareCourseOrders
:[],
userCourseCountNum
:
0
,
userShareCourseCount
:
0
,
tabType
:
1
}
}
},
},
methods
:
{
methods
:
{
bindDateChange
:
function
(
e
)
{
bindDateChange
:
function
(
e
)
{
this
.
queryDate
=
e
.
detail
.
value
this
.
queryDate
=
e
.
detail
.
value
;
this
.
userCourseList
();
this
.
userCourseCount
();
},
switchTab
(
type
){
this
.
tabType
=
type
this
.
userCourseList
()
},
},
user
ShareQuery
(){
user
CourseCount
(){
const
params
=
{
const
params
=
{
userId
:
this
.
userId
,
userId
:
this
.
userId
,
queryDate
:
this
.
queryDate
queryDate
:
this
.
queryDate
}
}
this
.
coursesCountInfos
=
{
api
.
userCourseCount
(
params
).
then
(
res
=>
{
shareFrequencyMonth
:
'XXX'
,
if
(
res
[
'success'
]){
integralMonth
:
'XXX'
,
this
.
coursesCountInfos
=
res
[
'data'
]
shareSectionMonth
:
'XXX'
,
}
shareFrequencyCount
:
'XXX'
,
})
integralCount
:
'XXX'
,
},
shareSectionCount
:
'XXX'
userCourseList
(){
}
const
params
=
{
this
.
userShareCourses
=
[
userId
:
this
.
userId
,
{
fileId
:
1
,
fileTitle
:
'11111'
,
fileLecturerName
:
'sssss'
,
fileLecturerRanks
:
'nnnnnn'
,
coursePrice
:
'12312'
,
salesNumber
:
123
,
shareDate
:
'2022-11-11 17:33'
,
shareCount
:
123
,
readCount
:
111
,
buyCount
:
111
}
queryDate
:
this
.
queryDate
]
}
console
.
log
(
this
.
userShareCourses
)
if
(
this
.
tabType
===
1
){
// api.userShareQuery(params).then(res=>{
api
.
userCourseList
(
params
).
then
(
res
=>
{
// console.log(res)
console
.
log
(
res
)
// if(res['success']){
if
(
res
[
'success'
]){
// this.coursesCountInfos = res['data']['coursesCountInfos'];
this
.
userCourses
=
res
[
'data'
][
'userCourses'
];
// this.userShareCourses = res['data']['userShareCourses'];
this
.
userCourseCountNum
=
res
[
'data'
][
'userCourseCount'
];
// }
}
// })
})
}
else
{
api
.
userShareCourseList
(
params
).
then
(
res
=>
{
if
(
res
[
'success'
]){
this
.
userShareCourseOrders
=
res
[
'data'
][
'userShareCourseOrders'
];
this
.
userCourseCountNum
=
res
[
'data'
][
'userShareCourseCount'
];
}
})
}
},
},
// 查看详情
// 查看详情
goDetail
(
val
){
goDetail
(
val
){
...
@@ -114,10 +143,17 @@
...
@@ -114,10 +143,17 @@
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/myPoints/myPoints`
url
:
`/pages/myPoints/myPoints`
})
})
},
// 查看订单详情
viewDetail
(
id
){
uni
.
navigateTo
({
url
:
`/pages/orderDetail/orderDetail?id=
${
id
}
`
})
}
}
},
},
onLoad
()
{
onLoad
()
{
this
.
userShareQuery
()
this
.
userCourseCount
()
this
.
userCourseList
()
},
},
mounted
()
{
mounted
()
{
...
@@ -174,26 +210,74 @@
...
@@ -174,26 +210,74 @@
}
}
.saleDetailContent
{
.saleDetailContent
{
margin
:
10
rpx
20
rpx
;
margin
:
10
rpx
20
rpx
;
padding
:
20
rpx
14
rpx
;
.saleOrderInfoItem{
h3{
padding
:
18
rpx
10
rpx
;
border-radius
:
20
rpx
;
background-color
:
#fff
;
.countsContent{
text-align
:
right
;
color
:
#333
;
color
:
#333
;
font-size
:
36
rpx
;
font-size
:
32
rpx
;
margin-top
:
20
rpx
;
}
}
.orderItemDetailBox
{
padding
:
10
rpx
20
rpx
10
rpx
40
rpx
;
background-color
:
#fff
;
border-radius
:
20
rpx
;
color
:
#4a4a4a
;
margin-bottom
:
20
rpx
;
font-size
:
24
rpx
;
view{
position
:
relative
;
position
:
relative
;
margin
:
10
rpx
0
10
rpx
58
rpx
;
margin-bottom
:
20
rpx
;
&::before{
display
:
flex
;
text{
&:first-child{
color
:
#333
;
width
:
0
;
flex
:
0
0
20%
;
}
}
&
:first-child::before
{
display
:
block
;
content
:
''
;
content
:
''
;
display
:
block
;
position
:
absolute
;
position
:
absolute
;
left
:
-5
px
;
left
:
-20
r
px
;
top
:
4
px
;
top
:
10
r
px
;
width
:
2
px
;
width
:
8
r
px
;
height
:
7
0%
;
height
:
6
0%
;
border-radius
:
4
rpx
;
border-radius
:
8
rpx
;
background-color
:
#FA882F
;
background-color
:
#FA882F
;
}
}
&
.orderDetailLine
{
justify-content
:
flex-end
;
font-size
:
28
rpx
;
}
}
}
.courseTab
{
margin-top
:
20
rpx
;
text{
padding
:
6
rpx
16
rpx
;
color
:
#20269B
;
border
:
1px
solid
#20269B
;
border-radius
:
10
rpx
;
margin-right
:
20
rpx
;
font-size
:
24
rpx
;
&.actived{
background-color
:
#20269B
;
color
:
#fff
;
}
}
}
.totalCountBox
{
margin
:
16
rpx
0
;
font-size
:
28
rpx
;
color
:
#666
;
text{
color
:
#20269B
;
}
}
.saleOrderInfoItem
{
margin
:
0
20
rpx
;
}
}
}
}
}
}
...
...
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