支付:代金券功能
This commit is contained in:
@@ -33,6 +33,8 @@ export interface DicServerConst {
|
||||
readonly DEBUG_TIME: number;
|
||||
// 是否检查屏蔽词
|
||||
readonly CHECK_WORD: number;
|
||||
// 是否可以支付
|
||||
readonly CAN_PAY: number;
|
||||
}
|
||||
|
||||
export const dicServerConst: DicServerConst = {} as DicServerConst;
|
||||
|
||||
@@ -57,10 +57,10 @@ export async function savePayLog(order: UserOrderModelType) {
|
||||
try {
|
||||
let role = await RoleModel.findByRoleId(order.roleId, 'userInfo roleId roleName serverId');
|
||||
let params = getParamByRole(role);
|
||||
let { productID, message: productName, price, localOrderID, orderID, state } = order;
|
||||
let { productID, message: productName, price, localOrderID, orderID, state, useVoucher } = order;
|
||||
let dicRmb = gameData.rmb.get(productID);
|
||||
let isYuanbao = dicRmb.type == ACTIVITY_TYPE.YUAN_BAO_SHOP;
|
||||
await UserLogModel.createRecord({ type: LOG_TYPE.PAY, ...params, productID, productName, price, isYuanbao, localOrderID, orderID, totalPay: role.totalPay, orderStatus: state });
|
||||
await UserLogModel.createRecord({ type: LOG_TYPE.PAY, ...params, productID, productName, price, isYuanbao, localOrderID, orderID, totalPay: role.totalPay, orderStatus: state, useVoucher });
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
|
||||
@@ -157,4 +157,8 @@ export function isDebugPay() {
|
||||
|
||||
export function isCheckWord(isDevelop = false) {
|
||||
return gameData.serverConst.CHECK_WORD === 1 && !isDevelop;
|
||||
}
|
||||
|
||||
export function canPay() {
|
||||
return gameData.serverConst.CAN_PAY === 1;
|
||||
}
|
||||
Reference in New Issue
Block a user