Commit 9d8c9b1c authored by qinhaitao's avatar qinhaitao

fix: 🐛 区间问题

parent 287f2c44
......@@ -92,7 +92,7 @@ export default class ActivityConfigService {
}
async deletePrizeByIds(ids: string[]) {
let result: any
let result: any = true
for (let i = 0; i < ids.length; i++) {
result = await this.updateDeleteStatusById(ids[i])
}
......@@ -411,6 +411,13 @@ export default class ActivityConfigService {
let originPeriod = 1
return prizes.map(v => {
if (!v.probability) return v
// 概率为0 跳出10000之外的区间
if (+v.probability === 0)
return {
...v,
properiodfrom: 1000000,
properiodto: 1000000
}
const properiodfrom = originPeriod
const properiodto = +originPeriod + signFigures(+v.probability * 100) - 1
originPeriod = +originPeriod + signFigures(+v.probability * 100)
......
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