core&ui: fix contest problem ref

This commit is contained in:
undefined committed 2021-06-04 21:26:57 +08:00
1 parent 7a9dc95377
commit 715e564971
8 files changed
+10 -14

No files matched your search

+3 -3
View File
@@ -74,10 +74,10 @@ export class ContestDetailHandler extends Handler {
['contest_main', 'contest_main'],
[tdoc.title, null, null, true],
];
const index = tdoc.pids.map((i) => i.toString());
for (const key in pdict) {
// @ts-ignore
if (pdict[key].domainId !== domainId) pdict[key].docId = `${pdict[key].domainId}:${pdict[key].docId}`;
pdict[key].pid = (tdoc.pids.indexOf(pdict[key].docId) + 10).toString(36).toUpperCase();
const i = (index.indexOf(key) + 10).toString(36).toUpperCase();
if (i !== '9') pdict[key].pid = i;
}
this.response.body = {
path, tdoc, tsdoc, attended, udict, pdict, psdict, rdict, page,