diff --git a/config/config.ts b/config/config.ts index 60d7976..d52205c 100644 --- a/config/config.ts +++ b/config/config.ts @@ -87,8 +87,8 @@ export default defineConfig({ plugins: ['duration'], }, define: { - 'process.env.BASE_URL': 'http://xft-cms.51jingcheng.com/api', // 接口服务器地址 - // 'process.env.BASE_URL': 'http://cms.gjxfc.com/api', // 接口服务器地址 + // 'process.env.BASE_URL': 'http://xft-cms.51jingcheng.com/api', // 接口服务器地址 + 'process.env.BASE_URL': 'http://cms.gjxfc.com/api', // 接口服务器地址 }, /** * @name 国际化插件 diff --git a/config/proxy.ts b/config/proxy.ts index 20be68d..2e559cb 100644 --- a/config/proxy.ts +++ b/config/proxy.ts @@ -15,7 +15,7 @@ export default { // localhost:8000/api/** -> https://preview.pro.ant.design/api/** '/b2b2c': { // 要代理的地址 - target: 'http://localhost:8084/', + target: 'http://cms.gjxfc.com/api/', // 配置了这个可以从 http 代理到 https // 依赖 origin 的功能可能需要这个,比如 cookie changeOrigin: true, @@ -23,7 +23,7 @@ export default { }, '/oss': { // 要代理的地址 - target: 'http://localhost:8084/', + target: 'http://cms.gjxfc.com/api/', // 配置了这个可以从 http 代理到 https // 依赖 origin 的功能可能需要这个,比如 cookie changeOrigin: true, diff --git a/src/constants.ts b/src/constants.ts index 0ae7ef1..79a2616 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -84,6 +84,13 @@ const Constants = { PUBLIC: '全员可见', PRIVATE: '仅会员可见' }, + /** + * 可见范围 + */ + pbcProductTypeList: { + PUBLIC: '公开', + PRIVATE: '私密' + }, /** * 商户类别 */ diff --git a/src/pages/ProductList/add.tsx b/src/pages/ProductList/add.tsx index ec99c4e..49575af 100644 --- a/src/pages/ProductList/add.tsx +++ b/src/pages/ProductList/add.tsx @@ -426,9 +426,7 @@ const Detail: React.FC = () => { ) : null} - + diff --git a/src/pages/ProductList/detail.tsx b/src/pages/ProductList/detail.tsx index 794bfad..af89b8e 100644 --- a/src/pages/ProductList/detail.tsx +++ b/src/pages/ProductList/detail.tsx @@ -15,6 +15,7 @@ const Detail: React.FC = () => { const [info, setInfo] = useState({}); const [images, setImages] = useState([]); + const [detailImages, setDetailImages] = useState([]); const getInfo = () => { if (params.id) { @@ -25,6 +26,10 @@ const Detail: React.FC = () => { const arr = res.data.pbcProductImages.split(','); setImages(arr); } + if (res.data.pbcProductDetailImages) { + const arr = res.data.pbcProductDetailImages.split(','); + setDetailImages(arr); + } } }); } @@ -126,11 +131,24 @@ const Detail: React.FC = () => {
+ {images.map((e) => (
))} +
+
+
+ +
+ + {detailImages.map((e) => ( +
+ +
+ ))} +
diff --git a/src/pages/ProductList/index.tsx b/src/pages/ProductList/index.tsx index 3c29a0c..f3866e8 100644 --- a/src/pages/ProductList/index.tsx +++ b/src/pages/ProductList/index.tsx @@ -106,6 +106,13 @@ const TableList: React.FC<{}> = () => { }, valueType: 'dateRange' }, + { + title: '产品类型', + dataIndex: 'pbcProductType', + valueType: 'select', + valueEnum: Constants.pbcProductTypeList, + search: false + }, { title: '状态', dataIndex: 'pbcState',