Commit 830b2e66 by trace

fix: 贷超数据累计添加

parent fba09362
......@@ -216,6 +216,7 @@ function generateDailyOnlineReport() {
}
async function getDaichao() {
let allRegionDaichaoApps = []
for (index in daichaoRegion) {
let region = daichaoRegion[index]
daichaoApiUrl = region + daichao
......@@ -242,19 +243,20 @@ async function getDaichao() {
if (isTest()) {
thisDaichaoApps = thisDaichaoApps.slice(0, 1)
}
allRegionDaichaoApps = [...allRegionDaichaoApps, ...thisDaichaoApps]
log(`${region} 代超数据: ${thisDaichaoApps.length} 个`)
daichaoApps = [...daichaoApps, ...thisDaichaoApps]
monitorNames["daichao"] = daichaoApps
if (daichaoApps.length == 0) {
log(`目前总共贷超数据为空`)
}
log(`目前总共贷超数据: ${daichaoApps.length}`)
})
.catch(err => {
errorLog.push(`贷超获取失败:${err.toString()}`)
return
})
}
daichaoApps = Array.from(new Set(allRegionDaichaoApps))
monitorNames["daichao"] = daichaoApps
if (daichaoApps.length == 0) {
log(`目前总共贷超数据为空`)
}
log(`目前总共贷超数据: ${daichaoApps.length}`)
}
// async function getDaichao(url) {
......@@ -676,14 +678,19 @@ function genMail() {
}
function isOurs(name, countOurs) {
let prefix = ''
if (daichaoApps.includes(name)) {
return `<a href="${daichaoAppInfoes[name].mgt}${daichaoAppInfoes[name] &&
prefix = `<a href="${daichaoAppInfoes[name].mgt}${daichaoAppInfoes[name] &&
daichaoAppInfoes[name].daichaoId || ''}">🏦(贷超 [${daichaoAppInfoes[name].daichaoId}] _ < ${daichaoAppInfoes[name].name} >(->MGT)) | </a>`
}
if (ourAppIds.includes(name)) {
return `📌(${ourApps[name] || 'No Name in Gitlab'})`
if (prefix != '') {
prefix = `📌(${ourApps[name]}|${prefix}`
} else {
prefix = `📌(${ourApps[name] || 'No Name in Gitlab'})`
}
}
return ''
return prefix
}
function getPermissionChangeContent(id, obj, title) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment