diff --git a/app.json b/app.json index c03ea77..bdabaef 100644 --- a/app.json +++ b/app.json @@ -44,9 +44,10 @@ "pages/freeBannerDetail/freeBannerDetail" ], "subpackages": [{ - "root": "package2", + "root": "pages2", "pages": [ - "pages/appointment/appointment" + "appointment/appointment", + "shopSelect/shopSelect" ] }], "window": { diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js index 932a0e7..6ec27f4 100644 --- a/pages/order/detail/index.js +++ b/pages/order/detail/index.js @@ -193,7 +193,7 @@ Page({ console.log(startTime, endTime); tt.navigateTo({ - url: `/package2/pages/appointment/appointment?id=${id}&orderId=${orderId}&merOrderId=${merOrderId}&startTime=${startTime}&endTime=${endTime}`, + url: `/pages2/appointment/appointment?id=${id}&orderId=${orderId}&merOrderId=${merOrderId}&startTime=${startTime}&endTime=${endTime}`, }); }, @@ -208,8 +208,8 @@ Page({ }).then(res => { console.log(res, 'getUserReservation'); if (res.data) { - const appointStart = util.timestampToTime(res.data.startDate, 'YYYY-MM-DD hh:mm:ss') - const appointEnd = util.timestampToTime(res.data.endDate, 'hh:mm:ss') + const appointStart = util.timestampToTime(res.data.startDate, 'YYYY-MM-DD hh:mm') + const appointEnd = util.timestampToTime(res.data.endDate, 'hh:mm') console.log(appointStart, appointEnd); const appointmentId = res.data.id const appointmentStatus = res.data.status diff --git a/pages/order/detail/index.ttml b/pages/order/detail/index.ttml index 2a7b50a..805b123 100644 --- a/pages/order/detail/index.ttml +++ b/pages/order/detail/index.ttml @@ -120,8 +120,8 @@ 预约时间: 点击预约 - {{appointStart}}-{{appointEnd}} + {{appointStart }}{{ + ' - ' }}{{ appointEnd}} 预约已取消 diff --git a/package2/pages/appointment/appointment.js b/pages2/appointment/appointment.js similarity index 97% rename from package2/pages/appointment/appointment.js rename to pages2/appointment/appointment.js index ce851d6..6ac3e5d 100644 --- a/package2/pages/appointment/appointment.js +++ b/pages2/appointment/appointment.js @@ -1,9 +1,9 @@ // c:\Users\Holy-Knight-IX\Desktop\Working Space\4.TikTok-MiniPro\ttc\package2\pages\appointment\appointment.js -let config = require("../../../config/config.js"); -let util = require("../../../utils/util"); -let Http = require("../../../utils/HttpBasics"); +let config = require("../../config/config.js"); +let util = require("../../utils/util"); +let Http = require("../../utils/HttpBasics"); let app = getApp(); -const imgurl = require("../../../utils/imgurl"); +const imgurl = require("../../utils/imgurl"); Page({ data: { appointmentText: "确认预约", @@ -211,6 +211,12 @@ Page({ }) }, + goSelectShop() { + tt.navigateTo({ + url: `/pages2/shopSelect/shopSelect` + }); + }, + chooseAddress() { if (!this.data.isShowBtns) return let that = this; diff --git a/package2/pages/appointment/appointment.json b/pages2/appointment/appointment.json similarity index 100% rename from package2/pages/appointment/appointment.json rename to pages2/appointment/appointment.json diff --git a/package2/pages/appointment/appointment.ttml b/pages2/appointment/appointment.ttml similarity index 94% rename from package2/pages/appointment/appointment.ttml rename to pages2/appointment/appointment.ttml index 8577fe4..cd52dfa 100644 --- a/package2/pages/appointment/appointment.ttml +++ b/pages2/appointment/appointment.ttml @@ -58,6 +58,15 @@ + + 选择可用商户(BETA): + + + 请选择 + + + + diff --git a/package2/pages/appointment/appointment.ttss b/pages2/appointment/appointment.ttss similarity index 100% rename from package2/pages/appointment/appointment.ttss rename to pages2/appointment/appointment.ttss diff --git a/pages2/shopSelect/shopSelect.js b/pages2/shopSelect/shopSelect.js new file mode 100644 index 0000000..68e9f4b --- /dev/null +++ b/pages2/shopSelect/shopSelect.js @@ -0,0 +1,9 @@ +// c:\Users\56817\Desktop\Working Space\3,TikTok-MiniPro\ttc\pages2\shopSelect\shopSelect.js +Page({ + data: { + + }, + onLoad: function (options) { + + } +}) \ No newline at end of file diff --git a/pages2/shopSelect/shopSelect.json b/pages2/shopSelect/shopSelect.json new file mode 100644 index 0000000..3928faa --- /dev/null +++ b/pages2/shopSelect/shopSelect.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages2/shopSelect/shopSelect.ttml b/pages2/shopSelect/shopSelect.ttml new file mode 100644 index 0000000..3448a34 --- /dev/null +++ b/pages2/shopSelect/shopSelect.ttml @@ -0,0 +1,2 @@ + +c:\Users\56817\Desktop\Working Space\3,TikTok-MiniPro\ttc\pages2\shopSelect\shopSelect.ttml \ No newline at end of file diff --git a/pages2/shopSelect/shopSelect.ttss b/pages2/shopSelect/shopSelect.ttss new file mode 100644 index 0000000..e7f0f4b --- /dev/null +++ b/pages2/shopSelect/shopSelect.ttss @@ -0,0 +1 @@ +/* c:\Users\56817\Desktop\Working Space\3,TikTok-MiniPro\ttc\pages2\shopSelect\shopSelect.ttss */ \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json index 674ec15..fc1a817 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -1,7 +1,7 @@ { "condition": { "miniprogram": { - "current": -1, + "current": 1688143362650, "list": [ { "id": 1678508631604, @@ -58,10 +58,10 @@ "location": "audit" }, { - "id": 1687681696486, - "name": "package2/pages/appointment/appointment", - "pathName": "package2/pages/appointment/appointment", - "query": "id=&orderId=832862588988481536&startTime=1687622400000&endTime=2023-06-30&mallList=%255B%257B%2522tenantId%2522%253A%25221040%2522%252C%2522mallName%2522%253A%2522%25E5%25AF%258C%25E8%258C%2582%25E5%25AE%25B6%25E6%2594%25BF%2522%252C%2522merchantVoList%2522%253A%255B%257B%2522merchantStatus%2522%253A1%252C%2522shopVoList%2522%253A%255B%257B%2522imgUrl%2522%253A%2522https%253A%252F%252Fformall.oss-accelerate.aliyuncs.com%252F234%252FWechatIMG5071.png%2522%252C%2522buildingName%2522%253A%2522%25E5%25AF%258C%25E8%258C%2582%25E5%25AE%25B6%25E6%2594%25BF%2522%252C%2522linkPhone%2522%253A%2522%2522%252C%2522shopNumber%2522%253A%2522001%2522%252C%2522id%2522%253A%2522828071776068100096%2522%252C%2522floorName%2522%253A%25221F%2522%252C%2522floor%2522%253A%2522825939503087149056%2522%252C%2522addr%2522%253A%2522%2522%252C%2522linkPerson%2522%253A%2522%2522%252C%2522building%2522%253A%2522825939503074566144%2522%257D%255D%252C%2522latitude%2522%253A%252230.277748%2522%252C%2522businessId%2522%253A6%252C%2522supplierExtId%2522%253A%2522828072047632506880%2522%252C%2522isAdmin%2522%253A0%252C%2522merchantName%2522%253A%2522%25E5%25AE%25B6%25E5%25B8%25AE%25E6%25B1%2587%25E5%25AE%25B6%25E6%2594%25BF%25E4%25BF%259D%25E6%25B4%2581%28%25E6%25B2%25B3%25E6%25B1%25A0%25E5%25B8%2582%25E5%25BA%2586%25E8%25BF%259C%25E9%2595%2587%29%2522%252C%2522ttPoi%2522%253A%25227241459164742944771%2522%252C%2522merchantImgUrl%2522%253A%2522https%253A%252F%252Fformall.oss-accelerate.aliyuncs.com%252F234%252FWechatIMG5071.png%2522%252C%2522merchantLinkPhone%2522%253A%252218988778877%2522%252C%2522parameter%2522%253A%2522%257B%255C%2522subsidyNumStr%255C%2522%253A%25200%257D%2522%252C%2522tenantId%2522%253A%25221040%2522%252C%2522finalTenantId%2522%253A%25221040%2522%252C%2522id%2522%253A%2522828072047632506880%2522%252C%2522longitude%2522%253A%2522119.996078%2522%257D%255D%252C%2522expand%2522%253Atrue%257D%255D", + "id": 1688143362650, + "name": "pages2/shopSelect/shopSelect", + "pathName": "pages2/shopSelect/shopSelect", + "query": "", "scene": "990001", "launchFrom": "scan", "location": "qr_code" diff --git a/utils/util.js b/utils/util.js index 1804a44..f1d5fba 100644 --- a/utils/util.js +++ b/utils/util.js @@ -151,6 +151,8 @@ function timestampToTime(timestamp, format) { // return Y + M + D + h + m + s if (format == "YYYY-MM-DD hh:mm:ss") { return Y + "-" + M + "-" + D + " " + h + ":" + m + ":" + s + } else if (format == "YYYY-MM-DD hh:mm") { + return Y + "-" + M + "-" + D + " " + h + ":" + m } else if (format == "YYYY/MM/DD hh:mm:ss") { return Y + "/" + M + "/" + D + " " + h + ":" + m + ":" + s } else if (format == "YYYY.MM.DD hh:mm:ss") {