Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
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
shenshaokai
jinfa-admin
Commits
a02edf8b
Commit
a02edf8b
authored
Sep 16, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:装修页面商品列表分页问题
parent
ce3422cb
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
6 deletions
+26
-6
index.tsx
...ingsPanel/propsSettings/components/BrandSetting/index.tsx
+3
-0
index.tsx
...opsSettings/components/CategoryreCommendSetting/index.tsx
+4
-0
index.tsx
...ingsPanel/propsSettings/components/GoodsSetting/index.tsx
+14
-4
index.tsx
...tingsPanel/propsSettings/components/ShopSetting/index.tsx
+3
-0
index.tsx
...ages/pageCustomized/settingsPanel/propsSettings/index.tsx
+1
-1
request.ts
src/utils/request.ts
+1
-1
No files found.
src/pages/pageCustomized/settingsPanel/propsSettings/components/BrandSetting/index.tsx
View file @
a02edf8b
...
@@ -112,6 +112,9 @@ const BrandSetting: React.FC<ShopSettingPropsType> = (props) => {
...
@@ -112,6 +112,9 @@ const BrandSetting: React.FC<ShopSettingPropsType> = (props) => {
if
(
selectBrandList
.
length
<=
0
)
{
if
(
selectBrandList
.
length
<=
0
)
{
message
.
error
(
"请选择要推荐的品牌"
)
message
.
error
(
"请选择要推荐的品牌"
)
return
return
}
else
if
(
selectBrandList
.
length
>
6
)
{
message
.
error
(
"最多推荐6个品牌"
)
return
}
}
setConfirmLoading
(
true
)
setConfirmLoading
(
true
)
saveBrand
().
then
(()
=>
{
saveBrand
().
then
(()
=>
{
...
...
src/pages/pageCustomized/settingsPanel/propsSettings/components/CategoryreCommendSetting/index.tsx
View file @
a02edf8b
...
@@ -111,6 +111,10 @@ const CategoryRecommendSetting: React.FC<CategoryRecommendSettingPropsType> = (p
...
@@ -111,6 +111,10 @@ const CategoryRecommendSetting: React.FC<CategoryRecommendSettingPropsType> = (p
reject
()
reject
()
return
return
}
}
if
(
selectKeys
.
length
>
3
)
{
message
.
error
(
'最多推荐3个二级品类'
)
return
}
let
param
=
{
let
param
=
{
templateId
:
templateid
,
templateId
:
templateid
,
categoryId
:
categoryid
,
categoryId
:
categoryid
,
...
...
src/pages/pageCustomized/settingsPanel/propsSettings/components/GoodsSetting/index.tsx
View file @
a02edf8b
import
React
,
{
useState
,
useEffect
}
from
'react'
import
React
,
{
useState
,
useEffect
}
from
'react'
import
{
clearSelectedStatus
,
changeProps
}
from
'lingxi-editor-core'
import
{
clearSelectedStatus
,
changeProps
}
from
'lingxi-editor-core'
import
{
Row
,
Col
,
Button
,
Input
,
Pagination
,
Select
,
Form
,
message
,
Modal
}
from
'antd'
import
{
Row
,
Col
,
Button
,
Input
,
Pagination
,
Select
,
Form
,
message
,
Modal
,
Spin
}
from
'antd'
import
SettingList
from
'../../../../components/SettingList'
import
SettingList
from
'../../../../components/SettingList'
import
GoodsItem
from
'./GoodsItem'
import
GoodsItem
from
'./GoodsItem'
import
SettingPanel
from
'../../../../components/SettingPanel'
import
SettingPanel
from
'../../../../components/SettingPanel'
...
@@ -42,6 +42,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
...
@@ -42,6 +42,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
const
[
goodsIds
,
setGoodsIds
]
=
useState
<
any
>
([])
const
[
goodsIds
,
setGoodsIds
]
=
useState
<
any
>
([])
const
[
totalCount
,
setTotalCount
]
=
useState
<
number
>
(
0
)
const
[
totalCount
,
setTotalCount
]
=
useState
<
number
>
(
0
)
const
[
filterParam
,
setFilterParam
]
=
useState
()
const
[
filterParam
,
setFilterParam
]
=
useState
()
const
[
spinLoading
,
setSpinLoading
]
=
useState
<
boolean
>
(
false
)
const
[
newProps
,
setNewProps
]
=
useState
(
props
)
const
[
newProps
,
setNewProps
]
=
useState
(
props
)
const
[
categoryResponseList
,
setCategoryResponseList
]
=
useState
<
any
>
([])
const
[
categoryResponseList
,
setCategoryResponseList
]
=
useState
<
any
>
([])
...
@@ -66,10 +67,12 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
...
@@ -66,10 +67,12 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
categoryId
:
categoryid
,
categoryId
:
categoryid
,
templateId
:
templateid
templateId
:
templateid
}
}
setSpinLoading
(
true
)
//@ts-ignore
//@ts-ignore
PublicApi
.
getTemplatePlatformFindCategoryList
(
param
).
then
(
res
=>
{
PublicApi
.
getTemplatePlatformFindCategoryList
(
param
).
then
(
res
=>
{
const
data
=
res
.
data
const
data
=
res
.
data
setCategoryResponseList
(
data
.
categoryBOList
||
[])
setCategoryResponseList
(
data
.
categoryBOList
||
[])
setSpinLoading
(
false
)
})
})
}
}
...
@@ -139,9 +142,13 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
...
@@ -139,9 +142,13 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
const
handlePageChange
=
(
page
:
number
,
pageSize
?:
number
|
undefined
)
=>
{
const
handlePageChange
=
(
page
:
number
,
pageSize
?:
number
|
undefined
)
=>
{
setCurrent
(
page
)
setCurrent
(
page
)
setPageSize
(
pageSize
||
10
)
setPageSize
(
pageSize
||
10
)
fetchGoodsList
()
}
}
useEffect
(()
=>
{
fetchGoodsList
()
},
[
current
,
pageSize
])
const
handleSearch
=
()
=>
{
const
handleSearch
=
()
=>
{
setCurrent
(
1
)
setCurrent
(
1
)
console
.
log
(
form
.
getFieldsValue
())
console
.
log
(
form
.
getFieldsValue
())
...
@@ -168,6 +175,9 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
...
@@ -168,6 +175,9 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
if
(
selectGoodsList
.
length
<=
0
)
{
if
(
selectGoodsList
.
length
<=
0
)
{
message
.
error
(
"请选择要推荐的商品"
)
message
.
error
(
"请选择要推荐的商品"
)
return
return
}
else
if
(
selectGoodsList
.
length
>
10
)
{
message
.
error
(
"最多推荐10件商品"
)
return
}
}
setConfirmLoading
(
true
)
setConfirmLoading
(
true
)
let
newList
=
JSON
.
parse
(
JSON
.
stringify
(
selectGoodsList
))
let
newList
=
JSON
.
parse
(
JSON
.
stringify
(
selectGoodsList
))
...
@@ -361,7 +371,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
...
@@ -361,7 +371,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
</
SettingList
>
</
SettingList
>
</>
</>
)
:
(
)
:
(
<>
<
Spin
spinning=
{
spinLoading
}
>
<
SettingList
type=
"select"
>
<
SettingList
type=
"select"
>
{
{
(
noSelectGoods
&&
noSelectGoods
.
length
>
0
)
&&
noSelectGoods
.
map
(
item
=>
(
(
noSelectGoods
&&
noSelectGoods
.
length
>
0
)
&&
noSelectGoods
.
map
(
item
=>
(
...
@@ -381,7 +391,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
...
@@ -381,7 +391,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
showTotal=
{
total
=>
`共 ${totalCount} 条`
}
showTotal=
{
total
=>
`共 ${totalCount} 条`
}
/>
/>
</
div
>
</
div
>
</>
</
Spin
>
)
)
}
}
...
...
src/pages/pageCustomized/settingsPanel/propsSettings/components/ShopSetting/index.tsx
View file @
a02edf8b
...
@@ -113,6 +113,9 @@ const ShopSetting: React.FC<ShopSettingPropsType> = (props) => {
...
@@ -113,6 +113,9 @@ const ShopSetting: React.FC<ShopSettingPropsType> = (props) => {
if
(
selectShopsList
.
length
<=
0
)
{
if
(
selectShopsList
.
length
<=
0
)
{
message
.
error
(
"请选择要推荐的店铺"
)
message
.
error
(
"请选择要推荐的店铺"
)
return
return
}
else
if
(
selectShopsList
.
length
>
5
)
{
message
.
error
(
"最多推荐5个店铺"
)
return
}
}
setConfirmLoading
(
true
)
setConfirmLoading
(
true
)
saveShop
().
then
(()
=>
{
saveShop
().
then
(()
=>
{
...
...
src/pages/pageCustomized/settingsPanel/propsSettings/index.tsx
View file @
a02edf8b
...
@@ -65,7 +65,7 @@ const PropsSettings: React.FC<PropsSettingsPropsType> = (props) => {
...
@@ -65,7 +65,7 @@ const PropsSettings: React.FC<PropsSettingsPropsType> = (props) => {
return
(
return
(
<
Drawer
<
Drawer
//
maskClosable={false}
maskClosable=
{
false
}
title=
{
drawerTitle
}
title=
{
drawerTitle
}
placement=
"right"
placement=
"right"
onClose=
{
onClose
}
onClose=
{
onClose
}
...
...
src/utils/request.ts
View file @
a02edf8b
...
@@ -98,7 +98,7 @@ class ApiRequest {
...
@@ -98,7 +98,7 @@ class ApiRequest {
// }
// }
removeAuth
()
removeAuth
()
removeRouters
()
removeRouters
()
history
.
replace
(
'/login'
)
window
.
location
.
replace
(
'/login'
)
message
.
destroy
()
message
.
destroy
()
message
.
error
(
res
.
message
)
message
.
error
(
res
.
message
)
return
false
return
false
...
...
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