1234567891011121314151617181920212223242526272829 |
- import { type GetHotSpotListResponse, type GetSceneDetailResponse } from '@/types/home';
- import service from '@/utils/services';
- const SCENE_BASE_URL = 'https://count.4dage.com/api';
- export const homeApi = {
- getHotSpotList() {
- return service.get<GetHotSpotListResponse>(
- `${window.g_Prefix}/data/${window.number}/hot/js/data.js`
- );
- },
- getSceneDetail(sceneCode: string) {
- return service.get<GetSceneDetailResponse | null>(
- `${SCENE_BASE_URL}/count/detail/${sceneCode}`
- );
- },
- saveSceneVisit(sceneCode: string) {
- return service.get(`${SCENE_BASE_URL}/count/saveVisit/${sceneCode}`);
- },
- /**
- * 点赞
- */
- saveStar(sceneCode: string) {
- return service.get(`${SCENE_BASE_URL}/count/saveStar/${sceneCode}`);
- },
- };
|