fix:脚本修改
This commit is contained in:
parent
5ba323fa49
commit
ddabcbe8ac
@ -3,13 +3,32 @@ import { patchFun, patchInit } from "../patch";
|
|||||||
class Path {
|
class Path {
|
||||||
|
|
||||||
async huodong2(a: any) {
|
async huodong2(a: any) {
|
||||||
|
const con ={
|
||||||
|
2002:[
|
||||||
|
{ payId: '', num: 1, prize: [{a: 'item', t: '50', n: 20}, {a: 'attr', t: 'rmbmoney', n: 200}], free: true },
|
||||||
|
{ payId: 'duihuan_1_1', prize: [{a: 'item', t: '50', n: 50}, {a: 'attr', t: 'rmbmoney', n: 600}], free: false },
|
||||||
|
{ payId: 'duihuan_1_2', prize: [{a: 'item', t: '50', n: 100}, {a: 'attr', t: 'rmbmoney', n: 1360}], free: false },
|
||||||
|
{ payId: 'duihuan_1_3', prize: [{a: 'item', t: '50', n: 200}, {a: 'attr', t: 'rmbmoney', n: 2560}], free: false },
|
||||||
|
{ payId: 'duihuan_1_4', prize: [{a: 'item', t: '50', n: 600}, {a: 'attr', t: 'rmbmoney', n: 6560}], free: false },
|
||||||
|
{ payId: 'duihuan_1_5', prize: [{a: 'item', t: '50', n: 1200}, {a: 'attr', t: 'rmbmoney', n: 12960}], free: false },
|
||||||
|
],
|
||||||
|
2003: [
|
||||||
|
{ payId: '', num: 1, prize: [{a: 'item', t: '50', n: 20}, {a: 'attr', t: 'rmbmoney', n: 200}], free: true },
|
||||||
|
{ payId: 'duihuan_1_1', prize: [{a: 'item', t: '50', n: 50}, {a: 'attr', t: 'rmbmoney', n: 600}], free: false },
|
||||||
|
{ payId: 'duihuan_1_2', prize: [{a: 'item', t: '50', n: 100}, {a: 'attr', t: 'rmbmoney', n: 1360}], free: false },
|
||||||
|
{ payId: 'duihuan_1_3', prize: [{a: 'item', t: '50', n: 200}, {a: 'attr', t: 'rmbmoney', n: 2560}], free: false },
|
||||||
|
{ payId: 'duihuan_1_4', prize: [{a: 'item', t: '50', n: 600}, {a: 'attr', t: 'rmbmoney', n: 6560}], free: false },
|
||||||
|
{ payId: 'duihuan_1_5', prize: [{a: 'item', t: '50', n: 1200}, {a: 'attr', t: 'rmbmoney', n: 12960}], free: false },
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
const hdids = [2002,2003]
|
const hdids = [2002,2003]
|
||||||
const hdinfos = await G.mongodb.find('hdinfo', { hdid: { $in: hdids } })
|
const hdinfos = await G.mongodb.find('hdinfo', { hdid: { $in: hdids } })
|
||||||
for (let i = 0; i < hdinfos.length; i++) {
|
for (let i = 0; i < hdinfos.length; i++) {
|
||||||
let hdinfo = hdinfos[i]
|
let hdinfo = hdinfos[i]
|
||||||
hdinfo.data.gift = {}
|
hdinfo.data.event.gift = con[hdinfo.hdid]
|
||||||
|
|
||||||
await G.mongodb.collection('hdinfo').updateOne({ "hdid": hdinfo.hdid}, { "$set": {"data.figt": {}} });
|
await G.mongodb.collection('hdinfo').updateOne({ "hdid": hdinfo.hdid}, { "$set": {"data.event.gift": hdinfo.data.event.gift}});
|
||||||
console.log(hdinfo.hdid,"finish")
|
console.log(hdinfo.hdid,"finish")
|
||||||
}
|
}
|
||||||
return "sucess!!!"
|
return "sucess!!!"
|
||||||
|
Loading…
Reference in New Issue
Block a user