broadcast

This commit is contained in:
wxx 2024-11-01 14:42:54 +08:00
parent 2b26683d39
commit de3e9bca1d
2 changed files with 7 additions and 2 deletions

View File

@ -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, {

View File

@ -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<any> = [];
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();