diff --git a/src/https/modules/base.ts b/src/https/modules/base.ts index 8719a1f..876cc68 100644 --- a/src/https/modules/base.ts +++ b/src/https/modules/base.ts @@ -23,6 +23,7 @@ enum URL { // 获取默认Notice getNotice = '/getNotice', getMail = '/getMail', + getBroadcastList='getBroadcastList', // token 登录 tokenLogin = '/tokenLogin', // 群组 @@ -268,6 +269,8 @@ export const withdraw = (data: any) => post(URL.withdraw, data); export const getCenterUrl = () => post(URL.getCenterUrl); // 获取平台配置 export const getPlatformConfig = () => post(URL.getPlatformConfig); +export const getBroadcastList = () => post(URL.getBroadcastList); + // 获取默认Notice export const getNotice = async (data: any) => { return await instance(URL.getNotice, { diff --git a/src/stores/modules/game-list.ts b/src/stores/modules/game-list.ts index 39770bc..bf5b3f4 100644 --- a/src/stores/modules/game-list.ts +++ b/src/stores/modules/game-list.ts @@ -71,7 +71,7 @@ export const gameListStore = defineStore(actions.GAME_LIST, { }, // 火爆热门 轮播 async setNotice() { - const notice = await http.getNotice(); + const notice = await http.getBroadcastList(); if (notice.code != 0) return; let noticeData: Array = []; for (let i = 0; i < notice.data.length; i++) { @@ -85,6 +85,8 @@ export const gameListStore = defineStore(actions.GAME_LIST, { }); } } + console.log(noticeData); + noticeStore().setAllNotice(noticeData); }, @@ -118,7 +120,7 @@ export const gameListStore = defineStore(actions.GAME_LIST, { // 请求 火爆中奖信息 if (noticeStore().notice.length === 0) { - // await this.setNotice(); + await this.setNotice(); } this.setPackageData();