diff --git a/src/pages/admin/subscriptions/index.vue b/src/pages/admin/subscriptions/index.vue
index 26ce0dd..3d46b14 100644
--- a/src/pages/admin/subscriptions/index.vue
+++ b/src/pages/admin/subscriptions/index.vue
@@ -139,6 +139,10 @@
成本价
¥{{ formatPrice(subscription.product_admin?.cost_price) }}
+
+
价格信息
价格:
- ¥{{ formatPrice(product.ui_component_price) }}
+ ¥{{ formatPrice(currentUIComponentPrice) }}
@@ -426,6 +426,14 @@ const currentSubscription = computed(() => {
return userSubscriptions.value.find(sub => sub.product_id === product.value.id)
})
+// 获取当前产品的UI组件价格(优先使用订阅中的价格)
+const currentUIComponentPrice = computed(() => {
+ if (currentSubscription.value && currentSubscription.value.ui_component_price) {
+ return currentSubscription.value.ui_component_price
+ }
+ return product.value?.ui_component_price || 0
+})
+
// 初始化
onMounted(() => {
loadUserSubscriptions()
@@ -1078,7 +1086,8 @@ const handleDownloadReport = async () => {
是否组合包: reportDownloadInfo.value.is_package,
子产品数量: reportDownloadInfo.value.sub_products?.length || 0,
子产品列表: reportDownloadInfo.value.sub_products,
- 价格: product.value.ui_component_price,
+ 价格: currentUIComponentPrice.value,
+ 价格来源: currentSubscription.value ? '用户订阅' : '产品默认',
可下载: reportDownloadInfo.value.can_download
})
} catch (error) {
@@ -1100,8 +1109,9 @@ const handleDownloadReport = async () => {
是否组合包: reportDownloadInfo.value.is_package,
子产品数量: reportDownloadInfo.value.sub_products?.length || 0,
子产品列表: reportDownloadInfo.value.sub_products,
- 价格: product.value.ui_component_price,
- 可下载: reportDownloadInfo.value.can_download
+ 价格: currentUIComponentPrice.value,
+ 价格来源: currentSubscription.value ? '用户订阅' : '产品默认',
+ 可下载: reportDownloadInfo.value.can_download
})
}
@@ -1281,7 +1291,7 @@ const showWechatPaymentQRCode = (codeUrl, orderId) => {
}, '点击打开微信支付')
]),
h('div', { style: 'font-size: 14px; color: #666;' }, [
- h('p', `支付金额:¥${formatPrice(product.value?.ui_component_price || 0)}`),
+ h('p', `支付金额:¥${formatPrice(currentUIComponentPrice)}`),
h('p', '支付完成后,请点击"我已支付"按钮')
])
])
@@ -1289,7 +1299,7 @@ const showWechatPaymentQRCode = (codeUrl, orderId) => {
})
]),
h('div', { style: 'font-size: 14px; color: #666;' }, [
- h('p', `支付金额:¥${formatPrice(product.value?.ui_component_price || 0)}`),
+ h('p', `支付金额:¥${formatPrice(currentUIComponentPrice.value || 0)}`),
h('p', '支付完成后,系统将自动检测支付状态')
])
]),