jiazhipeng 10 months ago
parent
commit
2bf637bf35
  1. 548
      pages/index/index.js
  2. 92
      pages/index/index.wxml
  3. 59
      pages/index/index.wxss
  4. 2
      project.config.json

548
pages/index/index.js

@ -120,138 +120,160 @@ Page({
// 公共服务
publicSerivce: [
{
title: "高峰预警",
img: "https://static.ticket.sz-trip.com/uploads/20250526/c7e28d88bde040c386183d69ae9bb228.png",
path: "/pages/pbService/sceneComfort/index?title=高峰预警",
eventName: "comfort_click",
},
{
title: "实时路况",
img: "https://static.ticket.sz-trip.com/uploads/20250526/a678fdc2127648cd7881e36791b2062a.png",
weburl: "https://jiaotonghao2.amap.com/?channel=amap&unitId=257&src=app_share#/",
eventName: "sslk",
},
{
title: "行李直送",
img: "https://static.ticket.sz-trip.com/uploads/20250526/66c8614112630ed168a27150f15a3234.png",
appId: 'wx757dd1ee184e75e9',
pagePath: "pages/tabBar/index/index"
},
{
title: "行李寄存",
img: "https://static.ticket.sz-trip.com/uploads/20250526/3b9886609236df983e6512055662693c.png",
weburl: "https://weixin.2500sz.net/zt/2023/07/luggage_storage/",
eventName: "xljc",
},
{
title: "找厕所",
img: "https://static.ticket.sz-trip.com/uploads/20250526/e8e75d8cd8761d4de4336a35e29e5c6d.png",
path: "/pages/pbService/bike/index?type=1",
},
{
title: "停车场",
img: "https://static.ticket.sz-trip.com/uploads/20250526/ef3d9cfb4817552288d666d8e5617707.png",
weburl: "https://m.cloud.sz-trip.com/ParkingArea",
},
// {
// title: "高峰预警",
// img: "https://static.ticket.sz-trip.com/uploads/20250526/c7e28d88bde040c386183d69ae9bb228.png",
// path: "/pages/pbService/sceneComfort/index?title=高峰预警",
// eventName: "comfort_click",
// keyname: 'gg_gfyj',
// },
// {
// title: "实时路况",
// img: "https://static.ticket.sz-trip.com/uploads/20250526/a678fdc2127648cd7881e36791b2062a.png",
// weburl: "https://jiaotonghao2.amap.com/?channel=amap&unitId=257&src=app_share#/",
// eventName: "sslk",
// keyname: 'gg_sslk',
// },
// {
// title: "行李直送",
// img: "https://static.ticket.sz-trip.com/uploads/20250526/66c8614112630ed168a27150f15a3234.png",
// appId: 'wx757dd1ee184e75e9',
// pagePath: "pages/tabBar/index/index",
// keyname: 'gg_xlzs',
// },
// {
// title: "行李寄存",
// img: "https://static.ticket.sz-trip.com/uploads/20250526/3b9886609236df983e6512055662693c.png",
// weburl: "https://weixin.2500sz.net/zt/2023/07/luggage_storage/",
// eventName: "xljc",
// keyname: 'gg_xljc',
// },
// {
// title: "找厕所",
// img: "https://static.ticket.sz-trip.com/uploads/20250526/e8e75d8cd8761d4de4336a35e29e5c6d.png",
// path: "/pages/pbService/bike/index?type=1",
// keyname: 'gg_zcs',
// },
// {
// title: "停车场",
// img: "https://static.ticket.sz-trip.com/uploads/20250526/ef3d9cfb4817552288d666d8e5617707.png",
// weburl: "https://m.cloud.sz-trip.com/ParkingArea",
// keyname: 'gg_tcc',
// },
],
// 旅游助手
travelData: [
{
title: "最美打卡点",
img: "https://static.ticket.sz-trip.com/uploads/20250526/800a30b94f77c1f7f1bc17f33c0daacd.png",
path: "/subPackageCheckPoint/pages/index/index",
},
{
title: "街巷美食",
img: "https://static.ticket.sz-trip.com/uploads/20250526/a4918bd24ff162991ca8db28759ade51.png",
path: "/pages/list/food/index",
},
{
title: "语音导览",
img: "https://static.ticket.sz-trip.com/uploads/20250526/f72a9f174aa66e520cbfe7429dca6635.png",
appId: "wx74f380bc721a0379",
pagePath: "/pages/listen/listen?title=君到苏州"
},
{
title: "游记攻略",
img: "https://static.ticket.sz-trip.com/uploads/20250526/e1762ba22ba5d4cc5882de321bc10110.png",
path: "/pages/list/strategy/index",
},
// {
// title: "最美打卡点",
// img: "https://static.ticket.sz-trip.com/uploads/20250526/800a30b94f77c1f7f1bc17f33c0daacd.png",
// path: "/subPackageCheckPoint/pages/index/index",
// keyname: 'ly_zmdkd',
// },
// {
// title: "街巷美食",
// img: "https://static.ticket.sz-trip.com/uploads/20250526/a4918bd24ff162991ca8db28759ade51.png",
// path: "/pages/list/food/index",
// keyname: 'ly_jxms',
// },
// {
// title: "语音导览",
// img: "https://static.ticket.sz-trip.com/uploads/20250526/f72a9f174aa66e520cbfe7429dca6635.png",
// appId: "wx74f380bc721a0379",
// pagePath: "/pages/listen/listen?title=君到苏州",
// keyname: 'ly_yydl',
// },
// {
// title: "游记攻略",
// img: "https://static.ticket.sz-trip.com/uploads/20250526/e1762ba22ba5d4cc5882de321bc10110.png",
// path: "/pages/list/strategy/index",
// keyname: 'ly_yjgl',
// },
],
// 数字文旅
travelCulture: [
{
title: "数字非遗",
img: 'https://static.ticket.sz-trip.com/uploads/20250526/bc747aa7767770dc26e663480ac9150d.png',
weburl: "https://m.cloud.sz-trip.com/IntangibleCultural2",
},
{
title: "数字博物馆",
img: 'https://static.ticket.sz-trip.com/uploads/20250526/86c986c2991e968ee143cf5777bb9f08.png',
weburl: "https://m.cloud.sz-trip.com/BwsInfo",
},
{
title: "数字名人馆",
img: 'https://static.ticket.sz-trip.com/uploads/20250526/d570a1bb6961b9ddf26b17cc64b733dd.png',
weburl: "https://www.szsmrg.com/home",
},
{
title: "云上观展",
img: 'https://static.ticket.sz-trip.com/uploads/20250526/8f96c29f6199b811a757e4e5c5901daa.png',
weburl: "https://m.cloud.sz-trip.com/CloudPerform2022",
},
{
title: "云上文博会",
img: 'https://static.ticket.sz-trip.com/uploads/20250529/f45acb752680d1b4cce7d25da02c96f5.png',
weburl: "https://m.cloud.sz-trip.com/CloudExpo",
},
{
title: "精彩回顾",
img: 'https://static.ticket.sz-trip.com/uploads/20250529/74bd8e6b027797a24fbfccaef5c836ad.png',
path: "/pages/pbService/activity/index",
},
{
title: "文化场馆查询",
img: 'https://static.ticket.sz-trip.com/uploads/20250529/ff56544a00fb1cc78e0b307f16daa821.png',
weburl: "https://m.cloud.sz-trip.com/Museum",
},
{
title: "苏影通",
img: 'https://static.ticket.sz-trip.com/uploads/20250526/e60996bf57f35f2dab63c81bc48b609a.png',
weburl: "https://m.cloud.sz-trip.com/movies",
},
{
title: "书仓",
img: 'https://static.ticket.sz-trip.com/uploads/20250526/41d87b6d8d78ac497a6654ad293f9329.png',
appId: 'wx165d4f1727f6bdb0',
pagePath: 'pages/home/home'
},
{
title: "e读书",
img: 'https://static.ticket.sz-trip.com/uploads/20250526/87e9c9e3453492fa1ee65b705565efbb.png',
appId: 'wx26e6f4c0baba005b',
pagePath: 'pages/index/index'
},
{
title: "数字公共文化",
img: 'https://static.ticket.sz-trip.com/uploads/20250526/c60ed1f766645fa67a749dffa0d347a2.png',
weburl: "https://m.cloud.sz-trip.com/PublicCulture2022",
},
{
title: "云游苏州",
img: 'https://static.ticket.sz-trip.com/uploads/20250529/f3b1ec60b5f069182faadf263ec9dfee.png',
weburl: 'https://speed.web.yunyouyizhan.com/downloadApp/index.html#/',
},
{
title: "美图鉴赏",
img: 'https://static.ticket.sz-trip.com/uploads/20250529/820de8c4353bde80379f46e474104c04.png',
path: "/pages/pbService/appreciate/index",
},
// {
// title: "数字非遗",
// img: 'https://static.ticket.sz-trip.com/uploads/20250526/bc747aa7767770dc26e663480ac9150d.png',
// weburl: "https://m.cloud.sz-trip.com/IntangibleCultural2",
// keyname: 'sz_szfy',
// },
// {
// title: "数字博物馆",
// img: 'https://static.ticket.sz-trip.com/uploads/20250526/86c986c2991e968ee143cf5777bb9f08.png',
// weburl: "https://m.cloud.sz-trip.com/BwsInfo",
// keyname: 'sz_szbwg',
// },
// {
// title: "数字名人馆",
// img: 'https://static.ticket.sz-trip.com/uploads/20250526/d570a1bb6961b9ddf26b17cc64b733dd.png',
// weburl: "https://www.szsmrg.com/home",
// keyname: 'sz_szmrg',
// },
// {
// title: "云上观展",
// img: 'https://static.ticket.sz-trip.com/uploads/20250526/8f96c29f6199b811a757e4e5c5901daa.png',
// weburl: "https://m.cloud.sz-trip.com/CloudPerform2022",
// keyname: 'sz_ysgz',
// },
// {
// title: "云上文博会",
// img: 'https://static.ticket.sz-trip.com/uploads/20250529/f45acb752680d1b4cce7d25da02c96f5.png',
// weburl: "https://m.cloud.sz-trip.com/CloudExpo",
// keyname: 'sz_yswbh',
// },
// {
// title: "精彩回顾",
// img: 'https://static.ticket.sz-trip.com/uploads/20250529/74bd8e6b027797a24fbfccaef5c836ad.png',
// path: "/pages/pbService/activity/index",
// keyname: 'sz_jchg',
// },
// {
// title: "文化场馆查询",
// img: 'https://static.ticket.sz-trip.com/uploads/20250529/ff56544a00fb1cc78e0b307f16daa821.png',
// weburl: "https://m.cloud.sz-trip.com/Museum",
// keyname: 'sz_whcgcx',
// },
// {
// title: "苏影通",
// img: 'https://static.ticket.sz-trip.com/uploads/20250526/e60996bf57f35f2dab63c81bc48b609a.png',
// weburl: "https://m.cloud.sz-trip.com/movies",
// keyname: 'sz_syt',
// },
// {
// title: "书仓",
// img: 'https://static.ticket.sz-trip.com/uploads/20250526/41d87b6d8d78ac497a6654ad293f9329.png',
// appId: 'wx165d4f1727f6bdb0',
// pagePath: 'pages/home/home',
// keyname: 'sz_sc',
// },
// {
// title: "e读书",
// img: 'https://static.ticket.sz-trip.com/uploads/20250526/87e9c9e3453492fa1ee65b705565efbb.png',
// appId: 'wx26e6f4c0baba005b',
// pagePath: 'pages/index/index',
// keyname: 'sz_eds',
// },
// {
// title: "数字公共文化",
// img: 'https://static.ticket.sz-trip.com/uploads/20250526/c60ed1f766645fa67a749dffa0d347a2.png',
// weburl: "https://m.cloud.sz-trip.com/PublicCulture2022",
// keyname: 'sz_szggwh',
// },
// {
// title: "云游苏州",
// img: 'https://static.ticket.sz-trip.com/uploads/20250529/f3b1ec60b5f069182faadf263ec9dfee.png',
// weburl: 'https://speed.web.yunyouyizhan.com/downloadApp/index.html#/',
// keyname: 'sz_yysz',
// },
// {
// title: "美图鉴赏",
// img: 'https://static.ticket.sz-trip.com/uploads/20250529/820de8c4353bde80379f46e474104c04.png',
// path: "/pages/pbService/appreciate/index",
// keyname: 'sz_mtjs',
// },
],
scrollLeft: 0,
@ -260,61 +282,80 @@ Page({
// 十全十美
// area_ids: ["changshu","taicang", "kunshan","wujiang","gongyeyuanqu","zhangjiagang","wuzhong","xiangcheng","gusu","gaoxin"],
SQSM: [
{
title: "常熟",
img: "https://static.ticket.sz-trip.com/uploads/20250529/ed641bf31558381e8d1c372e5cbbd155.png",
appId: 'wxdaf3d5edd07dc7af',
pagePath: 'pages/index/index'
},
{
title: "太仓",
img: "https://static.ticket.sz-trip.com/uploads/20250529/f359551295197eff9c0966324659f037.png",
appId: 'wx8853b0d93cbca75e',
pagePath: 'pages/home/home'
},
{
title: "昆山",
img: "https://static.ticket.sz-trip.com/uploads/20250529/35f498dbb43e14cdf3c6bbdf83e613db.png",
appId: 'wx8888a3fd0862b4c8',
pagePath: 'pages/index/index'
},
{
title: "吴江",
img: "https://static.ticket.sz-trip.com/uploads/20250529/2288c75b3797363015bfe633ea9abc0e.png",
appId: 'wx8eadea4ee2d42d4b',
pagePath: 'pages/index/index'
},
{
title: "工业园区",
img: "https://static.ticket.sz-trip.com/uploads/20250529/9e947f0ef8addbe5c52b5bd4de205788.png",
appId: 'wxd323e63a10aa6865',
pagePath: 'pages/home/index'
},
{
title: "张家港",
img: "https://static.ticket.sz-trip.com/uploads/20250529/6162e0a86ec7e7b12e568fd5f81b5c9b.png",
path: "/pages/list/six/index?area=zhangjiagang"
},
{
title: "吴中",
img: "https://static.ticket.sz-trip.com/uploads/20250529/36fc77bf5d6879e6ce06ae349187c2ad.png",
path: "/pages/list/six/index?area=wuzhong"
},
{
title: "相城",
img: "https://static.ticket.sz-trip.com/uploads/20250529/ec54fba906166c7512d26ca8a4fa5a9f.png",
path: "/pages/list/six/index?area=xiangcheng"
},
{
title: "姑苏",
img: "https://static.ticket.sz-trip.com/uploads/20250529/cbb939c4ddfa187489b59adcbe72f7a9.png",
path: "/pages/list/six/index?area=gusu"
},
{
title: "高新",
img: "https://static.ticket.sz-trip.com/uploads/20250529/f2aa7328af4afaa9d1d4ecac1778300a.png",
path: "/pages/list/six/index?area=gaoxin"
},
// {
// title: "常熟",
// img: "https://static.ticket.sz-trip.com/uploads/20250529/ed641bf31558381e8d1c372e5cbbd155.png",
// appId: 'wxdaf3d5edd07dc7af',
// pagePath: 'pages/index/index',
// keyname: 'changshu',
// },
// {
// title: "太仓",
// img: "https://static.ticket.sz-trip.com/uploads/20250529/f359551295197eff9c0966324659f037.png",
// appId: 'wx8853b0d93cbca75e',
// pagePath: 'pages/home/home',
// keyname: 'taicang',
// },
// {
// title: "昆山",
// img: "https://static.ticket.sz-trip.com/uploads/20250529/35f498dbb43e14cdf3c6bbdf83e613db.png",
// appId: 'wx8888a3fd0862b4c8',
// pagePath: 'pages/index/index',
// keyname: 'kunshan',
// },
// {
// title: "吴江",
// img: "https://static.ticket.sz-trip.com/uploads/20250529/2288c75b3797363015bfe633ea9abc0e.png",
// appId: 'wx8eadea4ee2d42d4b',
// pagePath: 'pages/index/index',
// keyname: 'wujiang',
// },
// {
// title: "工业园区",
// img: "https://static.ticket.sz-trip.com/uploads/20250529/9e947f0ef8addbe5c52b5bd4de205788.png",
// appId: 'wxd323e63a10aa6865',
// pagePath: 'pages/home/index',
// keyname: 'yuanqu',
// },
// {
// title: "张家港",
// img: "https://static.ticket.sz-trip.com/uploads/20250529/6162e0a86ec7e7b12e568fd5f81b5c9b.png",
// path: "/pages/list/six/index?area=zhangjiagang",
// keyname: 'zhangjiagang',
// },
// {
// title: "吴中",
// img: "https://static.ticket.sz-trip.com/uploads/20250529/36fc77bf5d6879e6ce06ae349187c2ad.png",
// path: "/pages/list/six/index?area=wuzhong",
// keyname: 'wuzhong',
// },
// {
// title: "相城",
// img: "https://static.ticket.sz-trip.com/uploads/20250529/ec54fba906166c7512d26ca8a4fa5a9f.png",
// path: "/pages/list/six/index?area=xiangcheng",
// keyname: 'xiangcheng',
// },
// {
// title: "姑苏",
// img: "https://static.ticket.sz-trip.com/uploads/20250529/cbb939c4ddfa187489b59adcbe72f7a9.png",
// path: "/pages/list/six/index?area=gusu",
// keyname: 'gusu',
// },
// {
// title: "高新",
// img: "https://static.ticket.sz-trip.com/uploads/20250529/f2aa7328af4afaa9d1d4ecac1778300a.png",
// path: "/pages/list/six/index?area=gaoxin",
// keyname: 'gaoxin',
// },
],
@ -395,6 +436,8 @@ Page({
this.getXpthList() // 限时特惠
this.getList() // 回购榜
this.getRepurchaseList()
// this.getWeather() // 2025-5-26首页改版不需要天气了
// this.getFourProduct() // 活动日历
@ -446,14 +489,15 @@ Page({
this.setData({
indexHot: app.globalData.configJson.indexHot,
isTest: app.globalData.configJson.isTest,
// otherPlat: app.globalData.configJson.otherPlats,
// 正式数据
indexSeason: app.globalData.configJson.indexSeason,
// 开发数据
// indexSeason: imageSource.testImgs.indexSeason,
bannerDataList: (app.globalData.configJson.nav_menu || []),
mainTypeList: (app.globalData.configJson.menu_button || []),
func_data: (app.globalData.configJson.func_data || {}),
publicSerivce: (app.globalData.configJson.service_data || []),
travelData:(app.globalData.configJson.travel_data||[]),
travelCulture:(app.globalData.configJson.number_data||[]),
SQSM:(app.globalData.configJson.city_data||[]),
otherPlat: app.globalData.configJson.platform_data,
func_data: (app.globalData.configJson.func_data||{})
})
} else {
commonApi._post("adv/get_home_ui", {type_id: 3}).then(res => {
@ -463,24 +507,51 @@ Page({
});
app.globalData.configJson.indexSeason = obj
app.globalData.loadIndexSeason = true
app.globalData.configJson.nav_menu = (res.data.nav_menu || [])
app.globalData.configJson.menu_button = (res.data.menu_button || [])
app.globalData.configJson.nav_menu = (res.data.nav_menu || []).map((v,index)=>{
return {...v, pagePoint: {classification: 'nav_menu', key_number: index}}
})
app.globalData.configJson.menu_button = (res.data.menu_button || []).map((v,index)=>{
return {...v, pagePoint: {classification: 'menu_button', key_number: index}}
})
// 公共服务 publicSerivce
app.globalData.configJson.service_data = (res.data.service_data || []).map((v,index)=>{
return {...v, pagePoint: {classification: 'service_data', key_number: index}}
})
// 旅游助手 travelData
app.globalData.configJson.travel_data = (res.data.travel_data || []).map((v,index)=>{
return {...v, pagePoint: {classification: 'travel_data', key_number: index}}
})
// 数字文旅 travelCulture
app.globalData.configJson.number_data = (res.data.number_data || []).map((v,index)=>{
return {...v, pagePoint: {classification: 'number_data', key_number: index}}
})
// 十全十美 SQSM
app.globalData.configJson.city_data = (res.data.city_data || []).map((v,index)=>{
return {...v, pagePoint: {classification: 'city_data', key_number: index}}
})
// 其他平台otherPlat
app.globalData.configJson.platform_data = (res.data.platform_data || []).map((v,index)=>{
return {...v, pagePoint: {classification: 'platform_data', key_number: index}}
})
let func_data = {}
for(let item of (res.data.func_data || [])) {
func_data[item.jump_type] = true
}
app.globalData.configJson.func_data = func_data
console.log('webData', app.globalData.configJson)
this.setData({
indexHot: app.globalData.configJson.indexHot,
isTest: app.globalData.configJson.isTest,
// otherPlat: app.globalData.configJson.otherPlats,
otherPlat: app.globalData.configJson.platform_data,
indexSeason: app.globalData.configJson.indexSeason,
bannerDataList: (app.globalData.configJson.nav_menu || []),
mainTypeList: (app.globalData.configJson.menu_button || []),
publicSerivce: (app.globalData.configJson.service_data || []),
travelData:(app.globalData.configJson.travel_data||[]),
travelCulture:(app.globalData.configJson.number_data||[]),
SQSM:(app.globalData.configJson.city_data||[]),
func_data: (app.globalData.configJson.func_data||{})
})
})
@ -535,15 +606,26 @@ Page({
}
})
// 顶部banner
commonApi._post("adv/getAdv", {position: 0,type_id: 3}).then(res => {
this.setData({banner: res.data || []})
let resData = (res.data || []).map((v,index)=>{
return {...v, pagePoint: {classification: 'bigBanner', key_number: v.id}}
})
this.setData({banner: resData})
})
// 专题banner
commonApi._post("adv/getAdv", {position: 6,type_id: 3}).then(res => {
this.setData({ztbanner: res.data || []})
})
let resData = (res.data || []).map((v,index)=>{
return {...v, pagePoint: {classification: 'specialBanner', key_number: v.id}}
})
this.setData({ztbanner:resData})
})
// 小banner
commonApi._post("adv/getAdv", {position: 1,type_id: 3}).then(res => {
this.setData({xiaobanner: res.data || []})
let resData = (res.data || []).map((v,index)=>{
return {...v, pagePoint: {classification: 'smallBanner', key_number: v.id}}
})
this.setData({xiaobanner: resData})
})
//弹窗广告
commonApi._post("adv/getAdv", {position: 3,type_id: 3}).then(res => {
@ -567,10 +649,9 @@ Page({
bannerClick: function(e) {
if (this.data.isTest) return;
let item = e.currentTarget.dataset.item;
this.pagePoint({
event: "banner_click",
type: 'banner'
}, 1)
console.log(item)
if (item.pagePoint) { this.newPagePoint(item.pagePoint) }
switch (item.jump_type) {
case 0:
break;
@ -652,21 +733,18 @@ Page({
return;
},
newPagePoint (param) {
commonApi._post("browse/newBuryingPoint", {
uuid: app.globalData.uuid,
drive: "mini",
...param,
})
},
//------------------------金刚区点击-------------------------------------
// 自定义数据的跳转
mainIconClick: function(e) {
let item = e.currentTarget.dataset.item
// 埋点
if (item.eventName) {
this.pagePoint({event: item.eventName,}, 1)
}else if (item.title) {
commonApi._post("browse/burying_point", {
uuid: app.globalData.uuid,
drive: "mini",
title: item.title
})
}
if (item.appId) {
wx.navigateToMiniProgram({
@ -693,11 +771,28 @@ Page({
mainNavClick:function (e) {
let item = e.currentTarget.dataset.item
console.log(item)
if (item.pagePoint) { this.newPagePoint(item.pagePoint) }
if (item.jump_type == "page") {
wx.navigateTo({
url: "/"+item.page.mini,
})
return
if (item.page.mini) {
wx.navigateTo({
url: "/"+item.page.mini,
})
return
}
if (item.page.tdata) {
if (item.page.tdata.ghid == "gh_b55e177a4069" || item.page.tdata.appid == 'wx4bb7b6050831f585') {
wx.navigateTo({
url: "/"+item.page.tdata.page,
})
} else {
wx.navigateToMiniProgram({
appId: item.page.tdata.appid,
path: item.page.tdata.page
})
}
}
}
if (item.jump_type == "link") {
wx.navigateTo({
@ -744,7 +839,11 @@ Page({
typeId: 3,
type: 1, // 返回数组
}).then(res => {
this.setData({xpth: res.data,})
console.log("resData",res.data.adv);
(res.data.adv || []).forEach(v=>{ v.pagePoint = {classification: 'flashSales', key_number: v.id} });
(res.data.list || []).forEach(v=>{ v.pagePoint = {classification: 'flashSales', key_number: v.id} });
this.setData({xpth: res.data})
})
},
@ -754,7 +853,8 @@ Page({
this.setData({xpthIndex:value})
},
productGotoDetail: function(e) {
let item = e.currentTarget.dataset.item;
let item = e.currentTarget.dataset.item;
if (item.pagePoint) { this.newPagePoint(item.pagePoint) }
util.gotoDetail(item)
},
@ -763,13 +863,18 @@ Page({
commonApi._post("product/get_product_by_tag_subject", {
tag_id: 85,offset: 0,limit: 5,
}).then(res=>{
this.setData({ list: res.data.list || []})
let resData = res.data.list || []
(resData).forEach(v=>{ v.pagePoint = {classification: 'hot', key_number: v.id} })
this.setData({ list: resData})
})
},
// 回购
getRepurchaseList:function () {
commonApi._post("repurchase/repurchase/getRepurchaseList", {}).then(res=>{
(res.data || []).forEach(v=>v.headimg = this.showImg(v.headimg))
(res.data || []).forEach(v=>{
v.headimg = this.showImg(v.headimg)
v.pagePoint={classification: 'repurchase', key_number: v.product_id}
})
this.setData({ repurchaseList: res.data || []})
})
},
@ -777,15 +882,16 @@ Page({
// if (this.data.list.length < 30) {
// this.getList()
// }
if (this.data.canGetrepurchase) {
this.data.canGetrepurchase = false
this.getRepurchaseList()
}
// if (this.data.canGetrepurchase) {
// this.data.canGetrepurchase = false
// this.getRepurchaseList()
// }
},
gotoDetail: function(e) {
let item = e.currentTarget.dataset.item;
commonApi._post("repurchase/repurchase/recordClick", {product_id:item.product_id})
item.id = item.type=='post'?item.product_id:item.scene_id
// commonApi._post("repurchase/repurchase/recordClick", {product_id:item.product_id})
item.id = item.type=='post'?item.product_id:item.scene_id
if (item.pagePoint) { this.newPagePoint(item.pagePoint) }
util.gotoDetail(item);
},

92
pages/index/index.wxml

@ -25,7 +25,7 @@
<view class="banner-main">
<view catchtap="mainNavClick" class="banner-main-item" wx:for="{{bannerDataList}}" wx:key="index" data-item="{{item}}">
<image src="{{item.icon}}" ></image>
<image src="{{item.icon}}" mode="aspectFill"></image>
</view>
</view>
</view>
@ -46,7 +46,7 @@
display-multiple-items="5" circular
current="0">
<block wx:for="{{mainTypeList}}" wx:key="index">
<swiper-item bindtap="mainNavClick" class="top-icon-item {{(mainNavIndex+2)==index || (index==0&&mainNavIndex==6)||(index==1&&mainNavIndex==7)?'active':''}}" data-item="{{item}}">
<swiper-item bindtap="mainNavClick" class="top-icon-item {{(mainNavIndex+2)==index || (index==0&&mainNavIndex==mainTypeList.length-2)||(index==1&&mainNavIndex==mainTypeList.length-1)?'active':''}}" data-item="{{item}}">
<image src="{{item.icon}}" mode="aspectFill" class="{{(mainNavIndex+2)==index?'active':''}}"></image>
<view class="top-icon-text">{{item.menu_name}}</view>
</swiper-item>
@ -81,11 +81,11 @@
<!-- 上方标题部分 -->
<view class="xsth-title">
<view class="xsth-left" style="display: flex;">
<image wx:if="{{xpthIndex==0}}" mode="heightFix" class="common-header-img" src="https://static.ticket.sz-trip.com/uploads/20250604/9bd8c914b1e47d1856729357da00a7b1.png"></image>
<image wx:else="" bindtap="changeXpthIndex" data-value="{{0}}" mode="heightFix" class="common-header-img" src="https://static.ticket.sz-trip.com/uploads/20250526/2bcce6d179c4abd3fa6cbdec8c8519bf.png"></image>
<image style="width: 253.33rpx;" wx:if="{{xpthIndex==0}}" mode="aspectFill" class="common-header-img" src="{{indexSeason.hotBac}}"></image>
<image style="width: 253.33rpx;" wx:else="" bindtap="changeXpthIndex" data-value="{{0}}" mode="aspectFill" class="common-header-img" src="{{indexSeason.hotBacImg}}"></image>
<image wx:if="{{xpthIndex==0}}" bindtap="changeXpthIndex" data-value="{{1}}" mode="heightFix" class="common-header-img" src="https://static.ticket.sz-trip.com/uploads/20250527/1d1117bf6120fb75159eb8657b15c640.png"></image>
<image wx:else mode="heightFix" class="common-header-img" src="https://static.ticket.sz-trip.com/uploads/20250604/13c6feaebe2e2a575a64627502608153.png"></image>
<image style="width: 253.33rpx;" wx:if="{{xpthIndex==0}}" bindtap="changeXpthIndex" data-value="{{1}}" mode="aspectFill" class="common-header-img" src="{{indexSeason.xpthBacImg}}"></image>
<image style="width: 253.33rpx;" wx:else mode="aspectFill" class="common-header-img" src="{{indexSeason.xpthBac}}"></image>
</view>
</view>
<!-- 热门 -->
@ -100,7 +100,7 @@
<text>¥</text><text>{{item.price/100}}</text><text>起</text>
</view>
</view>
<image class="hot-cover-img" src="https://static.ticket.sz-trip.com/uploads/20250529/4b2ad9bdc8df0b0f7e67da1bef171e5d.png"></image>
<!-- <image class="hot-cover-img" src="https://static.ticket.sz-trip.com/uploads/20250529/4b2ad9bdc8df0b0f7e67da1bef171e5d.png"></image> -->
</view>
</view>
</scroll-view>
@ -111,14 +111,14 @@
<!-- 左边的2个产品 -->
<view class="xpth-left">
<view class="xpth-item" wx:for="{{xpth.list}}" bindtap="productGotoDetail" data-item="{{item}}" wx:key="id">
<image class="prod-img" src="{{item.headimg}}" mode="" />
<image class="prod-img" src="{{item.headimg}}" mode="aspectFill" />
<view class="xpth-item-content">
<view class="xpth-item-title textOver2">{{item.title}}</view>
<view class="xpth-item-bottom">
<view class="xpth-item-price">{{item.price/100}}</view>
</view>
</view>
<image class="cover-image" src="https://static.ticket.sz-trip.com/uploads/20250526/ed62e372f9c8874f9b50b40f70982202.png"></image>
<!-- <image class="cover-image" src="https://static.ticket.sz-trip.com/uploads/20250526/ed62e372f9c8874f9b50b40f70982202.png"></image> -->
</view>
</view>
<!-- 右边的banner -->
@ -127,9 +127,9 @@
bindchange="changeBannerIndex" data-keyname="XPathBannerIndex">
<block wx:for="{{xpth.adv}}" wx:key="index">
<swiper-item bindtap="bannerClick" data-item="{{item}}">
<image src="{{item.head_img}}"></image>
<image src="{{item.head_img}}" mode="aspectFill"></image>
<!-- <view class="xpth-cover textOver2">{{item.title}}</view> -->
<image class="cover-image" src="https://static.ticket.sz-trip.com/uploads/20250526/90645448ce9a82c91916543bc6c4935c.png"></image>
<!-- <image class="cover-image" src="https://static.ticket.sz-trip.com/uploads/20250526/90645448ce9a82c91916543bc6c4935c.png"></image> -->
</swiper-item>
</block>
</swiper>
@ -146,7 +146,7 @@
<block wx:for="{{xiaobanner}}" wx:key="index">
<swiper-item bindtap="bannerClick" data-item="{{item}}" style="position: relative;">
<!-- 原 圆角77rpx,现改为13rpx -->
<image style="position: absolute;left: 0;right: 0;top: 0;bottom: 0;" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/index2025/smallBg.png"></image>
<!-- <image style="position: absolute;left: 0;right: 0;top: 0;bottom: 0;" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/index2025/smallBg.png"></image> -->
<image style="border-radius:13rpx" src="{{item.head_img}}" mode="aspectFill"></image>
</swiper-item>
</block>
@ -160,14 +160,14 @@
<view class="sale-road-boxes" style="margin-top:0;" wx:if="{{func_data.service_public}}">
<image class="common-header-img" mode="heightFix" src="{{indexSeason.ggfw}}"></image>
<navigator url="/pages/pbService/index" catchtap="pagePoint" data-event="public_view" class="title-more">
<view style="height: 40rpx;line-height: 40rpx;">更多</view>
<image style="width: 12rpx;height: 20rpx;margin-left: 8rpx;" src="https://static.ticket.sz-trip.com/uploads/20250526/e6b945c42851563e9672c6992057bd91.png" mode="" />
<view style="height: 40rpx;line-height: 40rpx;">更多 ></view>
<!-- <image style="width: 12rpx;height: 20rpx;margin-left: 8rpx;" src="https://static.ticket.sz-trip.com/uploads/20250526/e6b945c42851563e9672c6992057bd91.png" mode="" /> -->
</navigator>
</view>
<view wx:if="{{func_data.service_public}}">
<view class="ggfw-list" style="width:100%;margin-top: 30rpx;">
<view class="ggfw" wx:for="{{publicSerivce}}" wx:key="index" data-item="{{item}}" bindtap="mainIconClick">
<image src="{{item.img}}"></image>
<view class="ggfw" wx:for="{{publicSerivce}}" wx:key="index" data-item="{{item}}" bindtap="mainNavClick">
<image src="{{item.icon}}" mode="aspectFill"></image>
</view>
</view>
</view>
@ -178,8 +178,8 @@
<!-- <image class="rmtj-right" src="{{imageSourceList.CBTP[1]}}" mode="" style="width: 276rpx;height: 100rpx;"/> -->
</view>
<view class="pic-list" style="margin-top:30rpx" wx:if="{{func_data.helper_travel}}">
<image class="new-pic" wx:for="{{travelData}}" wx:key="index" data-item="{{item}}" bindtap="mainIconClick"
src="{{item.img}}" mode="aspectFill"></image>
<image class="new-pic" wx:for="{{travelData}}" wx:key="index" data-item="{{item}}" bindtap="mainNavClick"
src="{{item.icon}}" mode="aspectFill"></image>
</view>
<!-- ai避高峰 -->
@ -202,8 +202,8 @@
<!-- 元旦修改 .slide-box的原样式 height:360rpx-->
<scroll-view scroll-x style="height:400rpx" bindscroll="listenScroll" data-keyname="scrollLeft" class="slide-box">
<view class="pbservice">
<view class="pbservice-item" wx:for="{{travelCulture}}" wx:key="index" data-item="{{item}}" bindtap="mainIconClick">
<image src="{{item.img}}" mode="widthFix"></image>
<view class="pbservice-item" wx:for="{{travelCulture}}" wx:key="index" data-item="{{item}}" bindtap="mainNavClick">
<image src="{{item.icon}}" mode="aspectFill"></image>
<!-- <view class="text">{{item.title}}</view> -->
</view>
@ -221,7 +221,7 @@
<!-- <image class="rmtj-right" src="{{imageSourceList.CBTP[2]}}" mode="" /> -->
</view>
<view class="six-box-new" wx:if="{{func_data.scenery_ten}}">
<image wx:for="{{SQSM}}" src="{{item.img}}" data-item="{{item}}" bindtap="mainIconClick" mode="widthFix" wx:key="index"></image>
<image wx:for="{{SQSM}}" src="{{item.icon}}" data-item="{{item}}" bindtap="mainNavClick" mode="aspectFill" wx:key="index"></image>
</view>
<!-- 长三角文旅平台 -->
@ -230,8 +230,8 @@
<!-- <image class="rmtj-right" src="{{imageSourceList.CBTP[3]}}" mode="" style="width: 276rpx;height: 100rpx;"/> -->
</view>
<view class="other-plats" wx:if="{{otherPlat &&func_data.platform_nearby}}">
<view class="other-plat" wx:for="{{otherPlat}}" bindtap="gotoOther" data-item="{{item}}" wx:key="index">
<image src="{{item.icon}}" mode="heightFix"></image>
<view class="other-plat" wx:for="{{otherPlat}}" bindtap="mainNavClick" data-item="{{item}}" wx:key="index">
<image src="{{item.icon}}" mode="aspectFill"></image>
<!-- <view>{{item.name}}</view> -->
</view>
</view>
@ -305,3 +305,49 @@
</view>
</view>
<view class="bg" wx:else style="background-image: url({{indexSeason.background}});">
<!-- 顶部banner -->
<view style="position:relative;z-index: 1;">
<swiper class="swiper" autoplay="{{true}}" interval="{{5000}}" duration="{{300}}"
bindchange="changeBannerIndex" data-keyname="activeBannerIndex" circular>
<block wx:for="{{banner}}" wx:key="index">
<swiper-item data-item="{{item}}">
<image src="{{item.head_img}}" mode="scaleToFill"></image>
</swiper-item>
</block>
</swiper>
<!-- <view class="com-flex dot-list">
<view class="dot{{index===activeBannerIndex?' active':''}}" wx:for="{{banner}}" wx:key="index"></view>
</view> -->
<view class="banner-main">
<view catchtap="mainNavClick" class="banner-main-item" wx:for="{{[bannerDataList[0]]}}" wx:key="index" data-item="{{item}}">
<image src="{{item.icon}}" ></image>
</view>
</view>
</view>
<view class="main-content" >
<view class="content-box">
<!-- 苏城环游记 todo-->
<view class="small-swiper-box" wx:if="{{ztbanner.length>0 && func_data.tour_guide}}">
<swiper class="small-swiper" autoplay="{{true}}" interval="{{5000}}" duration="{{300}}"
bindchange="changeBannerIndex" data-keyname="ztBannerIndex">
<block wx:for="{{ztbanner}}" wx:key="index">
<swiper-item bindtap="bannerClick" data-item="{{item}}">
<!-- 原 圆角77rpx,现改为13rpx -->
<image style="border-radius:13rpx" src="{{item.head_img}}" mode="aspectFill"></image>
</swiper-item>
</block>
</swiper>
</view>
</view>
</view>
</view>

59
pages/index/index.wxss

@ -1,7 +1,13 @@
/**index.wxss**/
/* 元旦修改 */
page {
padding-bottom: 36.67rpx;
.bg{
height: 100vh;
overflow-x: hidden;
overflow-y: auto;
background-size: 100% 100%;
background-repeat: no-repeat;
/* background-color:#E8F9FA; */
}
.swiper,.swiper image {
width: 100%;
@ -57,22 +63,22 @@ page {
right: 0;
display: flex;
justify-content: space-between;
padding: 187rpx 30rpx 30rpx;
padding: 187rpx 20rpx 30rpx;
box-sizing: border-box;
background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(0, 0, 0, 0.2))
}
.banner-main image{
width: 153.33rpx;
height: 133.33rpx;
width: 173.33rpx;
height: 173.33rpx;
}
.main-content{
background-color:#E8F9FA;
/* background-color:#E8F9FA; */
margin-top: -10rpx;
border-radius: 20rpx;
position: relative;
z-index: 4;
background-image: url("https://static.ticket.sz-trip.com/uploads/20250526/150bd1f9312967bd7d9bedc6dbb8dd48.png");
/* background-image: url("https://static.ticket.sz-trip.com/uploads/20250526/150bd1f9312967bd7d9bedc6dbb8dd48.png"); */
background-size: 100% auto;
background-repeat: repeat-y;
/* padding-top: 63rpx; */
@ -100,8 +106,8 @@ page {
margin-right: 0;
}
.top-icon-item image {
width: 80rpx;
height: 80rpx;
width: 93.33rpx;
height: 93.33rpx;
display: block;
transition: all 0.2s;
/* margin: 0 auto; */
@ -113,15 +119,15 @@ page {
margin-bottom: 0;
}
.top-icon-item.active image{
height: 130rpx;
width: 130rpx;
height: 133rpx;
width: 133rpx;
}
.content-box {
margin: 0 25rpx;
}
.common-header-img{
height: 63.33rpx;
height: 106.67rpx;
}
.small-swiper {
@ -188,12 +194,13 @@ page {
color: #000000;
position: relative;
background: white;
border-radius: 20rpx;
}
.season-hot .season-item image{
width: 100%;
height: 200rpx;
border-top-right-radius: 14rpx;
border-radius: 20rpx 20rpx 0 0;
}
.season-hot .season-item .hot-cover-img{
position: absolute;
@ -250,7 +257,7 @@ page {
flex: 1;
height: 100%;
width: 100%;
/* border-radius: 20rpx; */
border-radius: 20rpx;
}
.xpth-banner-dot-list{
position: absolute;
@ -384,14 +391,14 @@ page {
}
.new-pic {
width: 340rpx;
height: 140rpx;
height: 146.67rpx;
margin-bottom: 20rpx;
}
.title-more {
font-size: 27rpx;
font-weight: 500;
color: #1A9BA7;
color: #000;
z-index: 9;
width: 173rpx;
height: 63.33rpx;
@ -433,8 +440,8 @@ page {
width: 200rpx;
}
.pbservice-item image {
width: 158rpx;
height: 152rpx;
width: 166.67rpx;
height: 146.67rpx;
/* margin-bottom: 10rpx; */
}
.six-box {
@ -605,13 +612,13 @@ page {
width: 34rpx !important;
height: 7rpx;
background: #87E1EC;
background: white;
border-radius: 3rpx;
margin: 33.33rpx auto;
}
.scroll-line-bg {
height: 7rpx;
background: #30A7CD;
background: #b2b2b2;
border-radius: 3rpx;
}
@ -638,9 +645,9 @@ page {
align-items: center;
}
.other-plats image {
width: 153.33rpx;
width: 340rpx;
display: block;
height: 111.33rpx;
height: 146.67rpx;
margin-bottom: 15rpx;
}
@ -743,8 +750,8 @@ page {
.ggfw-list .ggfw {
width: 220rpx;
height: 72rpx;
margin-bottom: 14rpx;
height: 106.67rpx;
margin-bottom: 20rpx;
}
.ggfw image{
width: 100%;
@ -765,8 +772,8 @@ page {
}
.six-box-new image {
width: 334rpx;
height: 193.33rpx !important;
width: 333.33rpx;
height: 200rpx !important;
/* background: #FFE7C0; */
border-radius: 20rpx;
flex-shrink: 0;

2
project.config.json

@ -7,7 +7,7 @@
"setting": {
"urlCheck": false,
"es6": true,
"enhance": false,
"enhance": true,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,

Loading…
Cancel
Save