Fix download count error

This commit is contained in:
CPunisher 2021-03-13 16:04:23 +08:00
parent 07291e3363
commit fa1138c2ce
1 changed files with 3 additions and 10 deletions

View File

@ -3,17 +3,10 @@ import './App.css';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import {isWeiXin} from "../../utils/navigatorUtils"; import {isWeiXin} from "../../utils/navigatorUtils";
function parseValue(value) {
if (value < 10000) return value;
return
}
const CountComponent = ({ value }) => { const CountComponent = ({ value }) => {
if (value >= 10000) value = (value / 10000).toFixed(1); if (isNaN(value)) return null;
if (!isNaN(value)) { if (value >= 10000) value = (value / 10000).toFixed(1) + "万";
return <sup className="Gray">{value + "万"}</sup> return <sup className="Gray">{value}</sup>
}
return null;
} }
const WxMessage = () => { const WxMessage = () => {