37 lines
1.3 KiB
TypeScript
37 lines
1.3 KiB
TypeScript
import cloud from '@lafjs/cloud'
|
|
const db = cloud.database();
|
|
import Utils from "@/Utils";
|
|
export default async function (ctx: FunctionContext) {
|
|
// let ret = await db.collection('order').where({ "openid": "orm8I7Jz5YYoFEUoJZkQZKpugzJg" }).get();
|
|
// //console.log(ret.data);
|
|
// for(let i=0;i<ret.data.length;i++){
|
|
// console.log(new Date(ret.data[i].time+8*3600000));
|
|
// console.log(ret.data[i]);
|
|
// }
|
|
// return { data: ret }
|
|
// let ret = await db.collection('iosOrder').where({type:"ios"}).get();
|
|
// console.log(ret.data.length);
|
|
// let id=0;
|
|
// for(let i=0;i<ret.data.length;i++){
|
|
// if(propName[ret.data[i].itemid]){
|
|
// await db.collection("iosOrder").where({ _id: ret.data[i]._id }).update({ itemid: propName[ret.data[i].itemid] });
|
|
// id++;
|
|
// console.log(id)
|
|
// }
|
|
// }
|
|
}
|
|
const propName = {
|
|
"金币包1": "gold_1",
|
|
"金币包2": "gold_2",
|
|
"金币包3": "gold_3",
|
|
"金币包4": "gold_4",
|
|
"金币包5": "gold_5",
|
|
"金币包6": "gold_6",
|
|
"无限体力组合包1": "unlimited_health_bundle_1",
|
|
"无限体力组合包2": "unlimited_health_bundle_2",
|
|
"无限体力组合包3": "unlimited_health_bundle_3",
|
|
"局内购买冻结": "freeze_in_game",
|
|
"局内购买锤子": "hammer_in_game",
|
|
"局内购买魔棒": "wand_in_gamerefill",
|
|
"补满体力": "health"
|
|
}; |