|
@@ -3,7 +3,7 @@
|
|
|
<header>课程缴费</header>
|
|
|
|
|
|
<div class="section">
|
|
|
- <h2 class="title line_bottom">课程</h2>
|
|
|
+ <h2 class="title">课程</h2>
|
|
|
<div class="options">
|
|
|
<div v-for="s in classInfo" :key="s.courseId">
|
|
|
<div class="item" v-if="s.classType == 2">
|
|
@@ -113,7 +113,13 @@ export default {
|
|
|
if(!res.data.data) {
|
|
|
throw '数据为空'
|
|
|
}
|
|
|
- let subjectStatus = false // 过滤数据 乐团课只需要显示一条数据
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 过滤数据
|
|
|
+ * 乐团课同一个乐团只需要显示一个乐团(价格高的)
|
|
|
+ * 如果有多个乐团课则显示多个
|
|
|
+ */
|
|
|
+ let subjectStatus = {}
|
|
|
|
|
|
let paymentConfig = sessionStorage.getItem('paymentConfig')
|
|
|
if(paymentConfig) {
|
|
@@ -128,10 +134,19 @@ export default {
|
|
|
el.startCycel = this.weekSelect(5) + ' ' + el.planBegin.split(' ')[1]
|
|
|
|
|
|
// 课程
|
|
|
- if(!subjectStatus && el.classType == 2) {
|
|
|
+ let searchClassId = subjectStatus[el.classId], // 查询Id是否存在
|
|
|
+ countAmount = el.buyCount * el.price // 总价
|
|
|
+ if(!searchClassId && el.classType == 2) {
|
|
|
this.classInfo.push(el)
|
|
|
- subjectStatus = true
|
|
|
+ subjectStatus[el.classId] = {
|
|
|
+ price: countAmount
|
|
|
+ }
|
|
|
+ } else if(searchClassId && el.classType == 2 && searchClassId.price < countAmount) {
|
|
|
+ subjectStatus[el.classId] = {
|
|
|
+ price: countAmount
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
// 小课
|
|
|
if(el.classType == 1) {
|
|
|
this.classInfo.push(el)
|
|
@@ -413,11 +428,11 @@ header {
|
|
|
}
|
|
|
.item {
|
|
|
position: relative;
|
|
|
- border-bottom: 1px solid #ededed;
|
|
|
+ border-top: 1px solid #ededed;
|
|
|
padding: .2rem 0;
|
|
|
- &:last-child {
|
|
|
- border-bottom: 0;
|
|
|
- }
|
|
|
+ // &:last-child {
|
|
|
+ // border-bottom: 0;
|
|
|
+ // }
|
|
|
.timer {
|
|
|
font-size: .14rem;
|
|
|
color: #ACACAC;
|