Commit 4d18cc22 authored by 前端-许佳敏's avatar 前端-许佳敏
parents 52bf5ecd 3d8ece6d
......@@ -30,6 +30,7 @@ const UserHeader: React.FC<UserHeaderProps> = (props) => {
setTitle("欢迎注册")
break
case '/user/getBack':
case '/user/forget':
setTitle("找回密码")
break
}
......
......@@ -313,10 +313,9 @@ const CommodityDetail = (props) => {
if (clickFlag) {
clickFlag = false
PublicApi.postOrderIsWorkFlow({ productIds: [selectCommodityId] }).then(res => {
PublicApi.postOrderDirectPayment({ productId: selectCommodityId }).then(res => {
message.destroy()
if (res.code === 1000) {
message.destroy()
let buyCommodityInfo = {
id: selectCommodityId,
count: buyCount,
......@@ -329,9 +328,10 @@ const CommodityDetail = (props) => {
category: commodityDetail.customerCategory.name,
brand: commodityDetail.brand.name,
stockCount: stockCount,
commodityPic: attrAndValList.commodityPic[0],
commodityPic: attrAndValList.commodityPic ? attrAndValList.commodityPic[0] : '',
attribute: attrAndValList.attributeAndValueList
}
let sessionKey = `${commodityDetail.id}${new Date().getTime()}`
let buyOrderInfo = {
......@@ -345,15 +345,17 @@ const CommodityDetail = (props) => {
orderList: [buyCommodityInfo]
}]
}
updateOrderInfo(buyOrderInfo, sessionKey).then(() => {
history.push(getOrderLink(sessionKey, priceType))
if (res.data) {
window.location.href = getOrderLink(sessionKey, priceType)
} else {
window.location.href = `/memberCenter/tranactionAbility/purchaseOrder/orderDetail?modelType=5&spam_id=${sessionKey}`
}
})
} else {
clickFlag = true
}
}).catch(() => {
clickFlag = true
})
}
......@@ -578,6 +580,7 @@ const CommodityDetail = (props) => {
if (parameter) {
unitPrice = unitPrice * parameter
}
return unitPrice
}
......
......@@ -293,12 +293,14 @@ const Order: React.FC<OrderPropsType> = (props) => {
setConfirmLoading(true)
PublicApi.postOrderProcurementOrderAdd(params).then(res => {
if (res.code === 1000) {
if (res.data.isPay === 1) {
const data = res.data
history.push(`/pay?orderId=${data.orderId}`)
} else {
history.push(`/memberCenter/tranactionAbility/purchaseOrder/orderDetail?modelType=5&spam_id=${spam_id}`)
}
const data = res.data
history.push(`/pay?orderId=${data.orderId}`)
// if (res.data.isPay === 1) {
// const data = res.data
// history.push(`/pay?orderId=${data.orderId}`)
// } else {
// history.push(`/memberCenter/tranactionAbility/purchaseOrder/orderDetail?modelType=5&spam_id=${spam_id}`)
// }
}
setConfirmLoading(false)
}).catch(() => {
......
......@@ -478,9 +478,18 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
message.destroy()
setConfirmLoading(false)
if (res.code === 1000) {
let sessionKey = `${selectItem.id}${new Date().getTime()}`
updateOrderInfo(buyOrderInfo, sessionKey).then(() => {
history.push(`/order?spam_id=${sessionKey}&scence=purchase`)
PublicApi.postOrderDirectPayment({ productId: productIds[0] }).then(res => {
message.destroy()
if (res.code === 1000) {
let sessionKey = `${selectItem.id}${new Date().getTime()}`
updateOrderInfo(buyOrderInfo, sessionKey).then(() => {
if (res.data) {
window.location.href = `/order?spam_id=${sessionKey}&scence=purchase`
} else {
window.location.href = `/memberCenter/tranactionAbility/purchaseOrder/orderDetail?modelType=5&spam_id=${sessionKey}`
}
})
}
})
}
setConfirmLoading(false)
......
......@@ -180,7 +180,6 @@ const UserForgetPwd = () => {
return (
<div className={cx(styles.register, globalStyles.lingxiBusinessContent1024)}>
<h3>找回密码</h3>
<div className={cx(styles.registerBox, globalStyles.lingxiBusinessMarginContent)}>
<NiceForm
id='registerForm'
......
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