mirror of
https://github.com/djhackersdev/minime.git
synced 2026-07-28 05:27:45 -05:00
chuni: enable ticket system
This commit is contained in:
parent
abcccfb9a0
commit
a8539b475e
|
|
@ -1,13 +1,30 @@
|
|||
import { GameChargeJson } from "../proto/gameCharge";
|
||||
import { Repositories } from "../repo";
|
||||
import { GetGameChargeRequest } from "../request/getGameCharge";
|
||||
import { GetGameChargeResponse } from "../response/getGameCharge";
|
||||
import { CHARGE_IDS } from "../static/charge";
|
||||
|
||||
export default async function getGameCharge(
|
||||
rep: Repositories,
|
||||
req: GetGameChargeRequest
|
||||
): Promise<GetGameChargeResponse> {
|
||||
const gameChargeList: GameChargeJson[] = [];
|
||||
|
||||
for (const [i, charge] of CHARGE_IDS.entries()) {
|
||||
gameChargeList.push({
|
||||
chargeId: charge.id.toString(),
|
||||
orderId: (i+1).toString(),
|
||||
price: charge.price.toString(),
|
||||
salePrice: charge.salePrice.toString(),
|
||||
startDate: "2017-12-05 07:00:00.0",
|
||||
endDate: "2029-12-31 23:59:59.0",
|
||||
saleStartDate: "2017-12-05 07:00:00.0",
|
||||
saleEndDate: "2030-12-31 23:59:59.0"
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
length: "0",
|
||||
gameChargeList: [],
|
||||
length: gameChargeList.length.toString(),
|
||||
gameChargeList,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,6 @@ export default async function getGameSetting(
|
|||
maxCountMusic: "100",
|
||||
},
|
||||
isDumpUpload: "false",
|
||||
isAou: "false",
|
||||
isAou: "true",
|
||||
};
|
||||
}
|
||||
|
|
|
|||
17
src/chunithm/static/charge.ts
Normal file
17
src/chunithm/static/charge.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
export const CHARGE_IDS = Object.freeze([
|
||||
{
|
||||
id: 2310, //World's End ticket x5
|
||||
price: 1,
|
||||
salePrice: 1,
|
||||
},
|
||||
{
|
||||
id: 2060, //4x bonus ticket
|
||||
price: 1,
|
||||
salePrice: 1,
|
||||
},
|
||||
{
|
||||
id: 2230, //6 songs premium ticket
|
||||
price: 2,
|
||||
salePrice: 2,
|
||||
},
|
||||
]);
|
||||
Loading…
Reference in New Issue
Block a user