diff --git a/src/api_s2c/event/huobanzhaomu/ApiOpen.ts b/src/api_s2c/event/huobanzhaomu/ApiOpen.ts index 860e426..2960c08 100644 --- a/src/api_s2c/event/huobanzhaomu/ApiOpen.ts +++ b/src/api_s2c/event/huobanzhaomu/ApiOpen.ts @@ -1,14 +1,25 @@ -import { ApiCall } from "tsrpc"; -import { ReqOpen, ResOpen } from "../../../shared/protocols/event/huobanzhaomu/PtlOpen"; +import {ApiCall} from "tsrpc"; +import {ReqOpen, ResOpen} from "../../../shared/protocols/event/huobanzhaomu/PtlOpen"; +import {PayFun} from "../../../public/pay"; +import {payLog} from "../../../shared/protocols/pay/PtlGetList"; export default async function (call: ApiCall) { - let db = await G.mongodb.cEvent('huobanzhaomu').findOne({ uid: call.uid, type: 'huobanzhaomu' }); + let db = await G.mongodb.cEvent('huobanzhaomu').findOne({uid: call.uid, type: 'huobanzhaomu'}); - call.succ({ - finish: Object.fromEntries(G.gc.huobanzhaomu.map((conf, i) => { - return [i, conf.gudKey ? call.conn.gud[conf.gudKey] >= conf.total : db?.rec?.length >= G.gc.huobanzhaomu.length - 1]; - })), - rec: db?.rec || [] - }); + let logs: payLog[]; + let finish: { [k: number]: boolean } = {}; + for (let i = 0; i < G.gc.huobanzhaomu.length; i++) { + let conf = G.gc.huobanzhaomu[i]; + if (conf.gudKey == "zhizunyueka") { + if (!logs) { + logs = await PayFun.getPayLog(call.uid, "zhizunyueka"); + } + finish[i] = !(logs.length <= 0 || logs.slice(-1)[0].eTime < G.time); + } else { + finish[i] = call.conn.gud[conf.gudKey] >= conf.total; + } + } + + call.succ({finish: finish, rec: db?.rec || []}); } \ No newline at end of file diff --git a/src/api_s2c/event/huobanzhaomu/ApiRec.ts b/src/api_s2c/event/huobanzhaomu/ApiRec.ts index 0c1dfba..b272463 100644 --- a/src/api_s2c/event/huobanzhaomu/ApiRec.ts +++ b/src/api_s2c/event/huobanzhaomu/ApiRec.ts @@ -12,8 +12,8 @@ export default async function (call: ApiCall) { let db = await G.mongodb.cEvent('huobanzhaomu').findOne({uid: call.uid, type: 'huobanzhaomu'}); if (db?.rec.includes(call.req.index)) return call.error('', {code: -3}); - if (conf.gudKey == "chaozhiyueka") { - let logs = await PayFun.getPayLog(call.uid, "chaozhiyueka"); + if (conf.gudKey == "zhizunyueka") { + let logs = await PayFun.getPayLog(call.uid, "zhizunyueka"); if (!logs || logs.slice(-1)[0].eTime < G.time) { return call.error('', {code: -4}); } diff --git a/src/json/chongzhi.json5 b/src/json/chongzhi.json5 index 4237868..f0bf2fc 100644 --- a/src/json/chongzhi.json5 +++ b/src/json/chongzhi.json5 @@ -85,7 +85,7 @@ }, '5': { - gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 4280 }], prize: [{"a":"attr","t":"jinbi","n":2000000},{"a":"equip","t":"2008","n":1},{"a":"item","t":"12","n":500},{"a":"item","t":"26","n":5},{"a":"item","t":"24","n":3}] }, + gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 4280 }], prize: [{"a":"attr","t":"jinbi","n":2000000},{"a":"item","t":"607","n":20},{"a":"item","t":"12","n":500},{"a":"item","t":"26","n":5},{"a":"item","t":"24","n":3}] }, "tip": "intr_viplibao_title_5", "tq": { '1': { tip: ['intr_viplibao_intr_16'], isnew: true}, @@ -103,7 +103,7 @@ }, '6': { - gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 5880 }], prize: [{"a":"attr","t":"jinbi","n":2500000},{"a":"equip","t":"2006","n":1},{"a":"item","t":"30","n":10},{"a":"item","t":"2","n":500},{"a":"item","t":"25","n":5},{"a":"item","t":"24","n":5}] }, + gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 5880 }], prize: [{"a":"attr","t":"jinbi","n":2500000},{"a":"item","t":"607","n":20},{"a":"item","t":"30","n":10},{"a":"item","t":"2","n":500},{"a":"item","t":"25","n":5},{"a":"item","t":"24","n":5}] }, "tip": "intr_viplibao_title_6", "tq": { '1': { tip: ['intr_viplibao_intr_1', 6], isnew: true}, @@ -119,7 +119,7 @@ }, '7': { - gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 8280 }], prize: [{"a":"attr","t":"jinbi","n":3000000},{"a":"equip","t":"4008","n":1},{"a":"item","t":"6","n":10},{"a":"item","t":"18","n":100},{"a":"item","t":"26","n":5},{"a":"item","t":"24","n":5}] }, + gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 8280 }], prize: [{"a":"attr","t":"jinbi","n":3000000},{"a":"item","t":"607","n":20},{"a":"item","t":"6","n":10},{"a":"item","t":"18","n":100},{"a":"item","t":"26","n":5},{"a":"item","t":"24","n":5}] }, "tip": "intr_viplibao_title_7", "tq": { '1': { tip: ['intr_viplibao_intr_1', 7], isnew: true}, @@ -135,7 +135,7 @@ }, '8': { - gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 11280 }], prize: [{"a":"attr","t":"jinbi","n":4000000},{"a":"equip","t":"3009","n":1},{"a":"item","t":"6","n":20},{"a":"item","t":"20","n":50},{"a":"item","t":"9","n":500},{"a":"item","t":"24","n":7}] }, + gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 11280 }], prize: [{"a":"attr","t":"jinbi","n":4000000},{"a":"item","t":"617","n":1},{"a":"item","t":"6","n":20},{"a":"item","t":"20","n":50},{"a":"item","t":"9","n":500},{"a":"item","t":"24","n":7}] }, "tip": "intr_viplibao_title_8", "tq": { '1': { tip: ['intr_viplibao_intr_9', 2], isnew: true}, @@ -153,7 +153,7 @@ }, '9': { - gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 15880 }], prize: [{"a":"attr","t":"jinbi","n":5000000},{"a":"equip","t":"2009","n":1},{"a":"item","t":"18","n":150},{"a":"item","t":"10","n":80},{"a":"item","t":"24","n":7}] }, + gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 15880 }], prize: [{"a":"attr","t":"jinbi","n":5000000},{"a":"item","t":"617","n":1},{"a":"item","t":"18","n":150},{"a":"item","t":"10","n":80},{"a":"item","t":"24","n":7}] }, "tip": "intr_viplibao_title_9", "tq": { '1': { tip: ['intr_viplibao_intr_1', 9], isnew: true}, @@ -169,7 +169,7 @@ }, '10': { - gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 21280 }], prize: [{"a":"attr","t":"jinbi","n":10000000},{"a":"equip","t":"1009","n":1},{"a":"item","t":"20","n":80},{"a":"item","t":"9","n":500},{"a":"item","t":"24","n":8}] }, + gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 21280 }], prize: [{"a":"attr","t":"jinbi","n":10000000},{"a":"item","t":"617","n":1},{"a":"item","t":"20","n":80},{"a":"item","t":"9","n":500},{"a":"item","t":"24","n":8}] }, "tip": "intr_viplibao_title_10", "tq": { '1': { tip: ['intr_viplibao_intr_1', 10], isnew: true}, @@ -185,7 +185,7 @@ }, '11': { - gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 28880 }], prize: [{"a":"attr","t":"jinbi","n":15000000},{"a":"item","t":"609","n":1},{"a":"item","t":"18","n":200},{"a":"item","t":"24","n":10},{"a":"item","t":"10","n":80}] }, + gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 28880 }], prize: [{"a":"attr","t":"jinbi","n":15000000},{"a":"item","t":"617","n":1},{"a":"item","t":"18","n":200},{"a":"item","t":"24","n":10},{"a":"item","t":"10","n":80}] }, "tip": "intr_viplibao_title_11", "tq": { '1': { tip: ['intr_viplibao_intr_9', 4], isnew: true}, @@ -202,7 +202,7 @@ }, '12': { - gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 36880 }], prize: [{"a":"attr","t":"jinbi","n":20000000},{"a":"item","t":"609","n":1},{"a":"item","t":"20","n":100},{"a":"item","t":"9","n":1000},{"a":"item","t":"10","n":80}] }, + gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 36880 }], prize: [{"a":"attr","t":"jinbi","n":20000000},{"a":"item","t":"617","n":1},{"a":"item","t":"20","n":100},{"a":"item","t":"9","n":1000},{"a":"item","t":"10","n":80}] }, "tip": "intr_viplibao_title_12", "tq": { '1': { tip: ['intr_viplibao_intr_1', 12], isnew: true}, @@ -219,7 +219,7 @@ }, '13': { - gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 48880 }], prize: [{"a":"attr","t":"jinbi","n":25000000},{"a":"item","t":"609","n":1},{"a":"item","t":"619","n":1},{"a":"item","t":"18","n":500},{"a":"item","t":"606","n":2},{"a":"item","t":"10","n":80}] }, + gift: { buyNum: 1, sale: 1, need: [{ a: 'attr', t: 'rmbmoney', n: 48880 }], prize: [{"a":"attr","t":"jinbi","n":25000000},{"a":"item","t":"20","n":100},{"a":"item","t":"619","n":1},{"a":"item","t":"18","n":500},{"a":"item","t":"606","n":2},{"a":"item","t":"10","n":80}] }, "tip": "intr_viplibao_title_13", "tq": { '1': { tip: ['intr_viplibao_intr_18', 1], isnew: true}, diff --git a/src/json/guideConfig.json b/src/json/guideConfig.json index 0b83bad..2f94f67 100644 --- a/src/json/guideConfig.json +++ b/src/json/guideConfig.json @@ -835,6 +835,7 @@ "Type": "finger", "path": "Canvas/draw/uiRoot/uiView_mainMenu/mainMenu/btnLayout/gb", "undefined": "点干部", + "initiative": 1, "location": 2 }, "80": { @@ -844,6 +845,7 @@ "Type": "finger", "path": "Canvas/draw/uiRoot/uiView_heroInfo/heroInfo/img_bg/btnScrollView/view/content/leftBtn/btn_sj", "undefined": "点升级页签", + "initiative": 1, "location": 2 }, "81": { @@ -853,6 +855,7 @@ "Type": "finger", "path": "Canvas/draw/uiRoot/uiView_heroInfo/heroInfo/img_bg/panel_down/panel_rdown/panel_sj/btn_shengji", "undefined": "点升级按钮", + "initiative": 1, "location": 1 }, "82": { diff --git a/src/json/huobanzhaomu.json5 b/src/json/huobanzhaomu.json5 index fba48fc..b2e5176 100644 --- a/src/json/huobanzhaomu.json5 +++ b/src/json/huobanzhaomu.json5 @@ -11,7 +11,7 @@ }, { total: 1, - gudKey: 'payExp', + gudKey: 'zhizunyueka', prize: [{a: 'item', t: '4', n: 10}] }, { diff --git a/src/json/huodong.json5 b/src/json/huodong.json5 index 9455557..48ff890 100644 --- a/src/json/huodong.json5 +++ b/src/json/huodong.json5 @@ -2456,7 +2456,7 @@ 'stype': 118 }, '2003': { - 'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '626', 'n': 20}], + 'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '600', 'n': 20}], 'tujing': '', 'title': 'intr_yczm_day_des_2', 'type': 2, @@ -2604,7 +2604,7 @@ 'stype': 118 }, '2003': { - 'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '626', 'n': 20}], + 'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '600', 'n': 20}], 'tujing': '', 'title': 'intr_yczm_day_des_2', 'type': 2, diff --git a/src/json/pay.json b/src/json/pay.json index ad781d0..d293892 100644 --- a/src/json/pay.json +++ b/src/json/pay.json @@ -922,7 +922,7 @@ { "a": "attr", "t": "payExp", - "n": 10 + "n": 5 } ], "prize": [ diff --git a/src/json/payEmail.json5 b/src/json/payEmail.json5 index 6ebe0fc..293a634 100644 --- a/src/json/payEmail.json5 +++ b/src/json/payEmail.json5 @@ -4,7 +4,7 @@ day: 1, title: 'title_email_caifutequan_day1', content: 'intr_email_caifutequan_day1', - prize: [{ a: 'attr', t: 'rmbmoney', n: 200 }] + prize: [{ a: 'attr', t: 'rmbmoney', n: 300 },{ a: 'attr', t: 'jinbi', n: 1000000 }] } ], jiubatequan: [ diff --git a/src/json/task.json b/src/json/task.json index c597cec..a9fb41f 100644 --- a/src/json/task.json +++ b/src/json/task.json @@ -1118,7 +1118,7 @@ { "a": "item", "t": "12", - "n": 20 + "n": 100 }, { "a": "attr", @@ -1334,7 +1334,7 @@ { "a": "item", "t": "12", - "n": 50 + "n": 200 }, { "a": "item", @@ -1410,7 +1410,7 @@ { "a": "item", "t": "12", - "n": 50 + "n": 600 }, { "a": "item", @@ -1562,7 +1562,7 @@ { "a": "item", "t": "12", - "n": 200 + "n": 400 }, { "a": "item", diff --git a/src/json/yibaichou.json5 b/src/json/yibaichou.json5 index f80c3c3..27de9d3 100644 --- a/src/json/yibaichou.json5 +++ b/src/json/yibaichou.json5 @@ -11,11 +11,11 @@ }, { total: 1200, - prize: [{a: 'item', t: '4007', n: 20}] + prize: [{a: 'attr', t: 'rmbmoney', n: 400}] }, { total: 1800, - prize: [{a: 'attr', t: 'rmbmoney', n: 200}] + prize: [{a: 'attr', t: 'rmbmoney', n: 600}] }, { total: 2400, diff --git a/src/public/tequan.ts b/src/public/tequan.ts index 078097f..7482b71 100644 --- a/src/public/tequan.ts +++ b/src/public/tequan.ts @@ -15,6 +15,6 @@ export class TeQuanFun { return await this.getIsAcTive(call, 'qingbaotequan') ? 1 : 0; } static async getTxFreeNum(call: ApiCall) { - return await this.getIsAcTive(call, 'zuozhantequan') ? 2 : 0; + return await this.getIsAcTive(call, 'zuozhantequan') ? 5 : 0; } } \ No newline at end of file