|
@@ -78,6 +78,7 @@
|
|
|
当前时间:{{
|
|
|
nowItem.date ? nowItem.date.split(" ")[1] || "" : ""
|
|
|
}}
|
|
|
+ <div style="float: right">人数: {{formateNum()}}</div>
|
|
|
</div>
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
@@ -438,6 +439,14 @@ export default {
|
|
|
videoload() {
|
|
|
this.videoerrorStart = false;
|
|
|
},
|
|
|
+ formateNum(n) {
|
|
|
+ let num = n;
|
|
|
+ if (isNaN(n)) num = "0";
|
|
|
+ else if (n >= 100000000) num = ((n / 100000000).toFixed(2) - 0 + "").replace(/\B(?=(?:\d{3})+\b)/g, ",") + "亿";
|
|
|
+ else if (n >= 10000) num = ((n / 10000).toFixed(2) - 0 + "").replace(/\B(?=(?:\d{3})+\b)/g, ",") + "万";
|
|
|
+ else num = (num + "").replace(/\B(?=(?:\d{3})+\b)/g, ",");
|
|
|
+ return num;
|
|
|
+ },
|
|
|
},
|
|
|
components: {},
|
|
|
};
|