You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
251 lines
7.4 KiB
251 lines
7.4 KiB
// pages/pbService/index.js
|
|
import commonApi from "../../utils/https/common"
|
|
let app = getApp()
|
|
import util from '../../utils/util'
|
|
Page({
|
|
|
|
/**
|
|
* 页面的初始数据
|
|
*/
|
|
data: {
|
|
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) {
|
|
commonApi._post("pbservice/Other/getClientConfig", {
|
|
unique_key: "wechatxcx"
|
|
}).then(res => {
|
|
let data = JSON.parse(res.data);
|
|
console.log(data)
|
|
this.setData({
|
|
jsj: data.jiesongji
|
|
})
|
|
console.log(data)
|
|
})
|
|
},
|
|
mainIconClick: function(e) {
|
|
let item = e.currentTarget.dataset.item
|
|
console.log(item)
|
|
if (item.pagePoint) {
|
|
this.newPagePoint(item.pagePoint)
|
|
}
|
|
|
|
if (item.appId) {
|
|
wx.navigateToMiniProgram({
|
|
appId: item.appId,
|
|
path: item.pagePath,
|
|
})
|
|
return
|
|
}
|
|
if (item.path) {
|
|
wx.navigateTo({
|
|
url: item.path
|
|
})
|
|
return
|
|
}
|
|
if (item.weburl) {
|
|
wx.navigateTo({
|
|
url: "/pages/pbService/web/index?weburl=" + encodeURIComponent(item.weburl)
|
|
})
|
|
return
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
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'
|
|
})
|
|
return;
|
|
})
|
|
},
|
|
|
|
|
|
newPagePoint (param) {
|
|
commonApi._post("browse/newBuryingPoint", {
|
|
uuid: app.globalData.uuid,
|
|
drive: "mini",
|
|
...param,
|
|
})
|
|
},
|
|
/**
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
*/
|
|
onReady: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面显示
|
|
*/
|
|
onShow: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面隐藏
|
|
*/
|
|
onHide: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面卸载
|
|
*/
|
|
onUnload: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
*/
|
|
onPullDownRefresh: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 页面上拉触底事件的处理函数
|
|
*/
|
|
onReachBottom: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 用户点击右上角分享
|
|
*/
|
|
onShareAppMessage: function () {
|
|
|
|
}
|
|
})
|