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
XieZhiXiong
jinfa-platform
Commits
d35603ab
Commit
d35603ab
authored
Feb 16, 2022
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into v2
parents
d8f93c3e
2b3f2fb3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
65 additions
and
17 deletions
+65
-17
env.js
env.js
+1
-1
index.tsx
src/pages/transaction/components/orderPayTabs/index.tsx
+6
-0
useGetLayout.ts
...nagement/activePage/fixtures/common/hooks/useGetLayout.ts
+0
-0
useGetSameKeys.tsx
...ement/activePage/fixtures/common/hooks/useGetSameKeys.tsx
+17
-1
useSaveData.ts
...anagement/activePage/fixtures/common/hooks/useSaveData.ts
+17
-8
editPanelForm.tsx
...ctivePage/fixtures/components/EditPanel/editPanelForm.tsx
+11
-2
index.less
...vePage/fixtures/components/Layouts/Combination/index.less
+2
-2
index.tsx
...ivePage/fixtures/components/Layouts/Combination/index.tsx
+7
-2
index.tsx
...ePage/fixtures/components/Layouts/CommodityList/index.tsx
+4
-1
No files found.
env.js
View file @
d35603ab
...
...
@@ -75,7 +75,7 @@ module.exports = {
SITE_ID
:
'1'
,
BACK_GATEWAY
:
'http://10.0.0.17:8100'
,
USE_ROUTE_CONFIG
:
true
,
SOCKET_URL
:
'ws://10.0.0.17:
810
0'
,
SOCKET_URL
:
'ws://10.0.0.17:
988
0'
,
YAPI_URL
:
'http://10.0.0.25:4000/'
,
// 注 交付中心同事可不使用下面的ssh配置
ssh
:
JSON
.
stringify
({
...
...
src/pages/transaction/components/orderPayTabs/index.tsx
View file @
d35603ab
...
...
@@ -185,6 +185,12 @@ const OrderPayTabs: React.FC<OrderPayTabsProps> = () => {
key
:
'outerStatusName'
,
},
{
title
:
intl
.
formatMessage
({
id
:
'transaction_components.neibuzhuangtai'
}),
dataIndex
:
'innerStatusName'
,
align
:
'center'
,
key
:
'innerStatusName'
,
},
{
title
:
intl
.
formatMessage
({
id
:
'transaction_components.zhifubili'
}),
key
:
'payRate'
,
dataIndex
:
'payRate'
,
...
...
src/pages/transaction/marketingAbility/marketingActivitiesManagement/activePage/fixtures/common/hooks/useGetLayout.ts
View file @
d35603ab
This diff is collapsed.
Click to expand it.
src/pages/transaction/marketingAbility/marketingActivitiesManagement/activePage/fixtures/common/hooks/useGetSameKeys.tsx
View file @
d35603ab
...
...
@@ -80,10 +80,26 @@ const useGetSameKeys = () => {
result
[
dataIndex
]
=
[];
}
if
(
dataIndex
===
'combination'
)
{
/** combination 单独处理, 这里不使用递归了 */
childNodes
?.
forEach
((
_son
,
_index
)
=>
{
const
sonElement
=
pageConfig
[
_son
];
result
[
`combination_
${
_index
}
`
]
=
[];
sonElement
?.
childNodes
?.
forEach
((
_row
)
=>
{
const
rowData
=
pageConfig
[
_row
];
result
[
`combination_
${
_index
}
`
].
push
(
`
${
rowData
?.
props
?.
id
}
_$
{
rowData
?.
props
?.
activityId
}
`
);
});
});
return;
}
if (dataIndex !== 'suggestProduct') {
childNodes?.forEach((_son) => {
const sonElement = pageConfig[_son];
const
formatedData
=
formatProps
[
dataIndex
]?.(
sonElement
.
props
);
const formatedData = formatProps[dataIndex]?.(sonElement
?.props || {}
);
if (formatProps) {
result[dataIndex].push(formatedData);
}
...
...
src/pages/transaction/marketingAbility/marketingActivitiesManagement/activePage/fixtures/common/hooks/useSaveData.ts
View file @
d35603ab
import
{
ACTIVITY_LIST
}
from
'@/constants/activity'
;
import
{
postTemplateWebActivityPageAdorn
}
from
'@/services/TemplateV2Api'
;
import
{
CodeSandboxCircleFilled
}
from
'@ant-design/icons'
;
import
{
message
}
from
'antd'
;
import
{
omit
,
pick
}
from
'lodash'
;
import
{
useState
}
from
'react'
;
import
{
history
}
from
'umi'
;
...
...
@@ -101,7 +102,7 @@ function useSaveData(options: Options) {
childrenData
:
childrenData
}
});
}
else
if
(
ACTIVITY_LIST
.
includes
(
dataIndex
as
ACTIVITY_KEYS
))
{
}
else
if
(
ACTIVITY_LIST
.
includes
(
dataIndex
as
ACTIVITY_KEYS
)
&&
dataIndex
!==
'combination'
)
{
const
{
...
otherProps
}
=
props
||
{};
const
childrenData
=
childNodes
.
map
((
_record
)
=>
{
const
childTargetProps
=
pageConfig
[
_record
].
props
;
...
...
@@ -116,31 +117,36 @@ function useSaveData(options: Options) {
childrenData
:
childrenData
}
});
}
else
if
(
dataIndex
===
'suggestProduct'
)
{
}
else
if
(
dataIndex
===
'suggestProduct'
||
dataIndex
===
'combination'
)
{
const
{
...
otherProps
}
=
props
||
{};
const
{
childNodes
}
=
target
;
const
temp
=
{
sort
:
sort
,
props
:
{
visible
:
otherProps
.
status
??
true
,
title
:
otherProps
.
title
,
childrenData
:
childNodes
?.
filter
((
_record
)
=>
/
\d
+-
\d
+/
.
test
(
_record
)).
map
((
_row
)
=>
{
const
childrenNodeTarget
=
pageConfig
[
_row
];
const
{
...
childRestProps
}
=
childrenNodeTarget
?.
props
;
return
{
title
:
childRestProps
.
title
,
theme
:
childRestProps
.
theme
||
0
,
childrenData
:
childrenNodeTarget
.
childNodes
?.
map
((
_listItem
)
=>
{
const
childrenData
=
childrenNodeTarget
.
childNodes
?.
map
((
_listItem
)
=>
{
const
sonNodeTarget
=
pageConfig
[
_listItem
];
if
(
dataIndex
===
'suggestProduct'
)
{
return
{
id
:
sonNodeTarget
?.
props
.
id
,
label
:
sonNodeTarget
?.
props
?.
label
||
[]
};
}
return
sonNodeTarget
?.
props
.
id
})
return
{
title
:
childRestProps
.
title
,
theme
:
childRestProps
.
theme
||
0
,
childrenData
:
childrenData
};
})
}
};
result
=
generaterData
(
result
,
'suggestProduct'
,
temp
);
result
=
generaterData
(
result
,
dataIndex
,
temp
);
}
});
const
withThemeStyle
=
{
...
...
@@ -152,13 +158,16 @@ function useSaveData(options: Options) {
}
}
}
// console.log(withThemeStyle);
// return;
const
{
data
,
code
}
=
await
postTemplateWebActivityPageAdorn
({
id
:
+
id
,
adornContent
:
withThemeStyle
}
as
any
);
setSaving
(
false
);
if
(
code
===
1000
)
{
history
.
goBack
();
// history.goBack();
message
.
success
(
"修改成功"
)
}
}
...
...
src/pages/transaction/marketingAbility/marketingActivitiesManagement/activePage/fixtures/components/EditPanel/editPanelForm.tsx
View file @
d35603ab
...
...
@@ -116,7 +116,11 @@ const EditPanelForm = () => {
},
};
/** 如果是活动子集, 那么现实选择活动商品 */
if
(
activityListItem
.
includes
(
componentType
)
||
componentType
===
'hotItem'
||
componentType
===
'suggestProductItem'
)
{
if
(
activityListItem
.
includes
(
componentType
)
||
componentType
===
'hotItem'
||
componentType
===
'suggestProductItem'
)
{
setFormValue
({
product
:
{
...
selectedInfo
.
props
,
...
...
@@ -146,10 +150,15 @@ const EditPanelForm = () => {
// console.log(hotItem".substring(0, 1));
formActions
.
setFieldState
(
'product'
,
(
fieldState
)
=>
{
const
[,
parentKey
]
=
selectedInfo
.
parentKey
.
split
(
'-'
);
const
disabledKeys
=
componentType
===
'suggestProductItem'
?
sameKeys
[
`suggestProduct_
${
parseInt
(
parentKey
)
-
1
}
`
]
:
componentType
===
'combinationItem'
?
sameKeys
[
`combination_
${
parseInt
(
parentKey
)
-
1
}
`
]
:
sameKeys
[
`
${
componentType
?.
substring
(
0
,
componentType
.
length
-
4
)}
`] || [];
FormPath.setIn(fieldState, 'props.x-component-props', {
activityImage: activityImage,
...activityType,
disabledKeys
:
componentType
===
'suggestProductItem'
?
sameKeys
[
`suggestProduct_
${
parseInt
(
parentKey
)
-
1
}
`
]
:
sameKeys
[
`
${
componentType
?.
substring
(
0
,
componentType
.
length
-
4
)}
`] || []
,
disabledKeys:
disabledKeys
,
...isWithLabels,
minType: isWithMinType,
// fetchOptions: fetchMemberOptions,
...
...
src/pages/transaction/marketingAbility/marketingActivitiesManagement/activePage/fixtures/components/Layouts/Combination/index.less
View file @
d35603ab
.combiantion {
margin-
top: 24
px;
padding: 0
8
px;
margin-
bottom: 12
px;
padding: 0
0
px;
.title {
font-size: 20px;
color: #fff;
...
...
src/pages/transaction/marketingAbility/marketingActivitiesManagement/activePage/fixtures/components/Layouts/Combination/index.tsx
View file @
d35603ab
...
...
@@ -17,6 +17,11 @@ interface Iprops {
const
Combination
:
React
.
FC
<
Iprops
>
&
{
Item
:
typeof
CombinationItem
}
=
(
props
:
Iprops
)
=>
{
const
{
children
,
className
,
title
,
theme
,
status
=
true
,
...
other
}
=
props
;
const
visible
=
status
const
{
onClick
,
onMouseOver
,
getOperateState
}
=
props
as
any
;
const
divProps
=
{
onClick
,
onMouseOver
};
const
classNameStr
=
cx
(
styles
.
combiantion
,
className
,
{
[
styles
.
hide
]:
!
visible
});
const
omitGetOperateState
=
omit
(
other
,
'getOperateState'
)
...
...
@@ -38,8 +43,8 @@ const Combination: React.FC<Iprops> & { Item: typeof CombinationItem } = (props:
};
return
(
<
div
className=
{
classNameStr
}
{
...
omitGetOperateState
}
>
<
p
className=
{
styles
.
title
}
>
{
title
}
</
p
>
<
div
className=
{
classNameStr
}
{
...
divProps
}
>
{
/* <p className={styles.title}>{title}</p> */
}
<
div
className=
{
styles
.
container
}
>
<
div
className=
{
styles
[
'container-title'
]
}
>
以下商品认选2件,只需800元
</
div
>
{
renderChildren
()
}
...
...
src/pages/transaction/marketingAbility/marketingActivitiesManagement/activePage/fixtures/components/Layouts/CommodityList/index.tsx
View file @
d35603ab
...
...
@@ -125,7 +125,10 @@ const CommodityItem: React.FC<Iprops> = (props: Iprops) => {
...
otherRestProps
}
=
rest
as
any
;
const
activityLabel
=
activityList
?.
find
((
_item
)
=>
_item
.
id
===
activityId
);
const
withLabel
=
activityLabel
&&
activityLabel
.
label
?
{
tags
:
[
activityLabel
.
label
]}
:
{};
const
tags
=
{
tags
:
otherRestProps
?.
label
||
[]
}
const
withLabel
=
activityLabel
&&
activityLabel
.
label
?
{
tags
:
[
activityLabel
.
label
,
...
tags
.
tags
]}
:
tags
;
const
horizontalData
=
{
name
,
image
,
...
...
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