change download count display

This commit is contained in:
CPunisher 2021-03-01 16:35:15 +08:00
parent 5f01a7f510
commit 267c002e01
1 changed files with 6 additions and 1 deletions

View File

@ -3,6 +3,11 @@ 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 (value / 10000).toFixed(1) + "万";
}
const WxMessage = () => { const WxMessage = () => {
if (isWeiXin()) { if (isWeiXin()) {
return ( return (
@ -37,7 +42,7 @@ const PartDownload = ({ value, downloadCount, onSvgDownload, onImgDownload }) =>
<div className="Qr-s-title">Downloads</div> <div className="Qr-s-title">Downloads</div>
<p className="Qr-s-subtitle"> <p className="Qr-s-subtitle">
下载二维码 {value} 下载二维码 {value}
<sup className="Gray"> {downloadCount}</sup> <sup className="Gray"> {parseValue(downloadCount)}</sup>
</p> </p>
</div> </div>
<div className="Qr-Centered"> <div className="Qr-Centered">