|
|
@@ -35,7 +35,8 @@ const tableData = ref([
|
|
|
{ name: '新增封禁', today: 0, yesterday: 0, month: 0 },
|
|
|
{ name: '总封禁数', today: 0, yesterday: 0, month: 0 },
|
|
|
{ name: '新增封号', today: 0, yesterday: 0, month: 0 },
|
|
|
- { name: '总封号', today: 0, yesterday: 0, month: 0 }
|
|
|
+ { name: '总封号', today: 0, yesterday: 0, month: 0 },
|
|
|
+ { name: '风控率', today: 0, yesterday: 0, month: 0 },
|
|
|
]);
|
|
|
|
|
|
const xAxisList = [
|
|
|
@@ -81,7 +82,8 @@ const getIndexUserStatisticData = async () => {
|
|
|
{ name: '新增封禁', today: res.todayLock, yesterday: res.yesterdayLock, month: res.monthLock },
|
|
|
// { name: '总封禁数', today: 0, yesterday: 0, month: 0 },
|
|
|
{ name: '新增封号', today: res.todayRisk, yesterday: res.yesterdayRisk, month: res.monthRisk },
|
|
|
- // { name: '总封号', today: 0, yesterday: 0, month: 0 }
|
|
|
+ // { name: '总封号', today: 0, yesterday: 0, month: 0 },
|
|
|
+ { name: '风控率', today: getPercent(res.todayLock,res.today), yesterday: getPercent(res.yesterdayLock,res.yesterday), month: getPercent(res.monthLock,res.month) },
|
|
|
]
|
|
|
|
|
|
const { todayUser, todayLockHour, todayRiskHour } = res
|
|
|
@@ -104,6 +106,13 @@ const getIndexUserStatisticData = async () => {
|
|
|
},
|
|
|
]
|
|
|
}
|
|
|
+
|
|
|
+function getPercent(a, b) {
|
|
|
+ if (a===0 || b === 0) return '0%';
|
|
|
+ let percent = (a / b * 100).toFixed(2);
|
|
|
+ return percent + '%';
|
|
|
+}
|
|
|
+
|
|
|
onBeforeMount(async () => {
|
|
|
await getIndexUserStatisticData()
|
|
|
})
|