mirror of
https://github.com/qitoqito/psyduck.git
synced 2026-01-15 15:10:44 +08:00
Update jd_task_rmCoupon.js
This commit is contained in:
parent
e7846c77b8
commit
12405bd321
@ -1,4 +1,5 @@
|
|||||||
import {Template} from '../../template.js'
|
import {Template} from '../../template.js'
|
||||||
|
// import jsonic from 'jsonic'
|
||||||
|
|
||||||
export class Main extends Template {
|
export class Main extends Template {
|
||||||
constructor() {
|
constructor() {
|
||||||
@ -39,15 +40,17 @@ export class Main extends Template {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
// if (typeof list == 'string') {
|
||||||
|
// list = jsonic.parse(list)
|
||||||
|
// }
|
||||||
let rm = []
|
let rm = []
|
||||||
let reg = new RegExp(context.blackList)
|
let reg = new RegExp(context.blackList)
|
||||||
let status = 0
|
let status = 0
|
||||||
// console.log(list)
|
// console.log(list)
|
||||||
if (this.haskey(list, 'coupon.useable')) {
|
if (this.haskey(list, 'coupon.useable')) {
|
||||||
status++
|
status++
|
||||||
|
|
||||||
for (let i of list.coupon.useable) {
|
for (let i of list.coupon.useable) {
|
||||||
if (this.match(reg, i.limitStr)) {
|
if (this.match(reg, i.limitStr) || this.match(reg, i.couponTitle)) {
|
||||||
rm.push(i.couponid)
|
rm.push(i.couponid)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user