Commit 635a7965 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix:商品

parent 22e211af
...@@ -18,34 +18,9 @@ export interface UserRegister { ...@@ -18,34 +18,9 @@ export interface UserRegister {
useDetail?: any; useDetail?: any;
} }
export interface RuleConfiguration {
value: number;
label: string;
platformType: number;
}
export interface PayWayResponse {
payType: number;
value: number;
label: string;
}
export interface PayInitializeConfig {
payType: number;
ruleConfigurations: RuleConfiguration[];
payWayResponses: PayWayResponse[];
}
export interface PayPlatformPayConfig {
id: number;
payType: number;
way: string;
isPitchOn: number;
}
export interface PayConfig { export interface PayConfig {
payInitializeConfig: PayInitializeConfig[]; payInitializeConfig?: any;
payPlatformPayConfig: PayPlatformPayConfig[]; payPlatformPayConfig?: any;
} }
export interface CountryList { export interface CountryList {
......
...@@ -226,14 +226,23 @@ const viewProducts: React.FC<{}> = () => { ...@@ -226,14 +226,23 @@ const viewProducts: React.FC<{}> = () => {
</Descriptions> </Descriptions>
</> </>
/* 定价类型 */
//1-现货价格,2-价格需要询价,3-积分兑换商品
const renderPriceType = (type: number) => { const renderPriceType = (type: number) => {
if(type === 1 ) return '现货价格' if(type === 1 ) return '现货价格'
if(type === 2 ) return '价格需要询价' if(type === 2 ) return '价格需要询价'
if(type === 3 ) return '积分兑换商品' if(type === 3 ) return '积分兑换商品'
} }
const renderDeliveryType = (type: number) => {
if(type === 1) return '物流(默认)'
if(type === 2) return '自提'
if(type === 3) return '无需配送'
}
const renderCarriageType = (type: number) => {
if(type === 1) return '卖家承担运费(默认)'
if(type === 2) return '买家承担运费'
}
/* 构建表格数据 */ /* 构建表格数据 */
const constructTableData = (productName: string, unitPriceAndPicList: GetProductCommodityGetCommodityResponse["unitPriceAndPicList"]) => { const constructTableData = (productName: string, unitPriceAndPicList: GetProductCommodityGetCommodityResponse["unitPriceAndPicList"]) => {
// 构建列 // 构建列
...@@ -407,7 +416,7 @@ const viewProducts: React.FC<{}> = () => { ...@@ -407,7 +416,7 @@ const viewProducts: React.FC<{}> = () => {
<p>配送方式:</p> <p>配送方式:</p>
</Col> </Col>
<Col span={20}> <Col span={20}>
<p>物流(默认)</p> <p>{renderDeliveryType(productDetail?.logistics?.deliveryType)}</p>
</Col> </Col>
</Row> </Row>
<Row> <Row>
...@@ -415,7 +424,7 @@ const viewProducts: React.FC<{}> = () => { ...@@ -415,7 +424,7 @@ const viewProducts: React.FC<{}> = () => {
<p>运送方式:</p> <p>运送方式:</p>
</Col> </Col>
<Col span={20}> <Col span={20}>
<p>买家承担运费</p> <p>{renderCarriageType(productDetail?.logistics?.carriageType)}</p>
</Col> </Col>
</Row> </Row>
<Row> <Row>
......
...@@ -224,14 +224,23 @@ const viewProducts: React.FC<{}> = () => { ...@@ -224,14 +224,23 @@ const viewProducts: React.FC<{}> = () => {
</Descriptions> </Descriptions>
</> </>
/* 定价类型 */
//1-现货价格,2-价格需要询价,3-积分兑换商品
const renderPriceType = (type: number) => { const renderPriceType = (type: number) => {
if(type === 1 ) return '现货价格' if(type === 1 ) return '现货价格'
if(type === 2 ) return '价格需要询价' if(type === 2 ) return '价格需要询价'
if(type === 3 ) return '积分兑换商品' if(type === 3 ) return '积分兑换商品'
} }
const renderDeliveryType = (type: number) => {
if(type === 1) return '物流(默认)'
if(type === 2) return '自提'
if(type === 3) return '无需配送'
}
const renderCarriageType = (type: number) => {
if(type === 1) return '卖家承担运费(默认)'
if(type === 2) return '买家承担运费'
}
/* 构建表格数据 */ /* 构建表格数据 */
const constructTableData = (productName: string, unitPriceAndPicList: GetProductCommodityGetCommodityResponse["unitPriceAndPicList"]) => { const constructTableData = (productName: string, unitPriceAndPicList: GetProductCommodityGetCommodityResponse["unitPriceAndPicList"]) => {
// 构建列 // 构建列
...@@ -374,7 +383,7 @@ const viewProducts: React.FC<{}> = () => { ...@@ -374,7 +383,7 @@ const viewProducts: React.FC<{}> = () => {
<p>配送方式:</p> <p>配送方式:</p>
</Col> </Col>
<Col span={20}> <Col span={20}>
<p>物流(默认)</p> <p>{renderDeliveryType(productDetail?.logistics?.deliveryType)}</p>
</Col> </Col>
</Row> </Row>
<Row> <Row>
...@@ -382,7 +391,7 @@ const viewProducts: React.FC<{}> = () => { ...@@ -382,7 +391,7 @@ const viewProducts: React.FC<{}> = () => {
<p>运送方式:</p> <p>运送方式:</p>
</Col> </Col>
<Col span={20}> <Col span={20}>
<p>买家承担运费</p> <p>{renderCarriageType(productDetail?.logistics?.carriageType)}</p>
</Col> </Col>
</Row> </Row>
<Row> <Row>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment