diff --git a/pages/pbService/index.js b/pages/pbService/index.js index 6da1e5b..bf04a97 100644 --- a/pages/pbService/index.js +++ b/pages/pbService/index.js @@ -8,105 +8,198 @@ Page({ * 页面的初始数据 */ data: { - jsj: null + jsj: null, + // 交通助手 + trafficHelper: [ + { + title: "高峰预警", + img: "https://static.ticket.sz-trip.com/xcxImages/pbservice/pb4.png", + weburl: "https://wlsjzx.zdhxwl.cn/kt_h5/index.html?userEncry=FQqP774V6H3PacOWYqJLykUBBywTAZEWMu9Nz9tzrOZUIf/Zto2OvXmirAi7/FSOkZg1uwNpcK0kdZgK0FjuzEZKYBjL/1RXp3XpQhxv9H91g9c737NfSxRcfYUHo2SGLX8kAlAiAbt72AoEfG++i+WTjbTo57sunVEzn/nF7n55StkcgfesDKjXOm+txOYbEc0tH32A5Mn", + // path: "/pages/pbService/sceneComfort/index?title=高峰预警" + }, + { + title: "行李直送", + img: "https://static.ticket.sz-trip.com/uploads/20250115/1628737d70e74613fc12e9fdbd8c192f.png", + appId: 'wx757dd1ee184e75e9', + page: "pages/tabBar/index/index", + }, + { + title: "行李寄存", + img: "https://static.ticket.sz-trip.com/uploads/20230808/484100644e7f02f4eb722a8c2e665927.png", + weburl: "https://weixin.2500sz.net/zt/2023/07/luggage_storage/" + }, + { + title: "找厕所", + img: "https://static.ticket.sz-trip.com/xcxImages/pbservice/pb3.png", + path: "/pages/pbService/bike/index?type=1" + }, + { + title: "Suzhou Tour", + img: "https://m.cloud.sz-trip.com/static/images/serve/isuzhou.png", + weburl: "https://traveltosuzhou.wglj.suzhou.gov.cn/" + }, + { + title: "安全服务", + img: "https://static.ticket.sz-trip.com/xcxImages/pbservice/pb2.png", + path: "/pages/pbService/security/index" + }, + // { + // title: "体育场馆", + // img: "https://static.ticket.sz-trip.com/xcxImages/pbservice/pb14.png", + // path: "/pages/pbService/gym/index" + // }, + { + title: "垃圾分类", + img: "https://static.ticket.sz-trip.com/xcxImages/pbservice/pb16.png", + appId: 'wx13be821f3b1afed3', + path: 'pages/home/home' + }, + // { + // title: "文化配送", + // img: "https://static.ticket.sz-trip.com/xcxImages/pbservice/pb20.png", + // path: "/pages/culture/index" + // }, + { + title: "附近图书馆", + img: "https://static.ticket.sz-trip.com/uploads/20231031/858e6ced1edaf072aa7879ee6ff5204f.png", + weburl: "https://www.szlib.com/szlibposition" + }, + { + title: "12348", + img: "https://static.ticket.sz-trip.com/xcxImages/index/pb4New.png", + appId: 'wxcdfd45c001466ba3', + path: 'pages/index/index' + }, + { + title: "文化场馆查询", + img: "https://static.ticket.sz-trip.com/uploads/20250812/ed95e68969c28c75e1ed348a56d4c198.png", + weburl: "https://m.cloud.sz-trip.com/Museum" + }, + ], + // 交通出行 + transportation: [ + // { + // title: "实时公交", + // img: "https://static.ticket.sz-trip.com/xcxImages/pbservice/pb6.png", + // path: "/pages/pbService/bus/index" + // }, + { + title: "停车场", + img: "https://static.ticket.sz-trip.com/xcxImages/pbservice/pb5.png", + weburl: "https://m.cloud.sz-trip.com/ParkingArea" + }, + { + title: "公共自行车", + img: "https://static.ticket.sz-trip.com/xcxImages/pbservice/pb7.png", + path: "/pages/pbService/bike/index?type=0" + }, + { + title: "接送机", + img: "https://static.ticket.sz-trip.com/xcxImages/pbservice/pb18.png", + appId: "wxd4d86d58fcf658ff", + path: "/subpages/product/airport/index" + }, + { + title: "P+R停车场", + img: "https://static.ticket.sz-trip.com/xcxImages/pbservice/pb8.png", + path: "/pages/pbService/PRpark/index" + }, + { + title: "实时路况", + img: "https://static.ticket.sz-trip.com/uploads/20230901/21668c913dd4875d05eba398e905b9f0.png", + weburl: "https://jiaotonghao2.amap.com/?channel=amap&unitId=257&src=app_share#/" + }, + { + title: "实时打车", + img: "https://static.ticket.sz-trip.com/jundaosuzhou/images/gdImg.png", + appId: 'wxbc0cf9b963bd3550', + page: "onlineCar/online_index/page/Home/Home?gd_from=taizhouwenlv" + }, + + + ], }, /** * 生命周期函数--监听页面加载 */ - onLoad: function (options) { +onLoad: function (options) { commonApi._post("pbservice/Other/getClientConfig", { - unique_key: "wechatxcx" + unique_key: "wechatxcx" }).then(res => { - let data = JSON.parse(res.data); - console.log(data) - this.setData({ + let data = JSON.parse(res.data); + console.log(data) + this.setData({ jsj: data.jiesongji - }) - console.log(data) + }) + console.log(data) }) - }, - gotoPath: function (e) { - if (e.currentTarget.dataset.event) { - util.pagePoint({ event: e.currentTarget.dataset.event }, 1) +}, +mainIconClick: function(e) { + let item = e.currentTarget.dataset.item + console.log(item) + if (item.pagePoint) { + this.newPagePoint(item.pagePoint) } - if (e.currentTarget.dataset.title == '12348') { - wx.navigateToMiniProgram({ - appId: 'wxcdfd45c001466ba3', - path: 'pages/index/index' - }) - return; + + if (item.appId) { + wx.navigateToMiniProgram({ + appId: item.appId, + path: item.pagePath, + }) + return } - wx.navigateTo({ - url: e.currentTarget.dataset.path, - }) - if (e.currentTarget.dataset.title) { - commonApi._post("browse/burying_point", { - uuid: app.globalData.uuid, - drive: "mini", - title: e.currentTarget.dataset.title - }).then(res => { - - }) + if (item.path) { + wx.navigateTo({ + url: item.path + }) + return } - }, - jiesongji: function (e) { - if (!this.data.jsj) return; - if (e.currentTarget.dataset.event) { - util.pagePoint({ event: e.currentTarget.dataset.event }, 1) + if (item.weburl) { + wx.navigateTo({ + url: "/pages/pbService/web/index?weburl=" + encodeURIComponent(item.weburl) + }) + return } - wx.navigateToMiniProgram({ - appId: this.data.jsj, // 之前后台的appid wx336dcaf6a1ecf632 - page: "subpages/product/airport/index" - }) - // wx.navigateToMiniProgram({ - // appId: this.data.jsj, - // page: "page/home/webview/webview?hideShare=0&src=https%3A%2F%2Fopen.weixin.qq.com%2Fconnect%2Foauth2%2Fauthorize%3Fappid%3Dwx3827070276e49e30%26redirect_uri%3Dhttps%3A%2F%2Fwx.17u.cn%2Fflight%2Fgetopenid.html%3Furl%3Dhttps%25253A%25252F%25252Fwx.17u.cn%25252Finternalcarrebornwechat%25252Fview%25252Fmain.html%252523%25252FspecialCarIndex%25252FinstantCar%25253Frefid%25253D1563845199%26showwxpaytitle%3D1%26response_type%3Dcode%26scope%3Dsnsapi_base%26state%3D123%26connect_redirect%3D1%23wechat_redirect" - // }) - }, - gaode: function (e) { - if (!this.data.jsj) return; - if (e.currentTarget.dataset.event) { - util.pagePoint({ event: e.currentTarget.dataset.event }, 1) - } - wx.navigateToMiniProgram({ - appId: 'wxbc0cf9b963bd3550', - page: "onlineCar/online_index/page/Home/Home?gd_from=taizhouwenlv" + +}, + + + +jiesongji: function (e) { +if (!this.data.jsj) return; +if (e.currentTarget.dataset.event) { + util.pagePoint({ event: e.currentTarget.dataset.event }, 1) +} +wx.navigateToMiniProgram({ + appId: this.data.jsj, // 之前后台的appid wx336dcaf6a1ecf632 + page: "subpages/product/airport/index" +}) +// wx.navigateToMiniProgram({ +// appId: this.data.jsj, +// page: "page/home/webview/webview?hideShare=0&src=https%3A%2F%2Fopen.weixin.qq.com%2Fconnect%2Foauth2%2Fauthorize%3Fappid%3Dwx3827070276e49e30%26redirect_uri%3Dhttps%3A%2F%2Fwx.17u.cn%2Fflight%2Fgetopenid.html%3Furl%3Dhttps%25253A%25252F%25252Fwx.17u.cn%25252Finternalcarrebornwechat%25252Fview%25252Fmain.html%252523%25252FspecialCarIndex%25252FinstantCar%25253Frefid%25253D1563845199%26showwxpaytitle%3D1%26response_type%3Dcode%26scope%3Dsnsapi_base%26state%3D123%26connect_redirect%3D1%23wechat_redirect" +// }) +}, + + +gotoSku: function () { +commonApi.user_post("pbservice/Ztfw/sukangCode").then(res => { + app.globalData.weburl = res.data.url; + wx.navigateTo({ + url: '/pages/pbService/web/index' }) - }, - xlzs: function (e) { + return; +}) +}, - wx.navigateToMiniProgram({ - appId: 'wx757dd1ee184e75e9', - page: "pages/tabBar/index/index" - }) - }, - gotoUrl: function (e) { - if (e.currentTarget.dataset.event) { - util.pagePoint({ event: e.currentTarget.dataset.event }, 1) - } - let url = e.currentTarget.dataset.url; - app.globalData.weburl = url; - wx.navigateTo({ - url: "/pages/pbService/web/index?weburl=" + encodeURIComponent(url) - }) - }, - gotoSku: function () { - commonApi.user_post("pbservice/Ztfw/sukangCode").then(res => { - app.globalData.weburl = res.data.url; - wx.navigateTo({ - url: '/pages/pbService/web/index' - }) - return; - }) - }, - garbage: function () { - wx.navigateToMiniProgram({ - appId: 'wx13be821f3b1afed3', - path: 'pages/home/home' +newPagePoint (param) { + commonApi._post("browse/newBuryingPoint", { + uuid: app.globalData.uuid, + drive: "mini", + ...param, }) - }, +}, /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/pages/pbService/index.wxml b/pages/pbService/index.wxml index a03d83e..d898c8a 100644 --- a/pages/pbService/index.wxml +++ b/pages/pbService/index.wxml @@ -9,108 +9,20 @@ 苏康码 --> - - - - 高峰预警 + + + {{item.title}} - - - 行李直送 - - - - 行李寄存 - - - - 找厕所 - - - - Suzhou Tour - - - - 安全服务 - - - - - 垃圾分类 - - - - - 附近图书馆 - - - - 12348 - - - - 文化场馆查询 - - - - - - - - - 停车场 - - - - - 公共自行车 - - - - 接送机 - - - - P+R停车场 - - - - 实时路况 + + + {{item.title}} - - - 实时打车 -