diff --git a/src/components/app/PartDownload.js b/src/components/app/PartDownload.js index 6aa4da1..22a04ee 100644 --- a/src/components/app/PartDownload.js +++ b/src/components/app/PartDownload.js @@ -5,7 +5,15 @@ import {isWeiXin} from "../../utils/navigatorUtils"; function parseValue(value) { if (value < 10000) return value; - return (value / 10000).toFixed(1) + "万"; + return +} + +const CountComponent = ({ value }) => { + if (value >= 10000) value = (value / 10000).toFixed(1); + if (!isNaN(value)) { + return {value + "万"} + } + return null; } const WxMessage = () => { @@ -17,7 +25,7 @@ const WxMessage = () => { ) } - return null + return null; } const ImgBox = ({ imgData }) => { @@ -41,8 +49,8 @@ const PartDownload = ({ value, downloadCount, onSvgDownload, onImgDownload }) =>
- 下载二维码 — {value}
- {parseValue(downloadCount)}
+ 下载二维码 — {value}
+