Commit ea52d975 authored by GuanHua's avatar GuanHua

fix: 渠道和渠道自有商城参数问题

parent e2f39a8f
......@@ -438,9 +438,21 @@ const CommodityDetail = (props) => {
count: buyCount
}
let postFn
let headers = {}
switch (layoutType) {
case LAYOUT_TYPE.channel:
headers = {
type: 3
}
param.commodityType = 2
param.channelCommodityUnitPriceId = selectCommodityId
param.commodityUnitPriceId = selectCommodityUnitPriceId
postFn = PublicApi.postSearchShopPurchaseChannelSaveOrUpdatePurchase
break;
case LAYOUT_TYPE.ichannel:
headers = {
type: 4
}
param.commodityType = 2
param.channelCommodityUnitPriceId = selectCommodityId
param.commodityUnitPriceId = selectCommodityUnitPriceId
......@@ -461,7 +473,7 @@ const CommodityDetail = (props) => {
PublicApi.postOrderDirectPayment(directParam).then(res => {
if (res.code === 1000) {
message.destroy()
postFn && postFn(param).then(res => {
postFn && postFn(param, { headers }).then(res => {
clickFlag = true
if (res.code === 1000) {
message.destroy()
......
import React, { useEffect, useState } from 'react'
import BreadCrumbs from './components/breadCrumbs'
import InformationRight from './components/informationRight'
import { Helmet } from 'umi'
import cx from 'classnames'
import { message } from 'antd'
import { StarFilled, StarOutlined } from '@ant-design/icons'
import ImageBox from '@/components/ImageBox'
import { ClockCircleOutlined, EyeOutlined } from '@ant-design/icons'
import informationImg2 from '@/assets/imgs/information_2.png'
import { PublicApi } from '@/services/api'
import { GetManageContentInformationFindByIdResponse } from '@/services/PassApi'
import { numFormat } from '@/utils/numberFomat'
......@@ -35,7 +35,7 @@ const InformationDetail: React.FC<InformationDetailPropsType> = (props) => {
}, [props.location])
const fetchNewsDetail = () => {
let param = {
const param = {
id
}
PublicApi.getManageContentInformationFindById(param).then(res => {
......@@ -50,7 +50,7 @@ const InformationDetail: React.FC<InformationDetailPropsType> = (props) => {
if (collectFlg) {
collectFlg = false
const status = newsDetail.collectStatus ? false : true
let param = {
const param = {
informationId: newsDetail.id,
status
}
......@@ -106,6 +106,7 @@ const InformationDetail: React.FC<InformationDetailPropsType> = (props) => {
}
return (
<>
<div className={styles.information_detail}>
<div className={styles.information_detail_container}>
<BreadCrumbs {...props} pathname="文章详情" />
......@@ -196,6 +197,7 @@ const InformationDetail: React.FC<InformationDetailPropsType> = (props) => {
</div>
</div>
</>
)
}
......
......@@ -57,9 +57,18 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
*/
const fetchPurchaseList = () => {
let getFn
let headers = {}
switch (layoutType) {
case LAYOUT_TYPE.channel:
headers = {
type: 3
}
getFn = PublicApi.getSearchShopPurchaseChannelGetPurchaseList
break;
case LAYOUT_TYPE.ichannel:
headers = {
type: 4
}
getFn = PublicApi.getSearchShopPurchaseChannelGetPurchaseList
break;
default:
......@@ -67,7 +76,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
break;
}
getFn && getFn().then(res => {
getFn && getFn({}, { headers }).then(res => {
if (res.code === 1000) {
initPurchaseList(res.data)
getCategoryIds(res.data)
......
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