From 61d17da439dfb79ac8160e0d2c3602ab0cc22fe5 Mon Sep 17 00:00:00 2001 From: XiaoXinPro 14 IAH5R <568170040@qq.com> Date: Tue, 13 Jun 2023 18:02:18 +0800 Subject: [PATCH] upload --- ext.json | 6 +++--- package2/pages/appointment/appointment.js | 19 ++++++++++++++++--- pages/order/detail/index.js | 7 +++++-- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/ext.json b/ext.json index bd289e8..e765f19 100644 --- a/ext.json +++ b/ext.json @@ -3,15 +3,15 @@ "attr": { "configUrl": "https://ctest.malls.iformall.com/C/api" }, - "name": "富茂券券集团版", - "weappId": "tt620e14b3fd30264101" + "name": "富茂家政", + "weappId": "tt90b5e6080f896bde01" }, "window": { "backgroundTextStyle": "light", "navigationBarTextStyle": "black", "navigationBarBackgroundColor": "#fff" }, - "extAppid": "tt620e14b3fd30264101", + "extAppid": "tt90b5e6080f896bde01", "extEnable": true, "directCommit": false, "networkTimeout": { diff --git a/package2/pages/appointment/appointment.js b/package2/pages/appointment/appointment.js index 11fcf96..e491814 100644 --- a/package2/pages/appointment/appointment.js +++ b/package2/pages/appointment/appointment.js @@ -9,7 +9,7 @@ Page({ appointmentText: "确认预约", id: "", orderId: "", - startTime: "", + startTime: '', endTime: "", mallTenantId: "", pickedAddress: "请选择地址", @@ -21,14 +21,27 @@ Page({ isShowBtns: false }, onLoad(options) { - console.log(options, 'options'); + console.log(options, 'options') + + const date = (new Date()).getTime() + const nowDate = util.timestampToTime(date, 'YYYY-MM-DD') + const startTime = util.timestampToTime(options.startTime * 1, 'YYYY-MM-DD') + + console.log(nowDate, startTime, 'time'); + + const finalStartTime = options.startTime * 1 > date * 1 ? startTime : nowDate + + console.log(finalStartTime, 'finalStartTime'); + this.setData({ id: options.id || '', orderId: options.orderId || '', - startTime: options.startTime || '', + startTime: finalStartTime, endTime: options.endTime || '' }) + console.log(this.data.startTime, 'startTime'); + const mallTenantId = tt.getStorageSync('mallTenantId'); if (mallTenantId) { this.setData({ diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js index b895b49..52b068b 100644 --- a/pages/order/detail/index.js +++ b/pages/order/detail/index.js @@ -185,7 +185,7 @@ Page({ const that = this const orderId = e.currentTarget.dataset.id const id = this.data.appointmentId - const startTime = that.data.order.validStartDate + const startTime = that.data.order.validStartDATE const endTime = that.data.order.validEndDate console.log(startTime, endTime); @@ -446,7 +446,10 @@ Page({ tempData.soldStartTime = util.timestampToTime(tempData.soldStartTime, "YYYY-MM-DD") || null, tempData.soldEndTime = util.timestampToTime(tempData.soldEndTime, "YYYY-MM-DD") || null, - tempData.validStartDate = util.timestampToTime(tempData.validStartDate, "YYYY-MM-DD") + tempData.validStartDATE = tempData.validStartDate + tempData.validEndDATE = tempData.validEndDate + + tempData.validStartDate = util.timestampToTime(tempData.validStartDate, "YYYY-MM-DD") tempData.validEndDate = util.timestampToTime(tempData.validEndDate, "YYYY-MM-DD") tempData.couponOrderIdS = tempData.couponOrderId ? tempData.couponOrderId.slice(0, 4) + `******` + tempData.couponOrderId.slice(14) : ''