diff --git a/h5/pages/main/tj/tjxq.vue b/h5/pages/main/tj/tjxq.vue index 6d5e48b..481185f 100644 --- a/h5/pages/main/tj/tjxq.vue +++ b/h5/pages/main/tj/tjxq.vue @@ -36,6 +36,8 @@ let status = ref(0); // 1个检套餐 2个检自选 3团检套餐 4团检自选 let buyText = ref("立即购买"); // 购买按钮文字 let notice = ref({}); // 体检须知 + let losePrice = ref(0); // 剩余金额 + let popupTip = ref(null); // 剩余额度提示弹窗 const GetReadmeDetails = async () => { const response = await $api("GetReadme"); @@ -124,7 +126,12 @@ }; const buy = () => { + if (tabIndex.value == 0) { + if (losePrice.value > 0 && groupId.value.length>0) { + popupTip.value.open("center"); // 弹剩余额度提醒 + return; + } GetReadmeDetails(); } if (tabIndex.value == 1 && buyText.value == "立即购买") { @@ -172,6 +179,7 @@ status.value = 3; } } + losePrice.value = response.data.lose_price; comboInfo.value = response.data.combo_info; itemsInfo.value = response.data.items_info; totalPrice.value = response.data.true_price; @@ -199,7 +207,10 @@ mountedAction(); } }; - + const toreadme=()=>{ + GetReadmeDetails(); + popupTip.value.close() + } onShow(() => { if (!!config_ref.value) { mountedAction(); @@ -207,6 +218,33 @@ });