From fa1138c2cedf53a58cbc2f94c7989c3422ded18b Mon Sep 17 00:00:00 2001 From: CPunisher <1343316114@qq.com> Date: Sat, 13 Mar 2021 16:04:23 +0800 Subject: [PATCH] Fix download count error --- src/components/app/PartDownload.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/components/app/PartDownload.js b/src/components/app/PartDownload.js index 22a04ee..4268628 100644 --- a/src/components/app/PartDownload.js +++ b/src/components/app/PartDownload.js @@ -3,17 +3,10 @@ import './App.css'; import PropTypes from 'prop-types'; import {isWeiXin} from "../../utils/navigatorUtils"; -function parseValue(value) { - if (value < 10000) return value; - return -} - const CountComponent = ({ value }) => { - if (value >= 10000) value = (value / 10000).toFixed(1); - if (!isNaN(value)) { - return {value + "万"} - } - return null; + if (isNaN(value)) return null; + if (value >= 10000) value = (value / 10000).toFixed(1) + "万"; + return {value} } const WxMessage = () => {