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
e8c20cc3
Commit
e8c20cc3
authored
May 10, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 处理新增商品直接点图片上传页面异常问题
parent
cae4295a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
productImageForm.tsx
...s/commodity/products/addProductsItem/productImageForm.tsx
+6
-1
No files found.
src/pages/commodity/products/addProductsItem/productImageForm.tsx
View file @
e8c20cc3
...
...
@@ -209,7 +209,8 @@ const ProductImageForm: React.FC<{}> = (props) => {
uploadFileSelectRef
.
current
=
{}
}
setCommonImageList
(
fileList
)
// @5.10 commodityPic字段异常 表明前面商品信息未完善 使用trycatch捕获
try
{
_priceAttributeParams
[
index
||
editRowIndexRef
.
current
].
commodityPic
=
fileList
if
(
!
file
?.
status
&&
file
?.
status
!==
'done'
){
let
ttt
=
_priceAttributeParams
[
index
||
editRowIndexRef
.
current
].
commodityPic
.
filter
(
_
=>
_
.
status
===
'done'
)
...
...
@@ -220,6 +221,10 @@ const ProductImageForm: React.FC<{}> = (props) => {
setProductAttributeAndImageParams
(
_priceAttributeParams
)
// 保留上传的数据在页面状态 用于处理前面价格变动后不重新更新图片数据
setMaintainImageData
(
_priceAttributeParams
.
map
(
item
=>
item
.
commodityPic
))
}
catch
(
error
)
{
console
.
log
(
error
)
// message.error('请先完善前面商品相关信息')
}
}
const
onChangeSetImageType
=
(
e
)
=>
{
...
...
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