From 6a2db40e55463ea69b5c59cb1e01c43d32ab91f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E4=BD=B3=E5=AE=87?= <17601616548@163.com> Date: Sat, 28 Sep 2024 20:20:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6=E5=90=8D?= =?UTF-8?q?=E5=AD=97=EF=BC=8C=E4=BF=AE=E5=A4=8D=E5=9B=A0=E4=B8=BAurl?= =?UTF-8?q?=E9=95=BF=E5=AF=BC=E8=87=B4=E9=A1=B5=E9=9D=A2=E5=8D=A1=E6=AD=BB?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- h5/pages.json | 8 ++--- h5/pages/main/combo/combo.vue | 2 +- .../main/{optionalProject => tj}/choose.vue | 4 +-- .../{optionalProject => tj}/selectType.vue | 2 +- .../optionalDetails.vue => tj/tjxq.vue} | 2 +- .../optionalProject.vue => tj/tjzx.vue} | 14 +++----- h5/pages/main/tjyy/tjyy.vue | 32 +++++++++++-------- 7 files changed, 31 insertions(+), 33 deletions(-) rename h5/pages/main/{optionalProject => tj}/choose.vue (97%) rename h5/pages/main/{optionalProject => tj}/selectType.vue (98%) rename h5/pages/main/{optionalProject/optionalDetails.vue => tj/tjxq.vue} (99%) rename h5/pages/main/{optionalProject/optionalProject.vue => tj/tjzx.vue} (98%) diff --git a/h5/pages.json b/h5/pages.json index 5148569..3adaa90 100644 --- a/h5/pages.json +++ b/h5/pages.json @@ -60,7 +60,7 @@ } }, { - "path": "pages/main/optionalProject/optionalProject", + "path": "pages/main/tj/tjzx", "style": { "navigationBarTitleText": "体检套餐加项", "navigationBarBackgroundColor": "#D8EDF2", @@ -74,7 +74,7 @@ } }, { - "path": "pages/main/optionalProject/optionalDetails", + "path": "pages/main/tj/tjxq", "style": { "navigationBarTitleText": "套餐详情", "navigationBarBackgroundColor": "#239EA3", @@ -97,14 +97,14 @@ } }, { - "path": "pages/main/optionalProject/choose", + "path": "pages/main/tj/choose", "style": { "navigationBarTitleText": "团检预约", "enablePullDownRefresh": false } }, { - "path": "pages/main/optionalProject/selectType", + "path": "pages/main/tj/selectType", "style": { "navigationBarTitleText": "团检预约", "enablePullDownRefresh": false diff --git a/h5/pages/main/combo/combo.vue b/h5/pages/main/combo/combo.vue index 9873e69..031f41d 100644 --- a/h5/pages/main/combo/combo.vue +++ b/h5/pages/main/combo/combo.vue @@ -166,7 +166,7 @@ const buyClick = async (item) => { // 个检只要套餐ID // 预约 跳转到个检/团检套餐详情 uni.navigateTo({ - url: "/pages/main/optionalProject/optionalDetails" + query, + url: "/pages/main/tj/tjxq" + query, }); }; diff --git a/h5/pages/main/optionalProject/choose.vue b/h5/pages/main/tj/choose.vue similarity index 97% rename from h5/pages/main/optionalProject/choose.vue rename to h5/pages/main/tj/choose.vue index dc46736..13ff288 100644 --- a/h5/pages/main/optionalProject/choose.vue +++ b/h5/pages/main/tj/choose.vue @@ -67,13 +67,13 @@ const getGroupCombo = async (info) => { if (!data.items.length && data.tongshou_xiane > 0) { // 跳转到选择类似上 uni.navigateTo({ - url: "/pages/main/optionalProject/selectType" + url: "/pages/main/tj/selectType" }); } else { // 跳转到团检自选 uni.navigateTo({ url: - "/pages/main/optionalProject/optionalDetails?groupId=" + + "/pages/main/tj/tjxq?groupId=" + info.group_id }); } diff --git a/h5/pages/main/optionalProject/selectType.vue b/h5/pages/main/tj/selectType.vue similarity index 98% rename from h5/pages/main/optionalProject/selectType.vue rename to h5/pages/main/tj/selectType.vue index e5cc98f..3613e63 100644 --- a/h5/pages/main/optionalProject/selectType.vue +++ b/h5/pages/main/tj/selectType.vue @@ -36,7 +36,7 @@ const toDetails = (type) => { if(type == 1){ url = "/pages/main/combo/combo?groupId=" + groupInfo.value.group_id; }else{ - url = "/pages/main/optionalProject/optionalProject?groupId=" + groupInfo.value.group_id; + url = "/pages/main/tj/tjzx?groupId=" + groupInfo.value.group_id; } uni.navigateTo({ url: url, diff --git a/h5/pages/main/optionalProject/optionalDetails.vue b/h5/pages/main/tj/tjxq.vue similarity index 99% rename from h5/pages/main/optionalProject/optionalDetails.vue rename to h5/pages/main/tj/tjxq.vue index a04d09d..34a3e41 100644 --- a/h5/pages/main/optionalProject/optionalDetails.vue +++ b/h5/pages/main/tj/tjxq.vue @@ -159,7 +159,7 @@ const addCombo = () => { query += "&groupId=" + groupId.value; } uni.navigateTo({ - url: "/pages/main/optionalProject/optionalProject?" + query, + url: "/pages/main/tj/tjzx?" + query, }); }; diff --git a/h5/pages/main/optionalProject/optionalProject.vue b/h5/pages/main/tj/tjzx.vue similarity index 98% rename from h5/pages/main/optionalProject/optionalProject.vue rename to h5/pages/main/tj/tjzx.vue index fe3d317..535bdd1 100644 --- a/h5/pages/main/optionalProject/optionalProject.vue +++ b/h5/pages/main/tj/tjzx.vue @@ -199,7 +199,7 @@ const toDetails = (state) => { () => { clearTimeout(time); uni.navigateTo({ - url: "/pages/main/optionalProject/optionalDetails" + query, + url: "/pages/main/tj/tjxq" + query, }); }, delta == 2 ? 800 : 500 @@ -247,26 +247,20 @@ const mountedAction = async () => { await getAllItems(); // 获取全部项目 // await getComboRecommend(); - getBuyInfo(); // 获取购买信息 + await getBuyInfo(); // 获取购买信息 }; const config_ref = ref(null); const configRef = (e) => { if (!config_ref.value) { config_ref.value = e; - let time = setTimeout(() => { - clearTimeout(time); - mountedAction(); - }, 500); + mountedAction(); } }; onShow(() => { if (!!config_ref.value) { - let time = setTimeout(() => { - clearTimeout(time); - mountedAction(); - }, 500); + mountedAction(); } }); diff --git a/h5/pages/main/tjyy/tjyy.vue b/h5/pages/main/tjyy/tjyy.vue index fdb9a3f..4048789 100755 --- a/h5/pages/main/tjyy/tjyy.vue +++ b/h5/pages/main/tjyy/tjyy.vue @@ -70,27 +70,30 @@ const comfrimyy = async () => { // uni.$lu.toast("请选择医生"); // return; // } - console.log(yytjInfo.value?.nmr_list); - for(let i = 0; i < yytjInfo.value?.nmr_list?.length; i++){ - if(!yytjInfo.value?.nmr_list[i].time){ - uni.$lu.toast("请选择预约时间"); - return; - } - } + // console.log(yytjInfo.value?.nmr_list); + // for(let i = 0; i < yytjInfo.value?.nmr_list?.length; i++){ + // if(!yytjInfo.value?.nmr_list[i].time){ + // uni.$lu.toast("请选择预约时间"); + // return; + // } + // } - if(yytjInfo.value?.nmr_list?.length > 1){ - plan_nmr_id = yytjInfo.value?.nmr_list[0]?.id; - } - if(yytjInfo.value?.nmr_list?.length > 1){ - plan_id = yytjInfo.value?.nmr_list[yytjInfo.value?.nmr_list.length - 1]?.id; - } + // if(yytjInfo.value?.nmr_list?.length > 1){ + // plan_nmr_id = yytjInfo.value?.nmr_list[0]?.id; + // } + // if(yytjInfo.value?.nmr_list?.length > 1){ + // plan_id = yytjInfo.value?.nmr_list[yytjInfo.value?.nmr_list.length - 1]?.id; + // } + + console.log(groupInfo.value); let obj = { person_id: buyInfo.value.person_id, type: buyInfo.value.group_id ? 2 : 1, hospital: buyInfo.value.hospital, - combo_id: buyInfo.value?.combo_id || userInfo.value?.combo_id, + group_id: buyInfo.value.group_id, + combo_id: buyInfo.value?.combo_id || (groupInfo.value?.combo_id?"":userInfo.value?.combo_id) || "", item_ids: buyInfo.value.item_ids, plan_id: plan_id, $plan_nmr_id: plan_nmr_id, @@ -98,6 +101,7 @@ const comfrimyy = async () => { console.log(obj); const response = await $api("OrderCreate", obj); + // return $response(response, () => { if(response.status){ if(response.data.action == "pay"){