master
Joe 10 months ago
parent 71571f4200
commit 86130b2486

@ -87,8 +87,8 @@ export default defineConfig({
plugins: ['duration'], plugins: ['duration'],
}, },
define: { define: {
'process.env.BASE_URL': 'http://xft-cms.51jingcheng.com/api', // 接口服务器地址 // 'process.env.BASE_URL': 'http://xft-cms.51jingcheng.com/api', // 接口服务器地址
// 'process.env.BASE_URL': 'http://cms.gjxfc.com/api', // 接口服务器地址 'process.env.BASE_URL': 'http://cms.gjxfc.com/api', // 接口服务器地址
}, },
/** /**
* @name * @name

@ -15,7 +15,7 @@ export default {
// localhost:8000/api/** -> https://preview.pro.ant.design/api/** // localhost:8000/api/** -> https://preview.pro.ant.design/api/**
'/b2b2c': { '/b2b2c': {
// 要代理的地址 // 要代理的地址
target: 'http://localhost:8084/', target: 'http://cms.gjxfc.com/api/',
// 配置了这个可以从 http 代理到 https // 配置了这个可以从 http 代理到 https
// 依赖 origin 的功能可能需要这个,比如 cookie // 依赖 origin 的功能可能需要这个,比如 cookie
changeOrigin: true, changeOrigin: true,
@ -23,7 +23,7 @@ export default {
}, },
'/oss': { '/oss': {
// 要代理的地址 // 要代理的地址
target: 'http://localhost:8084/', target: 'http://cms.gjxfc.com/api/',
// 配置了这个可以从 http 代理到 https // 配置了这个可以从 http 代理到 https
// 依赖 origin 的功能可能需要这个,比如 cookie // 依赖 origin 的功能可能需要这个,比如 cookie
changeOrigin: true, changeOrigin: true,

@ -84,6 +84,13 @@ const Constants = {
PUBLIC: '全员可见', PUBLIC: '全员可见',
PRIVATE: '仅会员可见' PRIVATE: '仅会员可见'
}, },
/**
*
*/
pbcProductTypeList: {
PUBLIC: '公开',
PRIVATE: '私密'
},
/** /**
* *
*/ */

@ -426,9 +426,7 @@ const Detail: React.FC<any> = () => {
</Row>) : null} </Row>) : null}
<Row gutter={20}> <Row gutter={20}>
<Col span={24}> <Col span={24}>
<ProFormTextArea label="详情描述" name="pbcProductDetail" rules={[ <ProFormTextArea label="详情描述" name="pbcProductDetail" />
{ required: true, message: '请输入详情描述' },
]} />
</Col> </Col>
</Row> </Row>
<Row gutter={20}> <Row gutter={20}>

@ -15,6 +15,7 @@ const Detail: React.FC<any> = () => {
const [info, setInfo] = useState<API.PbcProductVO>({}); const [info, setInfo] = useState<API.PbcProductVO>({});
const [images, setImages] = useState<string[]>([]); const [images, setImages] = useState<string[]>([]);
const [detailImages, setDetailImages] = useState<string[]>([]);
const getInfo = () => { const getInfo = () => {
if (params.id) { if (params.id) {
@ -25,6 +26,10 @@ const Detail: React.FC<any> = () => {
const arr = res.data.pbcProductImages.split(','); const arr = res.data.pbcProductImages.split(',');
setImages(arr); setImages(arr);
} }
if (res.data.pbcProductDetailImages) {
const arr = res.data.pbcProductDetailImages.split(',');
setDetailImages(arr);
}
} }
}); });
} }
@ -126,11 +131,24 @@ const Detail: React.FC<any> = () => {
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label="相册图片" span={3}> <Descriptions.Item label="相册图片" span={3}>
<div style={{ display: 'flex', width: '100%', flexWrap: 'wrap' }}> <div style={{ display: 'flex', width: '100%', flexWrap: 'wrap' }}>
<Image.PreviewGroup>
{images.map((e) => ( {images.map((e) => (
<div key={e} style={{ marginBottom: 10, marginRight: 20 }}> <div key={e} style={{ marginBottom: 10, marginRight: 20 }}>
<Image width={100} src={e} /> <Image width={100} src={e} />
</div> </div>
))} ))}
</Image.PreviewGroup>
</div>
</Descriptions.Item>
<Descriptions.Item label="详情图" span={3}>
<div style={{ display: 'flex', width: '100%', flexWrap: 'wrap' }}>
<Image.PreviewGroup>
{detailImages.map((e) => (
<div key={e} style={{ marginBottom: 10, marginRight: 20 }}>
<Image width={100} src={e} />
</div>
))}
</Image.PreviewGroup>
</div> </div>
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label="规格" span={3}> <Descriptions.Item label="规格" span={3}>

@ -106,6 +106,13 @@ const TableList: React.FC<{}> = () => {
}, },
valueType: 'dateRange' valueType: 'dateRange'
}, },
{
title: '产品类型',
dataIndex: 'pbcProductType',
valueType: 'select',
valueEnum: Constants.pbcProductTypeList,
search: false
},
{ {
title: '状态', title: '状态',
dataIndex: 'pbcState', dataIndex: 'pbcState',

Loading…
Cancel
Save