mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
导出比赛代码功能
This commit is contained in:
1 parent
b54c22cb84
commit
9247b71b5f
11 files changed
+123
-69
No files matched your search
@@ -1,6 +1,6 @@
|
||||
export default function reducer(state = {
|
||||
lang: Context.code_lang,
|
||||
code: Context.code_template,
|
||||
lang: Context.codeLang,
|
||||
code: Context.codeTemplate,
|
||||
}, action) {
|
||||
switch (action.type) {
|
||||
case 'SCRATCHPAD_EDITOR_UPDATE_CODE': {
|
||||
|
||||
@@ -26,11 +26,11 @@ const page = new NamedPage('manage_script', () => {
|
||||
if (action !== 'ok') return;
|
||||
const args = runScriptDialog.$dom.find('[name="args"]').val();
|
||||
try {
|
||||
await request.post('', {
|
||||
const res = await request.post('', {
|
||||
args,
|
||||
id,
|
||||
});
|
||||
window.location.reload();
|
||||
window.location.href = res.url;
|
||||
} catch (error) {
|
||||
Notification.error(error.message);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user