import {Template} from '../../template.js' export class Main extends Template { constructor() { super() this.profile = { title: '京东新奇集市', crontab: 3, headers: { referer: 'https://pro.m.jd.com/mall/active/4Va8jNzzHPqgTUhxwiTn9PHyVZCB/index.html' }, help: 'main', verify: true, sync: 3, tempKey: 8640000000, turn: 2, temp: 't6', prompt: { shuffle: `true # 随机选择两个商品进行投票,默认按照算法排序投票`, temp: ' #如果没有获取到数据,可能是前面几个号黑号无法获取,请自行设置为可运行账号pin' } } } async middle() { if (this._shareCode.length) { this.tempContext = this.compact(this._shareCode[0], ['roundId', 'startTime', 'endTime', 'title']) } if (this.turnCount == 1) { if (this.tempContext) { this.tempContext.task = this.profile.help this.shareCode(this.tempContext) } else { this.jump = true } } } async prepare() { for (let user of this.help) { let itemId = await this.getTemp(user) if (itemId) { this.inviter.push({ user, itemId }) } } for (let user of this.random(this.temp, 3)) { let html = await this.curl({ 'url': `https://pro.m.jd.com/mall/active/4Va8jNzzHPqgTUhxwiTn9PHyVZCB/index.html?utm_medium=tuiguang&tttparams=zZ1qguleyJnTGF0IjozOS45NjEwNTQsInVuX2FyZWEiOiIxXzI4MDBfNTU4MzhfMCIsImRMYXQiOiIiLCJwcnN0YXRlIjoiMCIsImFkZHJlc3NJZCI6IjUzODg3NDg3NyIsImxhdCI6IiIsInBvc0xhdCI6MzkuOTYxMDU0LCJwb3NMbmciOjExNi4zMjIwNjEsImdwc19hcmVhIjoiMF8wXzBfMCIsImxuZyI6IiIsInVlbXBzIjoiMC0wLTAiLCJnTG5nIjoxMTYuMzIyMDYxLCJtb2RlbCI6ImlQaG9uZTEzLDMiLCJkTG5nIjoiIn70=&utm_source=kong&cu=true`, user } ) let data = [] for (let content of this.matchAll(/