Commit 15956043 authored by XieZhiXiong's avatar XieZhiXiong
parents 714ab977 9f5aab62
...@@ -160,15 +160,15 @@ function useSaveData(options: Options) { ...@@ -160,15 +160,15 @@ function useSaveData(options: Options) {
} }
// console.log(withThemeStyle); // console.log(withThemeStyle);
// return; // return;
const { data, code } = await postTemplateWebActivityPageAdorn({ const { data, code, message: msg } = await postTemplateWebActivityPageAdorn({
id: +id, id: +id,
adornContent: withThemeStyle adornContent: withThemeStyle
} as any); } as any);
setSaving(false); setSaving(false);
if (code === 1000) { // if (code !== 1000) {
// history.goBack(); // // history.goBack();
message.success("修改成功") // message.error(msg)
} // }
} }
return { saving, onSave }; return { saving, onSave };
......
...@@ -350,6 +350,38 @@ const WebComponentModule: React.FC<Iprops> = (props: Iprops) => { ...@@ -350,6 +350,38 @@ const WebComponentModule: React.FC<Iprops> = (props: Iprops) => {
const newKey = childNodes[childNodes.length - 1] + 1 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({ addChildComponent({
newKey: `${newKey}`, newKey: `${newKey}`,
componentName: COMPONENT_NAME[_item][platform]['container'], componentName: COMPONENT_NAME[_item][platform]['container'],
......
...@@ -145,7 +145,7 @@ class ApiRequest { ...@@ -145,7 +145,7 @@ class ApiRequest {
if (options.ctlType === 'message') { if (options.ctlType === 'message') {
message.destroy() message.destroy()
} }
options.ctlType === 'message' && message.success(res.message) options.ctlType === 'message' && message.success(intl.formatMessage({ id: `${res.code}`, defaultMessage: res.message}))
resolve(res) resolve(res)
} else { } else {
// 使用resolve将数据返回, 请求时需手动处理data为null的情况 // 使用resolve将数据返回, 请求时需手动处理data为null的情况
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment