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
d02663af
Commit
d02663af
authored
Nov 21, 2022
by
kyle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
退课
parent
bc02e096
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
206 additions
and
22 deletions
+206
-22
App.vue
+0
-0
api/api.ts
+6
-2
components/courseItem/courseItem.vue
+1
-1
pages/applyDropClass/applyDropClass.vue
+177
-4
pages/orderDetail/orderDetail.vue
+22
-15
No files found.
App.vue
View file @
d02663af
This diff is collapsed.
Click to expand it.
api/api.ts
View file @
d02663af
...
@@ -187,7 +187,11 @@ export default {
...
@@ -187,7 +187,11 @@ export default {
},
},
// 退课明细
// 退课明细
userRefundCourseDtl
(
params
){
userRefundCourseDtl
(
params
){
return
request
(
`
${
cffpURL
}
/course /userRefundCourseDtl`
,
"POST"
,
params
)
return
request
(
`
${
cffpURL
}
/course/userRefundCourseDtl`
,
"POST"
,
params
)
}
},
// 支付宝支付->app退款接口
aliAppPayRefund
(
params
){
return
request
(
`
${
apiURL
}
/aliPay/aliAppPayRefund`
,
"POST"
,
params
)
},
}
}
components/courseItem/courseItem.vue
View file @
d02663af
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
type
:
Boolean
type
:
Boolean
},
},
orderId
:{
orderId
:{
type
:
String
type
:
Number
}
}
},
},
...
...
pages/applyDropClass/applyDropClass.vue
View file @
d02663af
<
template
>
<
template
>
<view>
<view
class=
"container"
>
<view
class=
"classInfo"
>
<course-item
:thumbnailPath=
"courseInfoItem.displayImage"
:title=
"courseInfoItem.fileTitle"
:summaryBox=
"courseInfoItem.fileSynopsis"
:dataList=
"
{coursePrice:courseInfoItem.coursePrice,salesNumber:courseInfoItem.salesNumber}" :tagList="{v1:courseInfoItem.fileLecturerRanks,v2:courseInfoItem.fileLecturerName}">
</course-item>
</view>
<!-- 订单支付明细 -->
<view
class=
"payInfoBox"
>
<h4>
订单支付明细
</h4>
<view>
<text>
积分抵扣:
</text>
<text
class=
"price"
>
¥
{{
dropInfo
.
integralExchange
}}
</text>
</view>
<view>
<text>
实际支付:
</text>
<text>
¥
{{
dropInfo
.
paymentAmount
}}
</text>
</view>
</view>
<!-- 退款明细 -->
<view
class=
"dropDetailInfoBox"
>
<h4>
退款明细
</h4>
<view>
<text>
支付违约金:
<i
class=
"iconfont icon-31tishi"
@
click=
"showModal()"
></i></text>
<text
class=
"price"
>
¥
{{
dropInfo
.
breachCommission
}}
</text>
</view>
<view>
<text>
退款到账金额:
</text>
<text>
¥
{{
dropInfo
.
refundFee
}}
</text>
</view>
<view>
<text>
退还积分:
</text>
<text>
{{
dropInfo
.
salesCommission
}}
</text>
</view>
</view>
<!-- 退款原因 -->
<view
class=
"dropInfoBox"
>
<view
class=
""
>
<h4>
退款原因
</h4>
<view
class=
"uni-list-cell-db"
>
<picker
@
change=
"bindPickerChange"
:value=
"orderRemark"
:range=
"dropReasons"
>
<view
class=
"uni-input"
>
{{
dropReasons
[
orderRemark
]
}}
</view>
</picker>
</view>
</view>
</view>
<!-- 提交申请 -->
<view
class=
"submitApply"
>
<text>
提交申请
</text>
</view>
<!-- 弹窗 -->
<uni-popup
ref=
"popup"
type=
"bottom"
background-color=
"#fff"
>
<view
class=
"popup-content"
>
<view
class=
"title"
>
<text></text>
<h3>
违约金规则
</h3>
<i
class=
"iconfont icon-guanbi"
@
click=
"closePopup()"
></i>
</view>
<view
class=
""
>
1.购买后14天内未点开学习全额退费;
</view>
<view
class=
""
>
<view
class=
""
>
2.购买后15-30天未点开学习则:
</view>
<view
class=
""
>
假如:一个初级课程8000,报名费45 ,违约金比例:15%,那么违约金的费用一共是:8045*15% =1206.75;
</view>
</view>
<view
class=
""
>
3.已点开课程学习或购买30天后不予退费。
</view>
</view>
</uni-popup>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
api
from
"@/api/api"
;
import
courseItem
from
"@/components/courseItem/courseItem.vue"
;
export
default
{
export
default
{
components
:{
courseItem
},
data
()
{
data
()
{
return
{
return
{
courseInfoItem
:{},
fileId
:
null
,
orderId
:
null
,
userId
:
'1'
,
dropInfo
:{},
orderRemark
:
''
,
dropReasons
:[
''
]
};
};
},
methods
:{
showModal
(){
this
.
$refs
.
popup
.
open
()
},
closePopup
(){
this
.
$refs
.
popup
.
close
()
},
// 课程详情页面
courseDetail
(){
api
.
courseDetail
({
fileId
:
this
.
fileId
,
userId
:
this
.
userId
}).
then
(
res
=>
{
console
.
log
(
'课程详情'
,
res
);
if
(
res
[
'success'
]){
this
.
courseInfoItem
=
res
[
'data'
][
'data'
];
}
})
},
// 退款明细
userRefundCourseDtl
(){
api
.
userRefundCourseDtl
({
userId
:
this
.
userId
,
orderId
:
this
.
orderId
}).
then
(
res
=>
{
if
(
res
[
'success'
]){
this
.
dropInfo
=
res
[
'data'
]
}
})
},
// 提交申请
submit
(
paymentMethod
){
if
(
paymentMethod
===
'1'
){
// 微信
}
else
if
(
paymentMethod
===
'2'
){
// 支付宝
}
}
},
onLoad
(
option
)
{
this
.
orderId
=
option
.
id
;
this
.
fileId
=
option
.
fileId
;
this
.
courseDetail
();
this
.
userRefundCourseDtl
()
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.container
{
padding
:
10
rpx
20
rpx
;
height
:
100%
;
position
:
relative
;
.classInfo{
background-color
:
#fff
;
padding
:
20
rpx
14
rpx
14
rpx
20
rpx
;
}
.payInfoBox
,
.dropDetailInfoBox
,
.dropInfoBox
{
padding
:
30
rpx
14
rpx
14
rpx
20
rpx
;
margin-bottom
:
10
rpx
;
background-color
:
#fff
;
view{
margin-top
:
22
rpx
;
display
:
flex
;
justify-content
:
space-between
;
}
text
{
&.price{
color
:
#FA6900
;
}
}
}
.submitApply
{
position
:
fixed
;
bottom
:
20
rpx
;
left
:
0
;
width
:
100%
;
text{
display
:
flex
;
color
:
#fff
;
background
:
#20269B
;
border-radius
:
80
rpx
;
height
:
80
rpx
;
width
:
60%
;
justify-content
:
center
;
align-items
:
center
;
margin
:
0
auto
;
}
}
.popup-content
{
view{
font-size
:
30
rpx
;
color
:
#666
;
margin-bottom
:
10
rpx
;
}
.title
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
color
:
#333
;
font-size
:
32
rpx
;
}
}
}
</
style
>
</
style
>
pages/orderDetail/orderDetail.vue
View file @
d02663af
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
</view>
</view>
<!-- 退课 -->
<!-- 退课 -->
<view
class=
"dropClassBox"
v-if=
"type=='drop'"
>
<view
class=
"dropClassBox"
v-if=
"type=='drop'"
>
<view
class=
"dropBtn"
>
退课
</view>
<view
class=
"dropBtn"
@
click=
"dropClasses()"
>
退课
</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -28,21 +28,22 @@
...
@@ -28,21 +28,22 @@
data
()
{
data
()
{
return
{
return
{
userId
:
'1'
,
userId
:
'1'
,
orderId
:
'1'
,
orderId
:
''
,
fileId
:
''
,
orderInfoList
:[
orderInfoList
:[
{
id
:
1
,
name
:
'订单编号'
,
value
:
'
111111
'
,
type
:
'string'
,
alias
:
'orderNo'
,
pageArea
:
1
},
{
id
:
1
,
name
:
'订单编号'
,
value
:
'
/
'
,
type
:
'string'
,
alias
:
'orderNo'
,
pageArea
:
1
},
{
id
:
2
,
name
:
'购买时间'
,
value
:
'
111111
'
,
type
:
'string'
,
alias
:
'orderConfirmDate'
,
pageArea
:
1
},
{
id
:
2
,
name
:
'购买时间'
,
value
:
'
/
'
,
type
:
'string'
,
alias
:
'orderConfirmDate'
,
pageArea
:
1
},
{
id
:
3
,
name
:
'课程类型'
,
value
:
'
111111'
,
type
:
'string'
,
alias
:
'courseClassifyName
'
,
pageArea
:
1
},
{
id
:
3
,
name
:
'课程类型'
,
value
:
'
/'
,
type
:
'string'
,
alias
:
'courseClassify
'
,
pageArea
:
1
},
{
id
:
4
,
name
:
'课程名称'
,
value
:
'
111111
'
,
type
:
'string'
,
alias
:
'fileTitle'
,
pageArea
:
1
},
{
id
:
4
,
name
:
'课程名称'
,
value
:
'
/
'
,
type
:
'string'
,
alias
:
'fileTitle'
,
pageArea
:
1
},
{
id
:
5
,
name
:
'购买人'
,
value
:
'
111111
'
,
type
:
'string'
,
alias
:
'userName'
,
pageArea
:
1
},
{
id
:
5
,
name
:
'购买人'
,
value
:
'
/
'
,
type
:
'string'
,
alias
:
'userName'
,
pageArea
:
1
},
{
id
:
6
,
name
:
'课程讲师'
,
value
:
'
111111
'
,
type
:
'string'
,
alias
:
'lecturerName'
,
pageArea
:
1
},
{
id
:
6
,
name
:
'课程讲师'
,
value
:
'
/
'
,
type
:
'string'
,
alias
:
'lecturerName'
,
pageArea
:
1
},
{
id
:
7
,
name
:
'课程现价'
,
value
:
'
111111
'
,
type
:
'currency'
,
alias
:
'orderPrice'
,
pageArea
:
1
},
{
id
:
7
,
name
:
'课程现价'
,
value
:
'
/
'
,
type
:
'currency'
,
alias
:
'orderPrice'
,
pageArea
:
1
},
{
id
:
8
,
name
:
'积分抵扣'
,
value
:
'
111111
'
,
color
:
'#FA6900'
,
type
:
'currency'
,
alias
:
'integralExchange'
,
pageArea
:
1
},
{
id
:
8
,
name
:
'积分抵扣'
,
value
:
'
/
'
,
color
:
'#FA6900'
,
type
:
'currency'
,
alias
:
'integralExchange'
,
pageArea
:
1
},
{
id
:
9
,
name
:
'实际支付'
,
value
:
'
111111
'
,
type
:
'currency'
,
alias
:
'paymentAmount'
,
pageArea
:
1
},
{
id
:
9
,
name
:
'实际支付'
,
value
:
'
/
'
,
type
:
'currency'
,
alias
:
'paymentAmount'
,
pageArea
:
1
},
{
id
:
10
,
name
:
'获得积分'
,
value
:
'
111111
'
,
type
:
'string'
,
color
:
'#F15A1F'
,
alias
:
'salesCommission'
,
pageArea
:
2
},
{
id
:
10
,
name
:
'获得积分'
,
value
:
'
/
'
,
type
:
'string'
,
color
:
'#F15A1F'
,
alias
:
'salesCommission'
,
pageArea
:
2
},
{
id
:
11
,
name
:
'积分来源'
,
value
:
'
111111
'
,
type
:
'string'
,
alias
:
'commissionSource'
,
pageArea
:
2
},
{
id
:
11
,
name
:
'积分来源'
,
value
:
'
/
'
,
type
:
'string'
,
alias
:
'commissionSource'
,
pageArea
:
2
},
{
id
:
12
,
name
:
'课程状态'
,
value
:
'
111111
'
,
type
:
'string'
,
alias
:
'courseStatusName'
,
pageArea
:
2
},
{
id
:
12
,
name
:
'课程状态'
,
value
:
'
/
'
,
type
:
'string'
,
alias
:
'courseStatusName'
,
pageArea
:
2
},
{
id
:
13
,
name
:
'观看截至'
,
value
:
'
111111
'
,
type
:
'string'
,
alias
:
'effectiveEndDate'
,
pageArea
:
2
}
{
id
:
13
,
name
:
'观看截至'
,
value
:
'
/
'
,
type
:
'string'
,
alias
:
'effectiveEndDate'
,
pageArea
:
2
}
],
],
type
:
''
type
:
''
};
};
...
@@ -56,6 +57,7 @@
...
@@ -56,6 +57,7 @@
api
.
userCourseInfo
(
param
).
then
(
res
=>
{
api
.
userCourseInfo
(
param
).
then
(
res
=>
{
if
(
res
[
'success'
]){
if
(
res
[
'success'
]){
const
data
=
res
[
'data'
][
'orderDetail'
];
const
data
=
res
[
'data'
][
'orderDetail'
];
this
.
fileId
=
data
.
fileId
;
Object
.
keys
(
data
).
map
((
key
,
item
)
=>
{
Object
.
keys
(
data
).
map
((
key
,
item
)
=>
{
this
.
orderInfoList
.
forEach
(
val
=>
{
this
.
orderInfoList
.
forEach
(
val
=>
{
if
(
val
.
alias
==
key
){
if
(
val
.
alias
==
key
){
...
@@ -66,6 +68,11 @@
...
@@ -66,6 +68,11 @@
}
}
})
})
},
dropClasses
(){
uni
.
navigateTo
({
url
:
`/pages/applyDropClass/applyDropClass?id=
${
this
.
orderId
}
&fileId=
${
this
.
fileId
}
`
})
}
}
},
},
mounted
()
{
mounted
()
{
...
...
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