feat: 按配置获取主体信息

This commit is contained in:
duanshuwen
2025-09-20 19:26:16 +08:00
parent 4cdff7a594
commit 55fd7c7ee6
11 changed files with 155 additions and 142 deletions

View File

@@ -1,26 +1,19 @@
import request from "../base/request";
/// 主页数据
function mainPageData(sceneId) {
const args = { sceneId : sceneId}
return request.post('/hotelBiz/mainScene/mainPageData', args);
function mainPageData(args) {
return request.post("/hotelBiz/mainScene/mainPageData", args);
}
/// 快速预订组件
function quickBookingComponent(selectedData) {
const args = { selectedData: selectedData }
return request.post('/hotelBiz/mainScene/quickBookingComponent', args);
const args = { selectedData: selectedData };
return request.post("/hotelBiz/mainScene/quickBookingComponent", args);
}
/// 探索发现卡片组件
function discoveryCradComponent() {
return request.get('/hotelBiz/mainScene/discoveryComponent', {});
return request.get("/hotelBiz/mainScene/discoveryComponent", {});
}
export {
mainPageData,
quickBookingComponent,
discoveryCradComponent
}
export { mainPageData, quickBookingComponent, discoveryCradComponent };

View File

@@ -1,4 +1,4 @@
const isProd = false;
const isProd = true;
// 测试
const VITE_BASE_URL_TEST = "https://onefeel.brother7.cn/ingress";

View File

@@ -1,10 +1,13 @@
import { goLogin } from "../../hooks/useGoLogin";
import { BASE_URL } from "./baseUrl";
import { getCurrentConfig } from "@/constant/base";
const clientId = getCurrentConfig().clientId;
const defaultConfig = {
header: {
Authorization: "", // 可在此动态设置 token
"Content-Type": "application/json",
clientId: clientId,
},
};