diff --git a/h5/pages/main/index/index.vue b/h5/pages/main/index/index.vue index 8998f8f..25a8b41 100644 --- a/h5/pages/main/index/index.vue +++ b/h5/pages/main/index/index.vue @@ -99,6 +99,34 @@ } catch (e) { uni.navigateTo({ url: info.jump }) } + } else if (info.jump.indexOf('/pages/main/combo/combo') !== -1) { + try { + const response = await $api('CheckChildCare', { person_id: $store.user.person_id }, { loading: true, loading_text: ' ' }) + $response(response, () => { + const { check, path } = response.data + if (!path) { + uni.navigateTo({ url: info.jump }) + } else { + if (check == 1) { + uni.showModal({ + title: '提示', + content: '即将跳转到儿保科,是否确认?', + success: (res) => { + if (res.confirm) { + wx.miniProgram.navigateTo({ url: path.startsWith('/') ? path : '/' + path }) + } + } + }) + } else { + wx.miniProgram.navigateTo({ url: path.startsWith('/') ? path : '/' + path }) + } + } + }, {}, () => { + uni.navigateTo({ url: info.jump }) + }) + } catch (e) { + uni.navigateTo({ url: info.jump }) + } } else if (switch_arr.includes(info.jump)) { uni.switchTab({ url: info.jump @@ -207,8 +235,31 @@ url: "/pages/main/order/order"+canshu }) }else if(!!$props.path && $props.path=='combo'){ - uni.navigateTo({ - url: "/pages/main/combo/combo" + $api('CheckChildCare', { person_id: $store.user.person_id }, { loading: true, loading_text: ' ' }).then(response => { + $response(response, () => { + const { check, path } = response.data + if (!path) { + uni.navigateTo({ url: "/pages/main/combo/combo" }) + } else { + if (check == 1) { + uni.showModal({ + title: '提示', + content: '即将跳转到儿保科,是否确认?', + success: (res) => { + if (res.confirm) { + wx.miniProgram.navigateTo({ url: path.startsWith('/') ? path : '/' + path }) + } + } + }) + } else { + wx.miniProgram.navigateTo({ url: path.startsWith('/') ? path : '/' + path }) + } + } + }, {}, () => { + uni.navigateTo({ url: "/pages/main/combo/combo" }) + }) + }).catch(e => { + uni.navigateTo({ url: "/pages/main/combo/combo" }) }) } }); diff --git a/h5/pages/main/order/src/order.vue b/h5/pages/main/order/src/order.vue index bc43f23..2cccef6 100644 --- a/h5/pages/main/order/src/order.vue +++ b/h5/pages/main/order/src/order.vue @@ -218,7 +218,7 @@ //去预约 const toPlan=async (id)=>{ try { - const person_id = order_info.person_id || $store.user.person_id + const person_id = order_info.value.person_id || $store.user.person_id const response = await $api('CheckChildCare', { person_id }, { loading: true, loading_text: ' ' }) $response(response, () => { const { check, path } = response.data diff --git a/h5/pages/user/fenzhen/fenzhen.vue b/h5/pages/user/fenzhen/fenzhen.vue index 99ce427..f3d7c45 100644 --- a/h5/pages/user/fenzhen/fenzhen.vue +++ b/h5/pages/user/fenzhen/fenzhen.vue @@ -374,30 +374,30 @@