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
21f1876a
Commit
21f1876a
authored
Sep 26, 2020
by
前端-许佳敏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev
parents
8fba57ec
292c5e8b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
index.tsx
src/pages/commodity/products/index.tsx
+17
-11
No files found.
src/pages/commodity/products/index.tsx
View file @
21f1876a
...
...
@@ -54,6 +54,7 @@ let timeChange: any;
const
Products
:
React
.
FC
<
{}
>
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
judgeShopRef
=
useRef
<
boolean
>
(
true
)
const
[
upForm
]
=
Form
.
useForm
()
const
[
selectRow
,
setSelectRow
]
=
useState
<
Item
[]
>
([])
// 模态框选择的行数据
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
string
>>
([])
...
...
@@ -439,17 +440,22 @@ const Products: React.FC<{}> = () => {
const
onChangeUpShop
=
(
values
)
=>
{
// 判断上架之前是否有店铺 有即可以上下架
PublicApi
.
getTemplateShopFindShop
().
then
(
res
=>
{
if
(
res
.
data
.
id
){
setShopId
(
res
.
data
.
id
)
setCheckedValues
(
values
)
}
else
{
message
.
error
(
'您还还未创建店铺,请先创建店铺!'
)
setTimeout
(()
=>
{
history
.
push
(
'/memberCenter/shopAbility/infoManage'
)
},
1000
)
}
})
if
(
judgeShopRef
.
current
){
PublicApi
.
getTemplateShopFindShop
().
then
(
res
=>
{
if
(
res
.
data
.
id
){
setShopId
(
res
.
data
.
id
)
setCheckedValues
(
values
)
}
else
{
message
.
error
(
'您还还未创建店铺,请先创建店铺!'
)
setTimeout
(()
=>
{
history
.
push
(
'/memberCenter/shopAbility/infoManage'
)
},
1000
)
}
})
judgeShopRef
.
current
=
false
}
else
{
setCheckedValues
(
values
)
}
}
const
clickUp
=
(
param
:
any
,
id
:
any
)
=>
{
// param: 0 下架 1上架
...
...
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