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