|
@@ -214,9 +214,11 @@
|
|
选择套餐
|
|
选择套餐
|
|
</view>
|
|
</view>
|
|
<view class="options">
|
|
<view class="options">
|
|
- <view class="item" v-for="(item,index) in coursePackageList" :key="index"
|
|
|
|
- :class="activePackage==index ? '' : 'item-state2'" @click="chosePackage(item,index)"
|
|
|
|
- v-if="item.isMobileShow">
|
|
|
|
|
|
+ <view class="item"
|
|
|
|
+ v-for="(item,index) in coursePackageList" :key="index"
|
|
|
|
+ :class="activePackage==index ? '' : 'item-state2'"
|
|
|
|
+ @click="chosePackage(item,index)" v-if="item.isMobileShow"
|
|
|
|
+ :style="{ color: item.saleIf ? '' : 'rgba(128, 128, 128, 0.5)' }">
|
|
{{item.packageName}}班 {{item.courseAmount}}课时
|
|
{{item.packageName}}班 {{item.courseAmount}}课时
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -363,13 +365,15 @@
|
|
this.classDetail = item;
|
|
this.classDetail = item;
|
|
},
|
|
},
|
|
chosePackage(item,index) {
|
|
chosePackage(item,index) {
|
|
- this.activePackage = index;
|
|
|
|
- this.packageDetail = item;
|
|
|
|
- if(this.packageDetail.unitPrice == null) {
|
|
|
|
- this.packageDetail.unitPrice = 0;
|
|
|
|
- }
|
|
|
|
- if(this.packageDetail.waterElectricityAmount == null) {
|
|
|
|
- this.packageDetail.waterElectricityAmount = 0;
|
|
|
|
|
|
+ if(item.saleIf) {
|
|
|
|
+ this.activePackage = index;
|
|
|
|
+ this.packageDetail = item;
|
|
|
|
+ if(this.packageDetail.unitPrice == null) {
|
|
|
|
+ this.packageDetail.unitPrice = 0;
|
|
|
|
+ }
|
|
|
|
+ if(this.packageDetail.waterElectricityAmount == null) {
|
|
|
|
+ this.packageDetail.waterElectricityAmount = 0;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
choseStudent(item,index) {
|
|
choseStudent(item,index) {
|
|
@@ -410,13 +414,21 @@
|
|
this.courseBase = res.data.courseBase;
|
|
this.courseBase = res.data.courseBase;
|
|
this.coursePackageList = res.data.coursePackageList;
|
|
this.coursePackageList = res.data.coursePackageList;
|
|
if(this.coursePackageList.length != 0) {
|
|
if(this.coursePackageList.length != 0) {
|
|
- this.packageDetail = this.coursePackageList[0];
|
|
|
|
|
|
+ // this.packageDetail = this.coursePackageList[0];
|
|
if(this.packageDetail.unitPrice == null) {
|
|
if(this.packageDetail.unitPrice == null) {
|
|
this.packageDetail.unitPrice = 0;
|
|
this.packageDetail.unitPrice = 0;
|
|
}
|
|
}
|
|
if(this.packageDetail.waterElectricityAmount == null) {
|
|
if(this.packageDetail.waterElectricityAmount == null) {
|
|
this.packageDetail.waterElectricityAmount = 0;
|
|
this.packageDetail.waterElectricityAmount = 0;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ for (var i = 0; i < this.coursePackageList.length; i++) {
|
|
|
|
+ if(this.coursePackageList[i].isMobileShow && this.coursePackageList[i].saleIf) {
|
|
|
|
+ this.packageDetail = this.coursePackageList[i];
|
|
|
|
+ this.activePackage = i;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
this.tclassList = res.data.tclassList;
|
|
this.tclassList = res.data.tclassList;
|
|
|
|
|