|
|
@@ -419,6 +419,19 @@ function handleSeriesInfo(){
|
|
|
gRetBody = rspData;
|
|
|
}
|
|
|
|
|
|
+function formatNumberWithKAndW(n) {
|
|
|
+ if (n < 1000) {
|
|
|
+ return n.toString();
|
|
|
+ }
|
|
|
+ if (n >= 1000 && n < 10000) {
|
|
|
+ return (n / 1000).toFixed(1) + 'k';
|
|
|
+ }
|
|
|
+ if (n >= 10000 && n < 100000) {
|
|
|
+ return (n / 10000).toFixed(1) + 'w';
|
|
|
+ }
|
|
|
+ return (n / 100000).toFixed(1) + 'w';
|
|
|
+}
|
|
|
+
|
|
|
function handlerMySeriesList(){
|
|
|
let rspData = getResponsePlainData();
|
|
|
if (!rspData) {
|
|
|
@@ -441,7 +454,7 @@ function handlerMySeriesList(){
|
|
|
item.total = cntDict[seriesName];
|
|
|
}
|
|
|
item.seriesName = `${seriesName}#¥${parseFloat(item.avgPrice).toFixed(2)}`;
|
|
|
- item.authorName = `${item.authorName}\\n(${item.soldNum}/${item.issueNum})`
|
|
|
+ item.authorName = `${item.authorName}(${formatNumberWithKAndW(item.soldNum)}/${formatNumberWithKAndW(item.issueNum)})`;
|
|
|
}
|
|
|
gRetBody = rspData;
|
|
|
}
|