Commit fde85c8e authored by GuanHua's avatar GuanHua

fix: 商城下单接口添加参数

parent f8ff772e
...@@ -4,6 +4,7 @@ import { Input } from 'antd' ...@@ -4,6 +4,7 @@ import { Input } from 'antd'
import { GetTemplateWebMemberChannelWebMemberChannelMainResponse } from '@/services/TemplateApi' import { GetTemplateWebMemberChannelWebMemberChannelMainResponse } from '@/services/TemplateApi'
import isEmpty from 'lodash/isEmpty' import isEmpty from 'lodash/isEmpty'
import styles from './index.less' import styles from './index.less'
import ImageBox from '@/components/ImageBox'
import { LAYOUT_TYPE } from '@/constants' import { LAYOUT_TYPE } from '@/constants'
import { GlobalConfig } from '@/global/config' import { GlobalConfig } from '@/global/config'
...@@ -54,7 +55,7 @@ const Header: React.FC<HeaderPropsType> = (props) => { ...@@ -54,7 +55,7 @@ const Header: React.FC<HeaderPropsType> = (props) => {
<div className={styles.header_container}> <div className={styles.header_container}>
<div className={styles.logo}> <div className={styles.logo}>
<a href={`${type === LAYOUT_TYPE.channel ? GlobalConfig.channelRootRoute : GlobalConfig.ichannelRootRoute}?channelId=${shopUrlParam}`}> <a href={`${type === LAYOUT_TYPE.channel ? GlobalConfig.channelRootRoute : GlobalConfig.ichannelRootRoute}?channelId=${shopUrlParam}`}>
<img src={shopInfo?.logo} /> <ImageBox width={145} height={50} imgUrl={shopInfo?.logo} />
</a> </a>
</div> </div>
<div className={styles.mall_search}> <div className={styles.mall_search}>
......
...@@ -5,6 +5,7 @@ import { history, Link } from 'umi' ...@@ -5,6 +5,7 @@ import { history, Link } from 'umi'
import isEmpty from 'lodash/isEmpty' import isEmpty from 'lodash/isEmpty'
import shop_icon from '@/assets/imgs/shop_icon.png' import shop_icon from '@/assets/imgs/shop_icon.png'
import credit_icon from '@/assets/imgs/credit_icon.png' import credit_icon from '@/assets/imgs/credit_icon.png'
import ImageBox from '@/components/ImageBox'
import styles from './index.less' import styles from './index.less'
import cx from 'classnames' import cx from 'classnames'
import { PublicApi } from '@/services/api' import { PublicApi } from '@/services/api'
...@@ -86,7 +87,7 @@ const ShopHeader: React.FC<ShopHeaderPropsType> = (props) => { ...@@ -86,7 +87,7 @@ const ShopHeader: React.FC<ShopHeaderPropsType> = (props) => {
<div className={styles.shop_header}> <div className={styles.shop_header}>
<div className={styles.shop_header_container}> <div className={styles.shop_header_container}>
<div className={styles.logo}> <div className={styles.logo}>
<a href="/"><img src={logo} /></a> <a href="/"><ImageBox width={145} height={50} imgUrl={logo} /></a>
</div> </div>
{ {
shopInfo ? ( shopInfo ? (
......
...@@ -302,7 +302,7 @@ const Order: React.FC<OrderPropsType> = (props) => { ...@@ -302,7 +302,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
/** /**
* 提交订单 * 提交订单
*/ */
const submitOrder = (signatureLogId?: number) => { const submitOrder = (signatureLogId?: number, contractUrl?: string) => {
const params: any = { const params: any = {
orderModel: getOrderMode(), // 下单模式 orderModel: getOrderMode(), // 下单模式
needTheInvoice: needTheInvoice ? 1 : 0, needTheInvoice: needTheInvoice ? 1 : 0,
...@@ -367,7 +367,10 @@ const Order: React.FC<OrderPropsType> = (props) => { ...@@ -367,7 +367,10 @@ const Order: React.FC<OrderPropsType> = (props) => {
if(signatureLogId) { if(signatureLogId) {
params.signatureLogId = signatureLogId params.signatureLogId = signatureLogId
params.electronicContractUrl = contractUrl,
params.electronicContractName = contractInfo.contractName
} }
setConfirmLoading(true) setConfirmLoading(true)
PublicApi.postOrderProcurementOrderAdd(params).then(res => { PublicApi.postOrderProcurementOrderAdd(params).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
...@@ -460,7 +463,7 @@ const Order: React.FC<OrderPropsType> = (props) => { ...@@ -460,7 +463,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
if (res.code === 1000) { if (res.code === 1000) {
if (res.data.state === 4) { if (res.data.state === 4) {
clearTimeout(timer) clearTimeout(timer)
submitOrder(signatureLogId) submitOrder(signatureLogId, res.data.contractUrl)
} else { } else {
timer = setTimeout(() => { timer = setTimeout(() => {
if (checkoutCount < 20) { if (checkoutCount < 20) {
......
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