Jelajahi Sumber

fix: 推荐商品和活动价格显示到分

E2E Test Bot 3 bulan lalu
induk
melakukan
e8884a00c8

+ 1 - 1
cfc-frontend/components/DimensionActivities.vue

@@ -181,7 +181,7 @@ export default {
     },
     formatPriceWithSymbol: function(price) {
       if (price == null) return '免费'
-      return '¥' + (Number(price) / 100).toFixed(0)
+      return '¥' + (Number(price) / 100).toFixed(2)
     }
   }
 }

+ 4 - 4
cfc-frontend/components/DimensionProducts.vue

@@ -51,10 +51,10 @@ export default {
     }
   },
   methods: {
-    formatPriceWithSymbol: function(price) {
-      if (price == null) return '免费'
-      return '¥' + (Number(price) / 100).toFixed(0)
-    },
+formatPriceWithSymbol: function(price) {
+if (price == null) return '免费'
+return '¥' + (Number(price) / 100).toFixed(2)
+},
     parseWeights: function(str) {
       if (!str) return []
       try {

+ 1 - 1
cfc-frontend/components/RecommendedFeed.vue

@@ -115,7 +115,7 @@ export default {
     formatPrice: function(item) {
       var price = item.price
       if (price == null || price === 0) return '免费'
-      return '¥' + (Number(price) / 100).toFixed(0)
+      return '¥' + (Number(price) / 100).toFixed(2)
     },
     getStatusText: function(status) {
       var map = { upcoming: '即将开始', ongoing: '进行中', ended: '已结束', cancelled: '已取消' }