From f0a1ad7b34eb9c1709f1b620d36ae56d3cb2abb6 Mon Sep 17 00:00:00 2001 From: x3zvawq Date: Thu, 17 Oct 2024 16:24:33 +0800 Subject: [PATCH] =?UTF-8?q?feat(cj):=20=E5=85=81=E8=AE=B8=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E5=9C=B0=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/components/cj/sidebar.vue | 8 +-- src/components/common/search.vue | 6 +-- src/service/achievement.js | 10 +++- src/views/cj/index.vue | 92 +++++++++++++++++++++++++++++++- src/views/cj/normal.vue | 6 ++- src/views/cj/search.vue | 6 +++ 7 files changed, 118 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index ae3aacf0..b5ad7108 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "@antv/g2": "^4.2.10", "@jx3box/jx3box-comment-ui": "^1.9.9", "@jx3box/jx3box-common": "^8.2.24", - "@jx3box/jx3box-common-ui": "^8.9.25", + "@jx3box/jx3box-common-ui": "^8.9.26", "@jx3box/jx3box-data": "^3.6.8", "@jx3box/jx3box-dict": "^2.1.1", "@jx3box/jx3box-editor": "^2.2.15", diff --git a/src/components/cj/sidebar.vue b/src/components/cj/sidebar.vue index 8ea6ac0f..4199ee41 100644 --- a/src/components/cj/sidebar.vue +++ b/src/components/cj/sidebar.vue @@ -68,7 +68,6 @@ import { getMenus, getRoleGameAchievements, getVirtualRoleAchievements } from "@/service/achievement"; import RoleSelect from "@/components/common/role-select.vue"; import Bus from "@jx3box/jx3box-common-ui/service/bus"; -import { getUserRoles } from "@/service/team"; import User from "@jx3box/jx3box-common/js/user"; import { showSchoolIcon } from "@jx3box/jx3box-common/js/utils"; import { flattenDeep, cloneDeep } from "lodash"; @@ -86,8 +85,6 @@ export default { menu_types: [ { value: 1, label: "常规成就" }, { value: 2, label: "五甲成就" }, - // { value: 4, label: "宠物成就" }, - // { value: 5, label: "奇遇成就" }, { value: 3, label: "其他板块" }, ], @@ -266,6 +263,7 @@ export default { sub: first_node.data.sub, detail: first_node.data.detail, }, + query: that.$route.query, }); }, 100); this.$refs.tree.store.setCurrentNode(first_node); @@ -374,16 +372,18 @@ export default { return { name: "normal", params: { sub: data.sub, detail: data.detail }, + query: this.$route.query, }; case 2: return { name: "top_five", params: { sub: data.sub, detail: data.detail }, + query: this.$route.query, }; case 3: // case 4: // case 5: - return { name: data.router }; + return { name: data.router, query: this.$route.query }; } return null; }, diff --git a/src/components/common/search.vue b/src/components/common/search.vue index 5a2f535a..9f08bf48 100644 --- a/src/components/common/search.vue +++ b/src/components/common/search.vue @@ -1,5 +1,5 @@ - + + + diff --git a/src/views/cj/normal.vue b/src/views/cj/normal.vue index 02a6ecc8..2f2c7f3a 100644 --- a/src/views/cj/normal.vue +++ b/src/views/cj/normal.vue @@ -82,7 +82,11 @@ export default { // 获取成就列表 get_achievements(sub, detail) { if (!sub) return []; - getMenuAchievements(sub, detail).then( + const params = {}; + + if (this.$route.query.scene) params.scene = this.$route.query.scene; + + getMenuAchievements(sub, detail, params).then( (data) => { data = data.data; const achievements = diff --git a/src/views/cj/search.vue b/src/views/cj/search.vue index e1468dbf..892cbb54 100644 --- a/src/views/cj/search.vue +++ b/src/views/cj/search.vue @@ -98,6 +98,8 @@ export default { // 获取成就搜索列表 get_achievements(keyword, page, length) { let data = { keyword: keyword, page: page }; + if (this.$route.query.scene) data["scene"] = this.$route.query.scene; + if (typeof length !== "undefined") data["limit"] = length; return new Promise((resolve, reject) => { searchAchievements(data).then( @@ -168,6 +170,10 @@ export default {