|
|
@@ -21,8 +21,11 @@ import { preferences } from '@vben/preferences';
|
|
|
import { useUserStore } from '@vben/stores';
|
|
|
import { openWindow } from '@vben/utils';
|
|
|
|
|
|
+import { requestClient } from '#/api/request';
|
|
|
+
|
|
|
import AnalyticsVisitsSource from '../analytics/analytics-visits-source.vue';
|
|
|
|
|
|
+
|
|
|
const userStore = useUserStore();
|
|
|
|
|
|
// 这是一个示例数据,实际项目中需要根据实际情况进行调整
|
|
|
@@ -231,6 +234,27 @@ function navTo(nav: WorkbenchProjectItem | WorkbenchQuickNavItem) {
|
|
|
console.warn(`Unknown URL for navigation item: ${nav.title} -> ${nav.url}`);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+const getGamesRelation = async () => {
|
|
|
+ const gamesRelation = await requestClient.get('/pstery/get_games_relation', { params: { mk: 1 } });
|
|
|
+ const gamesSolution = await requestClient.get('/pstery/get_solutions');
|
|
|
+ gamesSolution.solutions.forEach((solution: any) => {
|
|
|
+ const { info: { id }} = solution;
|
|
|
+ const relation = gamesRelation.find((relation: any) => relation.id === id);
|
|
|
+ if (!relation) {
|
|
|
+ console.log('relation not found', id);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ if (!relation.solutions) {
|
|
|
+ relation.solutions = [];
|
|
|
+ }
|
|
|
+ relation.solutions.push(solution);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ console.log('gamesRelation', gamesRelation);
|
|
|
+}
|
|
|
+
|
|
|
+getGamesRelation();
|
|
|
</script>
|
|
|
|
|
|
<template>
|