파일 이식(0.31.1)

This commit is contained in:
2022-07-08 00:11:41 +09:00
parent db08cec2cb
commit 96d76a06ef
217 changed files with 29966 additions and 2 deletions
+33
View File
@@ -0,0 +1,33 @@
import $ from 'jquery';
import { unwrap_any } from '@util/unwrap_any';
import { SammoAPI } from './SammoAPI';
declare const staticValues: {
bettingID: number;
}
$(function ($) {
$('.submitBtn').on('click', async function (e) {
e.preventDefault();
const $this = $(this);
const target = parseInt($this.data('target'));
const amount = parseInt(unwrap_any<string>($(`#target_${target}`).val()));
try {
await SammoAPI.Betting.Bet({
bettingID: staticValues.bettingID,
bettingType: [target],
amount: amount,
});
} catch (e) {
console.error(e);
alert(`베팅을 실패했습니다: ${e}`);
location.reload();
return;
}
location.reload();
return;
});
});