|
@@ -386,8 +386,11 @@ export default {
|
|
|
async confirmGiftData() {
|
|
|
// 参数格式:{phones:{18439509554: 1,18439509555: 2}}
|
|
|
const data = this.personList.reduce((acc, cur) => {
|
|
|
- if (cur.phone && cur.monthnum) {
|
|
|
- acc[cur.phone] = cur.monthnum
|
|
|
+ if (acc[cur.phone]) {
|
|
|
+ acc[cur.phone] += Number(cur.monthnum)
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ acc[cur.phone] = Number(cur.monthnum)
|
|
|
}
|
|
|
return acc
|
|
|
}, {})
|