Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄庭坚
jinfa-platform
Commits
ec0e609d
Commit
ec0e609d
authored
Dec 15, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 下单页面商品名称拼接规格
parent
65ed174f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
index.tsx
src/pages/lxMall/order/index.tsx
+12
-2
No files found.
src/pages/lxMall/order/index.tsx
View file @
ec0e609d
...
...
@@ -286,6 +286,17 @@ const Order: React.FC<OrderPropsType> = (props) => {
return
mode
}
const
getProductNameAndAttr
=
(
productInfo
:
any
)
=>
{
const
attribute
=
productInfo
.
attribute
let
attributeName
=
""
let
productName
=
productInfo
.
name
if
(
attribute
&&
attribute
.
length
>
0
)
{
attributeName
=
attribute
.
map
(
item
=>
item
.
customerAttributeValue
.
value
).
join
(
"/"
)
productName
=
`
${
productName
}
/
${
attributeName
}
`
}
return
productName
}
/**
* 提交订单
*/
...
...
@@ -317,7 +328,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
purchaseIds
.
push
(
orderItem
.
purchaseId
)
temp
.
imgUrl
=
orderItem
.
commodityPic
temp
.
productId
=
orderItem
.
id
temp
.
productName
=
orderItem
.
name
temp
.
productName
=
getProductNameAndAttr
(
orderItem
)
temp
.
unit
=
orderItem
.
unitName
temp
.
price
=
orderItem
.
unitPrice
temp
.
purchaseCount
=
orderItem
.
count
...
...
@@ -355,7 +366,6 @@ const Order: React.FC<OrderPropsType> = (props) => {
if
(
signatureLogId
)
{
params
.
signatureLogId
=
signatureLogId
}
setConfirmLoading
(
true
)
PublicApi
.
postOrderProcurementOrderAdd
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment