// const env = { // dev: { // MODE: 'development', // ENV_API: `http://127.0.0.1:${devPort}` //测试服务器地址 // }, // pro: { // MODE: 'production', // ENV_API: `http://127.0.0.1:${serverPort}` // 正式服务器地址 // } // } const devPort = 3000; const serverPort = 4201; export const baseUrl = process.env.ENV_API; console.log('baseUrl', baseUrl); export const apiMap = { searchProduct: { path: `/api/product/search`, }, searchProductMini: { path: `/api/product/mini`, }, productInfo: { path: `/api/product` }, productEdit: { path: `/api/product/edit` }, productDelete: { path: `/api/product/del` }, productAdd: { path: `/api/product/add` }, productTypes: { path: `/api/product/types` }, productAddType: { path: `/api/product/type/add` }, productEditType: { path: `/api/product/type/edit` }, productDeleteType: { path: `/api/product/type/del` }, searchSolution: { path: `/api/solution/search`, }, newsTypes: { path: `/api/news/types` }, addNewsType: { path: `/api/news/type/add` }, editNewsType: { path: `/api/news/type/edit` }, deleteNewsType: { path: `/api/news/type/del` }, solutionInfo: { path: `/api/solution` }, addPageRead: { path: `/api/news/read` }, searchNews: { path: `/api/news/search`, }, // 获取所有文章接口 searchAllNews: { path: `/api/news/pages`, }, searchNewsMini: { path: `/api/news/mini`, }, newsInfo: { // 新闻与解决方案都是文章,不多做接口 path: `/api/solution` }, newsAdd: { path: `/api/news/add` }, newsEdit: { path: `/api/news/edit` }, newsDelete: { path: `/api/news/del` }, downloads: { path: `/api/download/list` }, downloadItem: { path: `/api/download/` }, carouselList: { path: `/api/base/carousel` }, carouselAllList: { path: `/api/base/carousel/list` }, baseDatas: { path: `/api/base/base` }, baseAddCarousel: { path: `/api/base/carousel` }, baseUpdateCarousel: { path: `/api/base/carousel` }, baseInfo: { path: `/api/base/info` }, baseInfoEdit: { path: `/api/base/edit` } }