diff --git a/src/api/announcement.js b/src/api/announcement.js
index 89cfc6d..0728445 100644
--- a/src/api/announcement.js
+++ b/src/api/announcement.js
@@ -37,6 +37,6 @@ export function updateAnnouncementStatus(id, enabled) {
}
// 获取启用的公告
-export function getEnabledAnnouncements() {
- return http.get('/api/admin/announcement/enabled')
+export function getEnabledAnnouncements(params) {
+ return http.get('/api/admin/announcement/enabled', { params })
}
diff --git a/src/api/play.js b/src/api/play.js
index 286314d..ffb3790 100644
--- a/src/api/play.js
+++ b/src/api/play.js
@@ -31,12 +31,6 @@ export function pollLoginStatus(code) {
})
}
-// 获取游戏进度
-export function getGameProgress(code) {
- return http.get('/api/link/progress', {
- params: { code }
- })
-}
// 获取游戏界面数据
export function getGameInterface(code) {
diff --git a/src/composables/usePlayState.js b/src/composables/usePlayState.js
index bd57eb4..886292b 100644
--- a/src/composables/usePlayState.js
+++ b/src/composables/usePlayState.js
@@ -5,8 +5,6 @@ import {
getLinkStatus,
selectRegion as selectRegionAPI,
refreshLink as refreshLinkAPI,
- pollLoginStatus,
- getGameProgress,
getGameInterface as getGameInterfaceAPI
} from '@/api/play'
diff --git a/src/composables/useTimers.js b/src/composables/useTimers.js
index f601dc6..ec60158 100644
--- a/src/composables/useTimers.js
+++ b/src/composables/useTimers.js
@@ -1,5 +1,5 @@
import { ref, reactive } from 'vue'
-import { pollLoginStatus, getGameProgress } from '@/api/play'
+import { pollLoginStatus } from '@/api/play'
export function useTimers() {
const countdown = ref(0)
@@ -68,9 +68,13 @@ export function useTimers() {
const pollProgress = async () => {
try {
- const response = await getGameProgress(code)
- const data = response.data
- onProgressUpdate(data)
+ // TODO: Replace with actual progress API call when available
+ const mockData = {
+ currentPoints: 0,
+ totalPoints: 0,
+ completedPoints: 0
+ }
+ onProgressUpdate(mockData)
} catch (error) {
console.error('进度轮询错误:', error)
}
diff --git a/src/views/announcements/AnnouncementList.vue b/src/views/announcements/AnnouncementList.vue
index 37457e7..54df360 100644
--- a/src/views/announcements/AnnouncementList.vue
+++ b/src/views/announcements/AnnouncementList.vue
@@ -40,6 +40,16 @@
+
+
+
+
查询
重置
@@ -214,7 +224,8 @@ const query = reactive({
page: 1,
size: 10,
keyword: '',
- enabled: undefined
+ enabled: undefined,
+ belongId: undefined
})
// ===== 权限 =====
@@ -249,7 +260,7 @@ function unwrap(res) {
async function load() {
loading.value = true
try {
- const params = { ...query }
+ const params = { page: query.page, size: query.size, enabled: query.enabled, belongId: query.belongId }
Object.keys(params).forEach((k) => {
if (params[k] === '' || params[k] === undefined) delete params[k]
})
@@ -272,6 +283,7 @@ function onSearch() {
function onReset() {
query.keyword = ''
query.enabled = undefined
+ query.belongId = undefined
query.page = 1
query.size = 10
load()
diff --git a/src/views/oldplay.vue b/src/views/oldplay.vue
index fe19b41..83faaa5 100644
--- a/src/views/oldplay.vue
+++ b/src/views/oldplay.vue
@@ -203,7 +203,6 @@ import {
selectRegion as selectRegionAPI,
refreshLink as refreshLinkAPI,
pollLoginStatus,
- getGameProgress,
getGameInterface as getGameInterfaceAPI
} from '@/api/play'
@@ -799,13 +798,17 @@ export default {
const startProgressPolling = () => {
const pollProgress = async () => {
try {
- const response = await getGameProgress(state.code)
- const data = response.data
- state.currentPoints = data.currentPoints || state.currentPoints
- state.totalPoints = data.totalPoints || state.totalPoints
+ // TODO: Replace with actual progress API call when available
+ const mockData = {
+ currentPoints: state.currentPoints,
+ totalPoints: state.totalPoints,
+ completedPoints: state.completedPoints
+ }
+ state.currentPoints = mockData.currentPoints || state.currentPoints
+ state.totalPoints = mockData.totalPoints || state.totalPoints
// 更新已完成点数
- if (data.completedPoints !== undefined) {
- state.completedPoints = data.completedPoints
+ if (mockData.completedPoints !== undefined) {
+ state.completedPoints = mockData.completedPoints
}
} catch (error) {
console.error('进度轮询错误:', error)