谢杰标 2 лет назад
Родитель
Сommit
fd5db271ab
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      pages3/course/detail.vue

+ 2 - 1
pages3/course/detail.vue

@@ -437,12 +437,13 @@ export default {
     ]),
     allPrice() {
       if (!this.specList.length) return 0;
-      return this.specList.slice(-1)[0].specAttrList.reduce((a, b) => {
+      let allPrice = this.specList.slice(-1)[0].specAttrList.reduce((a, b) => {
         if (b.check) {
           return a + b.standPrice;
         }
         return a;
       }, 0);
+      return this.toFixed(allPrice) 
     },
     goodsIds() {
       if (!this.specList.length) return [];