Commit 021979b3 by 姜雷

修正数组下标并添加索引配置

parent 7440d3db
...@@ -104,8 +104,8 @@ Page({ ...@@ -104,8 +104,8 @@ Page({
consumePrice += element.payableMoney; consumePrice += element.payableMoney;
consumeCount += element.payMen; consumeCount += element.payMen;
let daysIndex = Number(element.createDate.slice(-2)); let daysIndex = Number(element.createDate.slice(-2));
dayList[daysIndex] = { dayList[daysIndex - 1] = {
...dayList[daysIndex], ...dayList[daysIndex - 1],
payMen: element.payMen, payMen: element.payMen,
payableMoney: element.payableMoney, payableMoney: element.payableMoney,
}; };
...@@ -149,8 +149,8 @@ Page({ ...@@ -149,8 +149,8 @@ Page({
rechargePrice += element.rechargeMoney; rechargePrice += element.rechargeMoney;
rechargeCount += element.rechargeMen; rechargeCount += element.rechargeMen;
let daysIndex = Number(element.completeAt.slice(-2)); let daysIndex = Number(element.completeAt.slice(-2));
dayList[daysIndex] = { dayList[daysIndex - 1] = {
...dayList[daysIndex], ...dayList[daysIndex - 1],
rechargeMoney: element.rechargeMoney, rechargeMoney: element.rechargeMoney,
rechargeMen: element.rechargeMen, rechargeMen: element.rechargeMen,
refundCount: element.refundCount, refundCount: element.refundCount,
......
...@@ -80,8 +80,8 @@ Page({ ...@@ -80,8 +80,8 @@ Page({
for (let index = 0; index < oList.length; index++) { for (let index = 0; index < oList.length; index++) {
const element = oList[index]; const element = oList[index];
let daysIndex = Number(element.days.slice(-2)); let daysIndex = Number(element.days.slice(-2));
dayList[daysIndex] = { dayList[daysIndex - 1] = {
...dayList[daysIndex], ...dayList[daysIndex - 1],
count: element.count, count: element.count,
}; };
} }
......
{
"rules": [
{
"action": "disallow",
"page": "*"
}
]
}
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