Commit d02663af by kyle

退课

parent bc02e096
......@@ -187,7 +187,11 @@ export default {
},
// 退课明细
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)
},
}
......@@ -45,7 +45,7 @@
type:Boolean
},
orderId:{
type:String
type:Number
}
},
......
<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>
</template>
<script>
import api from "@/api/api";
import courseItem from "@/components/courseItem/courseItem.vue";
export default {
components:{
courseItem
},
data() {
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>
<style lang="scss">
.container{
padding: 10rpx 20rpx;
height: 100%;
position: relative;
.classInfo{
background-color: #fff;
padding: 20rpx 14rpx 14rpx 20rpx;
}
.payInfoBox,.dropDetailInfoBox,.dropInfoBox{
padding: 30rpx 14rpx 14rpx 20rpx;
margin-bottom: 10rpx;
background-color: #fff;
view{
margin-top: 22rpx;
display: flex;
justify-content: space-between;
}
text{
&.price{
color: #FA6900;
}
}
}
.submitApply{
position: fixed;
bottom: 20rpx;
left: 0;
width: 100%;
text{
display: flex;
color: #fff;
background: #20269B;
border-radius: 80rpx;
height: 80rpx;
width: 60%;
justify-content: center;
align-items: center;
margin: 0 auto;
}
}
.popup-content{
view{
font-size: 30rpx;
color: #666;
margin-bottom: 10rpx;
}
.title{
display: flex;
justify-content: space-between;
align-items: center;
color: #333;
font-size: 32rpx;
}
}
}
</style>
......@@ -15,7 +15,7 @@
</view>
<!-- 退课 -->
<view class="dropClassBox" v-if="type=='drop'">
<view class="dropBtn">退课</view>
<view class="dropBtn" @click="dropClasses()">退课</view>
</view>
</view>
</view>
......@@ -28,21 +28,22 @@
data() {
return {
userId:'1',
orderId:'1',
orderId:'',
fileId:'',
orderInfoList:[
{id:1,name:'订单编号',value:'111111',type:'string',alias:'orderNo',pageArea:1},
{id:2,name:'购买时间',value:'111111',type:'string',alias:'orderConfirmDate',pageArea:1},
{id:3,name:'课程类型',value:'111111',type:'string',alias:'courseClassifyName',pageArea:1},
{id:4,name:'课程名称',value:'111111',type:'string',alias:'fileTitle',pageArea:1},
{id:5,name:'购买人',value:'111111',type:'string',alias:'userName',pageArea:1},
{id:6,name:'课程讲师',value:'111111',type:'string',alias:'lecturerName',pageArea:1},
{id:7,name:'课程现价',value:'111111',type:'currency',alias:'orderPrice',pageArea:1},
{id:8,name:'积分抵扣',value:'111111',color:'#FA6900',type:'currency',alias:'integralExchange',pageArea:1},
{id:9,name:'实际支付',value:'111111',type:'currency',alias:'paymentAmount',pageArea:1},
{id:10,name:'获得积分',value:'111111',type:'string',color:'#F15A1F',alias:'salesCommission',pageArea:2},
{id:11,name:'积分来源',value:'111111',type:'string',alias:'commissionSource',pageArea:2},
{id:12,name:'课程状态',value:'111111',type:'string',alias:'courseStatusName',pageArea:2},
{id:13,name:'观看截至',value:'111111',type:'string',alias:'effectiveEndDate',pageArea:2}
{id:1,name:'订单编号',value:'/',type:'string',alias:'orderNo',pageArea:1},
{id:2,name:'购买时间',value:'/',type:'string',alias:'orderConfirmDate',pageArea:1},
{id:3,name:'课程类型',value:'/',type:'string',alias:'courseClassify',pageArea:1},
{id:4,name:'课程名称',value:'/',type:'string',alias:'fileTitle',pageArea:1},
{id:5,name:'购买人',value:'/',type:'string',alias:'userName',pageArea:1},
{id:6,name:'课程讲师',value:'/',type:'string',alias:'lecturerName',pageArea:1},
{id:7,name:'课程现价',value:'/',type:'currency',alias:'orderPrice',pageArea:1},
{id:8,name:'积分抵扣',value:'/',color:'#FA6900',type:'currency',alias:'integralExchange',pageArea:1},
{id:9,name:'实际支付',value:'/',type:'currency',alias:'paymentAmount',pageArea:1},
{id:10,name:'获得积分',value:'/',type:'string',color:'#F15A1F',alias:'salesCommission',pageArea:2},
{id:11,name:'积分来源',value:'/',type:'string',alias:'commissionSource',pageArea:2},
{id:12,name:'课程状态',value:'/',type:'string',alias:'courseStatusName',pageArea:2},
{id:13,name:'观看截至',value:'/',type:'string',alias:'effectiveEndDate',pageArea:2}
],
type:''
};
......@@ -56,6 +57,7 @@
api.userCourseInfo(param).then(res=>{
if(res['success']){
const data = res['data']['orderDetail'];
this.fileId = data.fileId;
Object.keys(data).map((key,item)=>{
this.orderInfoList.forEach(val=>{
if(val.alias == key){
......@@ -66,6 +68,11 @@
}
})
},
dropClasses(){
uni.navigateTo({
url:`/pages/applyDropClass/applyDropClass?id=${this.orderId}&fileId=${this.fileId}`
})
}
},
mounted() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment