Commit 8ff562b6 authored by GuanHua's avatar GuanHua

feat:商品收藏价格显示和取消收藏参数问题

parent ddc91bed
......@@ -44,8 +44,8 @@ export enum LAYOUT_TYPE {
}
// 本地环境跳过权限校验
// export const isDev = process.env.NODE_ENV === "development"
export const isDev = false
export const isDev = process.env.NODE_ENV === "development"
// export const isDev = false
export const Environment_Status = {
0: "所有",
......@@ -814,7 +814,7 @@ export const SaleOrderInsideWorkStateTexts = {
8: '提交二级审核订单不通过',
9: '不接受订单',
10: '待确认支付结果',
16: '支付结果确认到账',
17: '支付结果没到账',
18: '发货单创建',
......
......@@ -78,13 +78,13 @@ const Commodity: React.FC = () => {
return (
<div className={styles.commodity_price}>
<span></span>
<label>{commodity.min}</label>
<label>{commodity.min === commodity.max ? numFormat(commodity.min) : `${numFormat(commodity.min)}~${numFormat(commodity.max)}`}</label>
</div>
)
case COMMODITY_TYPE.integral:
return (
<div className={styles.commodity_point}>
{numFormat(commodity.min)}~{numFormat(commodity.max)}积分
{commodity.min === commodity.max ? numFormat(commodity.min) : `${numFormat(commodity.min)}~${numFormat(commodity.max)}`}积分
</div>
)
case COMMODITY_TYPE.inquiry:
......@@ -104,9 +104,14 @@ const Commodity: React.FC = () => {
content: `是否要取消收藏?`,
onOk: () => {
return new Promise((resolve, reject) => {
let param = {
commodityId: detail.id
let param: any = {
commodityId: detail.commodity.id,
type: detail.type
}
if ([3, 4, 5].includes(detail.type)) {
param.channelMemberId = detail.channelMemberId
}
console.log(param, "param")
PublicApi.postSearchShopCommodityCollectDeleteCommodityCollect(param).then(res => {
if (res.code === 1000) {
fetchCollectCommodityList()
......@@ -160,7 +165,7 @@ const Commodity: React.FC = () => {
</div>
<div className={cx(styles.commodity_list_item_item)}>
<div className={styles.collection_state_wrap}>
<div className={cx(styles.collection_state)} onClick={() => handleCancelCollect(item.commodity)}>
<div className={cx(styles.collection_state)} onClick={() => handleCancelCollect(item)}>
<StarFilled />
<label>收藏</label>
</div>
......
......@@ -15,7 +15,7 @@ const Collection: React.FC = () => {
return (
<PageHeaderWrapper>
<div className={styles.collection_wrap}>
<Tabs defaultActiveKey="shops" className={styles.collection_tabs} >
<Tabs defaultActiveKey="commodity" className={styles.collection_tabs} >
<TabPane tab="商品收藏" key="commodity">
<Commodity />
</TabPane>
......
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