diff --git a/apps/dfs/src/views/Layout.vue b/apps/dfs/src/views/Layout.vue index 308507f5bf..7a65951478 100644 --- a/apps/dfs/src/views/Layout.vue +++ b/apps/dfs/src/views/Layout.vue @@ -337,8 +337,8 @@ export default { }, // 检查是否有安装过agent checkAgentInstall() { - this.$axios.get('api/tcm/orders/checkAgent').then(data => { - if (data === 0) { + this.$axios.get('api/tcm/agent').then(data => { + if (data?.total === 0) { this.subscriptionModelVisible = true } }) diff --git a/apps/dfs/src/views/agent-download/SubscriptionModelDialog.vue b/apps/dfs/src/views/agent-download/SubscriptionModelDialog.vue index 63ac3bfba3..ed201f8edc 100644 --- a/apps/dfs/src/views/agent-download/SubscriptionModelDialog.vue +++ b/apps/dfs/src/views/agent-download/SubscriptionModelDialog.vue @@ -344,9 +344,15 @@
check-bold -
+
{{ item.name }}: {{ item.desc }} + {{ $t('dfs_instance_createagent_mianfeitiyan') }}
0) { this.specificationItems = this.specificationItems.filter(it => it.chargeProvider !== 'FreeTier') } - this.specification = - this.agentCount > 0 || this.agentDeploy !== 'selfHost' - ? this.specificationItems[1]?.value - : this.specificationItems[0]?.value + this.specification = this.specificationItems[0]?.value // 价格套餐 this.allPackages = paidPrice.map(t => { return Object.assign(t, { @@ -1478,7 +1481,15 @@ export default { this.$axios .post('api/tcm/orders', params) .then(data => { - if (data.chargeProvider === 'FreeTier' || (data.chargeProvider === 'Aliyun' && row.agentType === 'Local')) { + if (data.chargeProvider === 'FreeTier' && this.agentDeploy === 'fullManagement') { + this.finish() + this.$router.push({ + name: 'Instance' + }) + } else if ( + data.chargeProvider === 'FreeTier' || + (data.chargeProvider === 'Aliyun' && row.agentType === 'Local') + ) { //免费实例(授权码)-半托管-直接部署页面 this.finish() let downloadUrl = window.App.$router.resolve({