|
@@ -763,7 +763,19 @@ export default {
|
|
|
toolsPackage.forEach(item => {
|
|
|
if (item.isStatus) {
|
|
|
this.buyCloudTeacher = true; // 临时处理,原因一条数据事要使用,如果多条数据会有问题
|
|
|
- marketPrice += parseFloat(item.originalAmount);
|
|
|
+ const num = (this.tempNum[item.period] || 1) * item.num;
|
|
|
+ let price = 0;
|
|
|
+ if (num % 6 === 0) {
|
|
|
+ const halfYearNum = Number(num / 6);
|
|
|
+ this.formatList.forEach((format) => {
|
|
|
+ price += Number(format.halfYearPrice * halfYearNum);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.formatList.forEach((format) => {
|
|
|
+ price += Number(format.monthPrice * num);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ marketPrice += parseFloat(price);
|
|
|
amount += parseFloat(item.actualAmount);
|
|
|
} else {
|
|
|
this.buyCloudTeacher = false;
|