日志控制
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
*/
|
||||
import { PaymentApi } from "./PaymentApi";
|
||||
import proto from 'db://assets/Scripts/proto/proto.pb.js';
|
||||
import { logger } from "db://assets/Scripts/Main/Common/Logger";
|
||||
|
||||
export interface PollOptions {
|
||||
maxDurationMs: number; // 最大轮询时长(超过就自动退出)(例如 2分钟)
|
||||
@@ -41,9 +42,9 @@ export class PaymentPoller {
|
||||
this.currentPollCount++;
|
||||
// 查询
|
||||
let reqData = {orderId: orderId};
|
||||
console.log("订单:", orderId, " ,第 ", this.currentPollCount, " 次轮询订单的请求数据:", reqData);
|
||||
logger.log("订单:", orderId, " ,第 ", this.currentPollCount, " 次轮询订单的请求数据:", reqData);
|
||||
const r = await PaymentApi.I.queryOrder(reqData);
|
||||
console.log("订单:", orderId, " ,第 ", this.currentPollCount, " 次轮询订单的响应数据:", r);
|
||||
logger.log("订单:", orderId, " ,第 ", this.currentPollCount, " 次轮询订单的响应数据:", r);
|
||||
if (r.code === proto.cs.EnmRetCode.SUCCESS && r.data) {
|
||||
// 回调
|
||||
onTick?.(r.data);
|
||||
|
||||
Reference in New Issue
Block a user