"use strict"; const ENV = new UTSJSONObject( { // 开发环境 development: new UTSJSONObject({ baseUrl: "http://localhost:3000/api", imageBaseUrl: "http://localhost:3000" }), // 生产环境 production: new UTSJSONObject({ baseUrl: "https://api.youyijia.com/api", imageBaseUrl: "https://api.youyijia.com" }) } // 当前环境 - 切换为 'production' 上线 ); const getEnvConfig = () => { return new UTSJSONObject({ baseUrl: ENV.development.baseUrl, imageBaseUrl: ENV.development.imageBaseUrl }); }; const PAGE_SIZE = 10; new UTSJSONObject( { maxSize: 5 * 1024 * 1024, maxCount: 9, accept: ["image/jpeg", "image/png", "image/gif"] } // 缓存Key ); const STORAGE_KEYS = new UTSJSONObject( { TOKEN: "user_token", USER_INFO: "user_info", FAVORITES: "user_favorites", SEARCH_HISTORY: "search_history" } // 沙发分类 ); const SOFA_CATEGORIES = [ new UTSJSONObject({ id: "all", name: "全部" }), new UTSJSONObject({ id: "leather", name: "皮沙发" }), new UTSJSONObject({ id: "fabric", name: "布艺沙发" }), new UTSJSONObject({ id: "functional", name: "功能沙发" }), new UTSJSONObject({ id: "antique", name: "古典沙发" }), new UTSJSONObject({ id: "office", name: "办公沙发" }) ]; const SERVICE_TYPES = [ new UTSJSONObject({ id: "repair", name: "局部修复", icon: "/static/icons/repair.png" }), new UTSJSONObject({ id: "recolor", name: "改色翻新", icon: "/static/icons/recolor.png" }), new UTSJSONObject({ id: "refurbish", name: "整体翻新", icon: "/static/icons/refurbish.png" }), new UTSJSONObject({ id: "custom", name: "定制换皮", icon: "/static/icons/custom.png" }) ]; exports.PAGE_SIZE = PAGE_SIZE; exports.SERVICE_TYPES = SERVICE_TYPES; exports.SOFA_CATEGORIES = SOFA_CATEGORIES; exports.STORAGE_KEYS = STORAGE_KEYS; exports.getEnvConfig = getEnvConfig; //# sourceMappingURL=../../.sourcemap/mp-weixin/utils/config.js.map