Skip to content

Commit

Permalink
处理设计器后退页面不准确
Browse files Browse the repository at this point in the history
  • Loading branch information
baozhoutao committed Sep 25, 2024
1 parent c37afc1 commit da7d9d6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/@steedos-widgets/amis-object/src/amis/AmisAppMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: [email protected]
* @Date: 2022-09-01 14:44:57
* @LastEditors: [email protected]
* @LastEditTime: 2024-09-25 10:52:17
* @LastEditTime: 2024-09-25 15:41:48
* @Description:
*/
import './AmisAppMenu.less';
Expand Down Expand Up @@ -301,7 +301,7 @@ export const AmisAppMenu = async (props) => {
"api": {
"url": "/service/api/objects/create_by_design",
"method": "post",
"adaptor": "window.location.href=Creator.getRelativeUrl('/api/amisObjectFieldsDesign?oid=' + payload._id +\`&assetUrls=\${Builder.settings.assetUrls}\`);return {}",
"adaptor": "window.location.href=Creator.getRelativeUrl('/api/amisObjectFieldsDesign?oid=' + payload._id +\`&assetUrls=\${Builder.settings.assetUrls}\`+'&retUrl='+window.location.href);return {}",
"requestAdaptor": "api.data={appId: context.app.id, groupId: '', name: context.oName, label: context.oLabel}; return api;",
"messages": {}
}
Expand Down Expand Up @@ -418,7 +418,7 @@ export const AmisAppMenu = async (props) => {
"api": {
"url": "/service/api/pages/create_page_by_design",
"method": "post",
"adaptor": "window.location.href=Creator.getRelativeUrl('/api/pageDesign?pageId=' + payload._id +\`&assetUrls=\${Builder.settings.assetUrls}\`);return {}",
"adaptor": "window.location.href=Creator.getRelativeUrl('/api/pageDesign?pageId=' + payload._id +\`&assetUrls=\${Builder.settings.assetUrls}\`+'&retUrl='+window.location.href);return {}",
"requestAdaptor": "api.data={appId: context.app.id, groupId: '', name: context.oName, label: context.oLabel, icon: context.icon}; return api;",
"messages": {}
}
Expand Down Expand Up @@ -893,7 +893,7 @@ export const AmisAppMenu = async (props) => {
"actions": [
{
"actionType": "custom",
"script": "window.location.href=Creator.getRelativeUrl('/api/amisObjectFieldsDesign?oid=' + event.data.id +\`&assetUrls=\${Builder.settings.assetUrls}\`)"
"script": "window.location.href=Creator.getRelativeUrl('/api/amisObjectFieldsDesign?oid=' + event.data.id +\`&assetUrls=\${Builder.settings.assetUrls}\`+'&retUrl='+window.location.href)"
}
]
}
Expand All @@ -913,7 +913,7 @@ export const AmisAppMenu = async (props) => {
"api": {
"url": "/graphql",
"method": "post",
"adaptor": "const tabs = payload.data.tabs; if(tabs && tabs.length > 0){ try{const pageId = tabs[0].page__expand._id; window.location.href=Creator.getRelativeUrl('/api/pageDesign?pageId=' + pageId +\`&assetUrls=\${Builder.settings.assetUrls}\`)}catch(e){payload.error=e.message;} }; return payload;",
"adaptor": "const tabs = payload.data.tabs; if(tabs && tabs.length > 0){ try{const pageId = tabs[0].page__expand._id; window.location.href=Creator.getRelativeUrl('/api/pageDesign?pageId=' + pageId +\`&assetUrls=\${Builder.settings.assetUrls}\`+'&retUrl='+window.location.href)}catch(e){payload.error=e.message;} }; return payload;",
"requestAdaptor": "api.data={query: '{ tabs(filters: [\\\"name\\\", \\\"=\\\", ' + context.id + ']) { _id name page page__expand { _id } }}'}; return api;",
"messages": {}
}
Expand Down Expand Up @@ -1333,7 +1333,7 @@ export const AmisAppMenu = async (props) => {
"api": {
"url": "/service/api/objects/create_by_design",
"method": "post",
"adaptor": "window.location.href=Creator.getRelativeUrl('/api/amisObjectFieldsDesign?oid=' + payload._id +\`&assetUrls=\${Builder.settings.assetUrls}\`);return {}",
"adaptor": "window.location.href=Creator.getRelativeUrl('/api/amisObjectFieldsDesign?oid=' + payload._id +\`&assetUrls=\${Builder.settings.assetUrls}\`+'&retUrl='+window.location.href);return {}",
"requestAdaptor": "api.data={appId: context.app.id, groupId: context.label, name: context.oName, label: context.oLabel}; return api;",
"messages": {}
}
Expand Down Expand Up @@ -1450,7 +1450,7 @@ export const AmisAppMenu = async (props) => {
"api": {
"url": "/service/api/pages/create_page_by_design",
"method": "post",
"adaptor": "window.location.href=Creator.getRelativeUrl('/api/pageDesign?pageId=' + payload._id +\`&assetUrls=\${Builder.settings.assetUrls}\`);return {}",
"adaptor": "window.location.href=Creator.getRelativeUrl('/api/pageDesign?pageId=' + payload._id +\`&assetUrls=\${Builder.settings.assetUrls}\`+'&retUrl='+window.location.href);return {}",
"requestAdaptor": "api.data={appId: context.app.id, groupId: context.label, name: context.oName, label: context.oLabel, icon: context.icon}; return api;",
"messages": {}
}
Expand Down

0 comments on commit da7d9d6

Please sign in to comment.