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
0f062ac4
Commit
0f062ac4
authored
Nov 30, 2022
by
kyle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
退课以及学习统计修改
parent
f8e22c23
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
114 additions
and
28 deletions
+114
-28
api/api.ts
+4
-0
pages.json
+1
-1
pages/applyDropClass/applyDropClass.vue
+73
-12
pages/learningStatistics/learningStatistics.vue
+5
-3
pages/orderConfirm/orderConfirm.vue
+26
-12
pages/orderStatus/orderStatus.vue
+5
-0
No files found.
api/api.ts
View file @
0f062ac4
...
...
@@ -284,5 +284,9 @@ export default {
//微信去提现
wxWithdrawal
(
params
){
return
request
(
`
${
apiURL
}
/pay/wxWithdrawal`
,
"POST"
,
params
)
},
// 微信退款
wxRefund
(
params
){
return
request
(
`
${
apiURL
}
/pay/wxRefund`
,
"POST"
,
params
)
}
}
pages.json
View file @
0f062ac4
...
...
@@ -361,7 +361,7 @@
"navigationBarTitleText"
:
"学习统计"
,
"enablePullDownRefresh"
:
false
}
}
}
,
{
"path"
:
"pages/personalCenter/system/accontsetting"
,
"style"
:
...
...
pages/applyDropClass/applyDropClass.vue
View file @
0f062ac4
...
...
@@ -33,17 +33,18 @@
</view>
<!-- 退款原因 -->
<view
class=
"dropInfoBox"
>
<view
class=
""
>
<view
class=
"
dropBox
"
>
<h4>
退款原因
</h4>
<view
class=
"
uni-list-cell-db
"
>
<picker
@
change=
"bindPickerChange"
:value=
"
orderRemark"
:range=
"dropReasons
"
>
<view
class=
"uni-input"
>
{{
dropReasons
[
orderRemark
]
}}
</view>
<view
class=
"
pickerBox
"
>
<picker
@
change=
"bindPickerChange"
:value=
"
dropIndex"
:range=
"dropReasons"
:range-key=
"'dropOptionName'
"
>
<view
class=
"uni-input"
style=
"height: 80rpx;"
>
{{
dropReasons
[
dropIndex
][
'dropOptionName'
]
}}
</view>
</picker>
<i
class=
"iconfont icon-youjiantou"
></i>
</view>
</view>
</view>
<!-- 提交申请 -->
<view
class=
"submitApply"
>
<view
class=
"submitApply"
@
click=
"submit()"
>
<text>
提交申请
</text>
</view>
<!-- 弹窗 -->
...
...
@@ -83,11 +84,14 @@
orderId
:
null
,
userId
:
'1'
,
dropInfo
:{},
orderRemark
:
''
,
dropIndex
:
0
,
dropReasons
:[
''
]
};
},
methods
:{
bindPickerChange
(
e
){
this
.
dropIndex
=
e
.
detail
.
value
;
},
showModal
(){
this
.
$refs
.
popup
.
open
()
},
...
...
@@ -112,21 +116,63 @@
})
},
// 提交申请
submit
(
paymentMethod
){
if
(
paymentMethod
===
'1'
){
submit
(){
const
param
=
{
orderNo
:
this
.
dropInfo
.
orderNo
,
paymentMethod
:
this
.
dropInfo
.
paymentMethod
,
userId
:
this
.
userId
,
totalFee
:
this
.
dropInfo
.
orderPrice
,
refundFee
:
this
.
dropInfo
.
refundFee
,
integralExchange
:
this
.
dropInfo
.
integralExchange
,
refundIntegralExchange
:
this
.
dropInfo
.
refundIntegralExchange
,
refundReason
:
this
.
dropReasons
[
this
.
dropIndex
][
'dropOptionName'
]
}
if
(
this
.
dropInfo
.
paymentMethod
===
'1'
){
// 微信
}
else
if
(
paymentMethod
===
'2'
){
api
.
wxRefund
(
param
).
then
(
res
=>
{
if
(
res
[
'success'
]){
uni
.
navigateTo
({
url
:
`/pages/afterSaleDetail/afterSaleDetail?orderNo=
${
this
.
dropInfo
.
orderNO
}
&afterSalesFlag=3`
})
}
else
{
uni
.
showToast
({
title
:
res
[
'message'
],
duration
:
2000
});
}
})
}
else
if
(
this
.
dropInfo
.
paymentMethod
===
'2'
){
// 支付宝
api
.
wxRefund
(
param
).
then
(
res
=>
{
if
(
res
[
'success'
]){
uni
.
navigateTo
({
url
:
`/pages/afterSaleDetail/afterSaleDetail?orderNo=
${
this
.
dropInfo
.
orderNO
}
&afterSalesFlag=3`
})
}
else
{
uni
.
showToast
({
title
:
res
[
'message'
],
duration
:
2000
});
}
})
}
},
// 退款原因
dropOptionsQuery
(){
api
.
dropOptionsQuery
({
code
:
'REFUND_REASON'
}).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
[
'success'
]){
this
.
dropReasons
=
res
[
'data'
][
'dropMasterInfoList'
][
0
][
'dropOptionsInfoList'
]
}
})
}
},
onLoad
(
option
)
{
this
.
orderId
=
option
.
id
;
this
.
fileId
=
option
.
fileId
;
this
.
courseDetail
();
this
.
userRefundCourseDtl
()
this
.
userRefundCourseDtl
();
this
.
dropOptionsQuery
()
}
}
</
script
>
...
...
@@ -188,5 +234,20 @@
font-size
:
32
rpx
;
}
}
.dropBox
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
baseline
;
height
:
80
rpx
;
.pickerBox{
display
:
flex
;
align-items
:
baseline
;
.iconfont{
transform
:
rotate
(
90deg
);
margin-left
:
20
rpx
;
color
:
#666
;
}
}
}
}
</
style
>
pages/learningStatistics/learningStatistics.vue
View file @
0f062ac4
...
...
@@ -55,7 +55,7 @@
</view>
<view
class=
"progressBottomBox"
>
<text>
{{
item
.
fileTitle
}}
</text>
<i
class=
"iconfont icon-youjiantou"
@
click=
"item['state']=!item['state'];userCoursePackBar(item['state'],
item.packFileId,item.orderId)"
:style=
"
{transform: item['state'] ? 'rotate(90deg)' : 'rotate(-90deg)' }">
</i>
<i
class=
"iconfont icon-youjiantou"
v-if=
"item.packFileId"
@
click=
"userCoursePackBar(
item.packFileId,item.orderId)"
:style=
"
{transform: item['state'] ? 'rotate(90deg)' : 'rotate(-90deg)' }">
</i>
</view>
</view>
<!-- 小课 -->
...
...
@@ -170,10 +170,12 @@
}
})
},
userCoursePackBar
(
state
,
packFileId
,
orderId
){
if
(
!
packFileId
||
!
state
){
userCoursePackBar
(
packFileId
,
orderId
){
if
(
!
packFileId
||
!
orderId
){
return
false
;
}
this
.
userStudyCountList
.
barInfos
.
forEach
(
item
=>
item
.
state
=
false
);
this
.
userStudyCountList
.
barInfos
.
filter
(
item
=>
item
.
orderId
==
orderId
)[
0
].
state
=
true
;
api
.
userCoursePackBar
({
userId
:
this
.
userId
,
packFileId
:
packFileId
,
orderId
:
orderId
}).
then
(
res
=>
{
if
(
res
[
'success'
]){
this
.
userCoursePackBarList
=
res
[
'data'
][
'barInfos'
];
...
...
pages/orderConfirm/orderConfirm.vue
View file @
0f062ac4
...
...
@@ -131,7 +131,8 @@
isDeduction
:
false
,
userId
:
'1'
,
intergralInfo
:{},
orderId
:
'1'
orderId
:
'1'
,
paymentBtnDisabled
:
false
}
},
computed
:{
...
...
@@ -153,12 +154,16 @@
methods
:
{
// 支付
pay
(){
if
(
this
.
paymentBtnDisabled
){
return
false
;
}
this
.
paymentBtnDisabled
=
true
;
const
param
=
{
orderId
:
this
.
orderId
,
amount
:
this
.
totalPrice
,
paymentMethod
:
this
.
paymentMethod
,
userId
:
this
.
userId
,
integralExchange
:
parseFloat
(
this
.
deductionCore
)
integralExchange
:
this
.
isDeduction
?
parseFloat
(
this
.
deductionCore
)
:
0
}
if
(
this
.
paymentMethod
==
1
){
api
.
wxAppPay
(
param
).
then
(
res
=>
{
...
...
@@ -168,16 +173,25 @@
api
.
aliAppPay
(
param
).
then
(
res
=>
{
if
(
res
[
'success'
]){
const
aliOrderString
=
res
[
'data'
][
'aliOrderString'
];
uni
.
requestPayment
({
provider
:
'alipay'
,
orderInfo
:
aliOrderString
,
success
:
function
(
resp
)
{
alert
(
'success:'
+
JSON
.
stringify
(
resp
));
},
fail
:
function
(
err
)
{
alert
(
'fail:'
+
JSON
.
stringify
(
err
));
}
});
if
(
aliOrderString
){
uni
.
requestPayment
({
provider
:
'alipay'
,
orderInfo
:
aliOrderString
,
success
:
function
(
resp
)
{
alert
(
'success:'
+
JSON
.
stringify
(
resp
));
},
fail
:
function
(
err
)
{
alert
(
'fail:'
+
JSON
.
stringify
(
err
));
}
});
}
else
{
uni
.
navigateTo
({
url
:
`/pages/orderStatus/orderStatus?orderId=1&fileId=1&orderStatus=2`
})
}
}
else
{
this
.
paymentBtnDisabled
=
false
;
}
})
...
...
pages/orderStatus/orderStatus.vue
View file @
0f062ac4
...
...
@@ -61,6 +61,11 @@
url
:
'/pages/index/index'
})
}
},
onLoad
(
options
)
{
this
.
orderId
=
options
.
orderId
;
this
.
orderStatus
=
options
.
orderStatus
;
this
.
fileId
=
options
.
fileId
;
}
}
</
script
>
...
...
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