Commit 0247d06d authored by 邓超's avatar 邓超

fix: 修改文件管理api为oms

parent 6210d2d0
Pipeline #69979 passed with stages
......@@ -21,8 +21,8 @@ const ConfigWrapper = props => {
}
getConfigContent(value)
.then(res => {
if (res.success) {
setText(res.message);
if (res.code === 0) {
setText(res.data);
}
})
.catch(e => {
......@@ -46,7 +46,7 @@ const ConfigWrapper = props => {
if (!err) {
saveConfigContent(value, JSON.stringify(JSON.parse(text), null, 4))
.then(res => {
if (res.success) {
if (res.code === 0) {
notification.success({
message: '保存成功',
duration: 3,
......
......@@ -84,19 +84,29 @@ export const deleteWebMenu = param =>
export const getWebMenuInfo = param =>
get(`${PUBLISH_SERVICE}/PlatformCenter/GetMenuInfo?_version=9999`, param);
// export const saveConfigContent = (fileName, content) =>
// post(
// `${CITY_SERVICE}/OMS.svc/W4_SaveConfigContent?_version=9999&fileName=${fileName}`,
// qs.stringify({ web4ConfigContent: content }),
// {
// headers: {
// 'content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
// },
// },
// );
export const saveConfigContent = (fileName, content) =>
post(
`${CITY_SERVICE}/OMS.svc/W4_SaveConfigContent?_version=9999&fileName=${fileName}`,
qs.stringify({ web4ConfigContent: content }),
{
headers: {
'content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
},
},
);
post(`${PUBLISH_SERVICE}/PlatformCenter/SaveConfigContent`, {
fileName,
web4ConfigContent: content,
});
// export const getConfigContent = name =>
// get(`${CITY_SERVICE}/OMS.svc/W4_GetConfigContent?_version=9999`, {
// fileName: name,
// });
export const getConfigContent = name =>
get(`${CITY_SERVICE}/OMS.svc/W4_GetConfigContent?_version=9999`, {
get(`${PUBLISH_SERVICE}/PlatformCenter/GetConfigContent`, {
fileName: name,
});
......
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