谢杰标 3 年之前
父节点
当前提交
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 [];