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
868422dd
Commit
868422dd
authored
Feb 16, 2022
by
前端-黄佳鑫
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
b03a2016
15956043
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
7 deletions
+40
-7
useSaveData.ts
...anagement/activePage/fixtures/common/hooks/useSaveData.ts
+5
-5
web.tsx
...ment/activePage/fixtures/components/ComponentTree/web.tsx
+32
-0
request.ts
src/utils/request.ts
+3
-2
No files found.
src/pages/transaction/marketingAbility/marketingActivitiesManagement/activePage/fixtures/common/hooks/useSaveData.ts
View file @
868422dd
...
...
@@ -160,15 +160,15 @@ function useSaveData(options: Options) {
}
// console.log(withThemeStyle);
// return;
const
{
data
,
code
}
=
await
postTemplateWebActivityPageAdorn
({
const
{
data
,
code
,
message
:
msg
}
=
await
postTemplateWebActivityPageAdorn
({
id
:
+
id
,
adornContent
:
withThemeStyle
}
as
any
);
setSaving
(
false
);
if
(
code
=
==
1000
)
{
// history.goBack();
message
.
success
(
"修改成功"
)
}
// if (code !
== 1000) {
//
// history.goBack();
// message.error(msg
)
//
}
}
return
{
saving
,
onSave
};
...
...
src/pages/transaction/marketingAbility/marketingActivitiesManagement/activePage/fixtures/components/ComponentTree/web.tsx
View file @
868422dd
...
...
@@ -350,6 +350,38 @@ const WebComponentModule: React.FC<Iprops> = (props: Iprops) => {
const
newKey
=
childNodes
[
childNodes
.
length
-
1
]
+
1
if
(
platform
===
'mobile'
&&
_item
===
'combination'
)
{
addChildComponent
({
newKey
:
`
${
newKey
}
`
,
componentName
:
COMPONENT_NAME
[
_item
][
platform
][
'container'
],
parentPropName
:
''
,
parentKey
:
'0'
,
childProps
:
{
addBtnText
:
"添加子节点"
,
canDelete
:
true
,
childComponentName
:
COMPONENT_NAME
[
_item
][
platform
][
'childContainer'
],
childNodes
:
[],
childProps
:
{
addBtnText
:
"添加组合促销节点"
,
canDelete
:
true
,
childComponentName
:
'Combination.Item'
,
otherProps
:
{
type
:
`combinationItemProduct`
},
childProps
:
{
otherProps
:
{
type
:
`combinationItem`
},
}
},
otherProps
:
{
type
:
_item
},
props
:
{
visible
:
true
,
theme
:
0
,
title
:
ACTIVITYS_MAP
[
_item
].
title
},
title
:
ACTIVITYS_MAP
[
_item
].
title
,
}
})
return
;
}
addChildComponent
({
newKey
:
`
${
newKey
}
`
,
componentName
:
COMPONENT_NAME
[
_item
][
platform
][
'container'
],
...
...
src/utils/request.ts
View file @
868422dd
...
...
@@ -27,7 +27,6 @@ type httpStatus = {
[
key
:
number
]:
string
}
const
intl
=
getIntl
()
const
errorMessage
:
httpStatus
=
{
400
:
"发出的请求有错误,服务器没有进行新建或修改数据的操作。"
,
401
:
"用户没有权限(令牌、用户名、密码错误)。"
,
...
...
@@ -129,6 +128,8 @@ class ApiRequest {
createRequest
<
T
>
(
url
:
string
,
options
:
IApiRequest
=
{
ctlType
:
'none'
}):
Promise
<
IRequestSuccess
<
T
>>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
intl
=
getIntl
()
baseRequest
<
IRequestSuccess
<
T
>>
(
url
,
options
).
then
(
res
=>
{
// 登录验证
if
(
res
.
code
===
1101
)
{
...
...
@@ -144,7 +145,7 @@ class ApiRequest {
if
(
options
.
ctlType
===
'message'
)
{
message
.
destroy
()
}
options
.
ctlType
===
'message'
&&
message
.
success
(
res
.
message
)
options
.
ctlType
===
'message'
&&
message
.
success
(
intl
.
formatMessage
({
id
:
`
${
res
.
code
}
`
,
defaultMessage
:
res
.
message
})
)
resolve
(
res
)
}
else
{
// 使用resolve将数据返回, 请求时需手动处理data为null的情况
...
...
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