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
linweijiong
jinfa-platform
Commits
3bff5f16
Commit
3bff5f16
authored
Sep 27, 2021
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改品类导航页
parent
344c7709
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
18 deletions
+6
-18
useFilterSameOption.tsx
...e/categoryNavigation/common/hooks/useFilterSameOption.tsx
+0
-1
useGetLayout.tsx
...Template/categoryNavigation/common/hooks/useGetLayout.tsx
+0
-10
index.tsx
...e/categoryNavigation/components/CommodityDrawer/index.tsx
+0
-4
index.tsx
...eTemplate/categoryNavigation/components/Toolbar/index.tsx
+1
-1
index.tsx
src/pages/mobileTemplate/categoryNavigation/index.tsx
+5
-2
No files found.
src/pages/mobileTemplate/categoryNavigation/common/hooks/useFilterSameOption.tsx
View file @
3bff5f16
...
...
@@ -63,7 +63,6 @@ export function useFilterSameOption() {
});
});
});
console
.
log
(
result
);
return
result
;
},
[
pageConfig
]);
...
...
src/pages/mobileTemplate/categoryNavigation/common/hooks/useGetLayout.tsx
View file @
3bff5f16
...
...
@@ -2,19 +2,9 @@ import React, { useEffect, useState } from 'react';
import
{
updatePageConfig
}
from
'@lingxi-disign/core'
;
import
{
cloneDeep
}
from
'lodash'
;
import
pageConfig
from
'../schema/pageConfig'
;
import
mock
from
'../mock/index.json'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
const
getData
=
async
()
=>
{
const
random
=
Math
.
floor
(
Math
.
random
()
*
3
)
+
1
;
return
new
Promise
((
resolve
)
=>
{
setTimeout
(()
=>
{
resolve
(
mock
);
},
random
);
});
};
function
useGetLayout
()
{
const
[
info
,
setInfo
]
=
useState
<
any
>
(
null
);
const
{
id
}
=
usePageStatus
();
...
...
src/pages/mobileTemplate/categoryNavigation/components/CommodityDrawer/index.tsx
View file @
3bff5f16
...
...
@@ -18,10 +18,6 @@ import StatusTag from '@/components/StatusTag';
import
CustomInputSearch
from
'@/components/NiceForm/components/CustomInputSearch'
;
import
CustomCategorySearch
from
'@/components/NiceForm/components/CustomCategorySearch'
;
// import ActivityImage from '@/pages/pageCustomized/icons/ActivityImage.svg';
interface
CommodityDrawerProps
{
visible
:
boolean
,
onClose
:
()
=>
void
,
...
...
src/pages/mobileTemplate/categoryNavigation/components/Toolbar/index.tsx
View file @
3bff5f16
...
...
@@ -14,7 +14,7 @@ const Toolbar: React.FC<Iprops> = (props: Iprops) => {
Modal
.
confirm
({
title
:
'确认离开装修页?'
,
onOk
:
()
=>
{
history
.
goBac
K
()
history
.
goBac
k
()
},
})
// history.goBack();
...
...
src/pages/mobileTemplate/categoryNavigation/index.tsx
View file @
3bff5f16
...
...
@@ -75,7 +75,7 @@ const CategoryNavigation = () => {
},
[
info
]);
const
onSave
=
async
(
pageConfig
,
rest
)
=>
{
const
hasRequestTabKey
=
rest
.
hasRequestTabKey
.
map
((
_item
:
string
)
=>
_item
.
match
(
/id_
(
.*
)\/\.\$(\d
+
)
/
)?.[
1
]);
const
hasRequestTabKey
=
rest
.
hasRequestTabKey
.
map
((
_item
:
string
)
=>
_item
.
match
(
/id_
(
.*
)\/\.\$(\d
+
)
/
)?.[
1
])
||
[]
;
/** domKey 从7开始都是tab 的值 */
const
tabChildren
=
pageConfig
[
4
].
childNodes
.
slice
(
1
);
...
...
@@ -85,6 +85,9 @@ const CategoryNavigation = () => {
return
;
}
const
{
id
,
name
,
visible
=
true
}
=
pageConfig
[
_nodeKey
].
props
;
if
(
!
id
)
{
return
;
}
if
(
!
hasRequestTabKey
.
includes
(
id
.
toString
()))
{
return
dataSourceFromRequest
[
id
];
}
...
...
@@ -114,7 +117,7 @@ const CategoryNavigation = () => {
tabProps
[
'children'
]
=
tabItemData
;
return
tabProps
;
});
const
postData
=
{
style
:
0
,
category
:
result
};
const
postData
=
{
style
:
0
,
category
:
result
.
filter
(
Boolean
)
};
const
{
data
,
code
}
=
await
PublicApi
.
postTemplateAdornAppChannelSave
({
templateId
:
Number
(
id
),
categoryAdornContent
:
postData
as
any
,
...
...
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