From f5132fbccfd15259a98a13e56ead17bf5216b8a5 Mon Sep 17 00:00:00 2001 From: jingrow Date: Tue, 29 Jul 2025 16:26:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A5=97=E9=A4=90=E8=AE=A1=E5=88=92=E4=BB=B7?= =?UTF-8?q?=E6=A0=BC=E7=BB=9F=E4=B8=80=E8=AE=BE=E7=BD=AE=E5=8E=9F=E5=A7=8B?= =?UTF-8?q?=E4=BB=B7=E6=A0=BC=E5=A2=9E=E5=8A=A020%=EF=BC=8C=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E5=A5=97=E9=A4=90=E8=AE=A1=E5=88=92=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=85=AC=E7=BD=91IP=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dashboard/src2/pages/NewJsiteServer.vue | 3 ++- jcloud/api/aliyun_server_light.py | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/dashboard/src2/pages/NewJsiteServer.vue b/dashboard/src2/pages/NewJsiteServer.vue index 13160cd..a109de6 100644 --- a/dashboard/src2/pages/NewJsiteServer.vue +++ b/dashboard/src2/pages/NewJsiteServer.vue @@ -637,6 +637,7 @@ export default { const bandwidth = plan.bandwidth || '未知'; const price = plan.origin_price || '未知'; const planType = plan.plan_type || ''; + const publicIpNum = plan.public_ip_num || 0; // 处理内存显示(如果是小数,转换为MB) let memoryDisplay = memory; @@ -671,7 +672,7 @@ export default { typePrefix = ''; } - return `${typePrefix}${cpu}核/${memoryDisplay}/${disk}GB/${bandwidthDisplay} - ¥${price}/月`; + return `${typePrefix}${cpu}核/${memoryDisplay}/${disk}GB/${bandwidthDisplay}/${publicIpNum}个公网IP - ¥${price}/月`; }, getSelectedPlanPrice() { const selectedPlan = this.plans.find(plan => plan.plan_id === this.selectedPlanId); diff --git a/jcloud/api/aliyun_server_light.py b/jcloud/api/aliyun_server_light.py index 31981e5..01ed2a1 100644 --- a/jcloud/api/aliyun_server_light.py +++ b/jcloud/api/aliyun_server_light.py @@ -638,6 +638,13 @@ def get_aliyun_plans(region_id='cn-shanghai'): plan for plan in result['data']['plans'] if plan.get('plan_type') in allowed_types ] + + # 在origin_price上统一增加20%作为利润 + for plan in filtered_plans: + if 'origin_price' in plan and plan['origin_price'] is not None: + original_price = float(plan['origin_price']) + plan['origin_price'] = int(original_price / (1 - 0.2)) # 确保20%利润率且价格为整数 + result['data']['plans'] = filtered_plans return result