diff --git a/src/locales/zh/app-version.json b/src/locales/zh/app-version.json index 4bbdcc7c..aba83934 100644 --- a/src/locales/zh/app-version.json +++ b/src/locales/zh/app-version.json @@ -81,6 +81,8 @@ "specification and application development": "规范和应用程序开发", "Suspend app": "下架应用", "Recover app": "重新上架应用", + "Suspend successfully": "下架操作成功", + "Recover successfully": "上架操作成功", "Suspend version": "下架版本", "Recover version": "上架版本", "suspend-app-note-desc": "应用下架后,用户无法从商店中购买到此应用,你确定要下架该应用吗?", diff --git a/src/pages/AppDetail/index.jsx b/src/pages/AppDetail/index.jsx index f834c4e8..e8a852ae 100644 --- a/src/pages/AppDetail/index.jsx +++ b/src/pages/AppDetail/index.jsx @@ -57,6 +57,7 @@ export default class AppDetail extends Component { rootStore, appStore, appVersionStore, + vendorStore, match, isCreate } = this.props; @@ -69,8 +70,8 @@ export default class AppDetail extends Component { await appStore.fetch(appId); await appVersionStore.fetchTypeVersions(appId); - // todo - // await vendorStore.fetch(appDetail.vendor_id); + const { appDetail } = appStore; + await vendorStore.fetch(appDetail.isv); await appStore.fetchActiveApps({ status: 'active' }); diff --git a/src/pages/Dashboard/Apps/Detail/index.jsx b/src/pages/Dashboard/Apps/Detail/index.jsx index 208644e3..830630b8 100644 --- a/src/pages/Dashboard/Apps/Detail/index.jsx +++ b/src/pages/Dashboard/Apps/Detail/index.jsx @@ -112,6 +112,13 @@ export default class AppDetail extends Component { await versionSuspend(versionIds, operateType[0]); }; + openSuspendDialog = (versionId, type) => { + const { appStore, appVersionStore } = this.props; + appVersionStore.versionId = versionId; + + appStore.showModal(type); + }; + renderAppHandleMenu = appDetail => { const { appStore, match, t } = this.props; const { appId } = match.params; @@ -136,11 +143,8 @@ export default class AppDetail extends Component { }; renderVersionHandleMenu = item => { - const { - appStore, appVersionStore, match, t - } = this.props; + const { match, t } = this.props; const { appId } = match.params; - appVersionStore.versionId = item.version_id; return (