|
|
@ -17,7 +17,9 @@ Page({ |
|
|
fourProduct: [], |
|
|
fourProduct: [], |
|
|
hotIndex: 0, |
|
|
hotIndex: 0, |
|
|
indexHot: [], |
|
|
indexHot: [], |
|
|
area_ids: ["zhangjiagang", "changshu", "taicang", "kunshan", "wujiang", "wuzhong", "xiangcheng", "gusu", "gongyeyuanqu", "gaoxin"], |
|
|
area_ids: ["zhangjiagang", "changshu", "taicang", "kunshan", "wujiang", "wuzhong", "xiangcheng", "gusu", |
|
|
|
|
|
"gongyeyuanqu", "gaoxin" |
|
|
|
|
|
], |
|
|
month: "", |
|
|
month: "", |
|
|
months: ['JAN', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'oct', 'nov', 'dec'], |
|
|
months: ['JAN', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'oct', 'nov', 'dec'], |
|
|
date: "", |
|
|
date: "", |
|
|
@ -35,7 +37,9 @@ Page({ |
|
|
smBannerIndex: 0, |
|
|
smBannerIndex: 0, |
|
|
indexSeason: {}, |
|
|
indexSeason: {}, |
|
|
// startList: [], // 启动页广告
|
|
|
// startList: [], // 启动页广告
|
|
|
startList: {head_img:''}, // 启动页广告
|
|
|
startList: { |
|
|
|
|
|
head_img: '' |
|
|
|
|
|
}, // 启动页广告
|
|
|
alertSwipeList: [], //弹窗广告
|
|
|
alertSwipeList: [], //弹窗广告
|
|
|
showAdv: false, //弹窗开关
|
|
|
showAdv: false, //弹窗开关
|
|
|
showFullAdv: true, //全屏广告开关
|
|
|
showFullAdv: true, //全屏广告开关
|
|
|
@ -58,6 +62,8 @@ Page({ |
|
|
'https://static.ticket.sz-trip.com/uploads/20240428/23e07551be831036116c2fedbbf7aea5.png', |
|
|
'https://static.ticket.sz-trip.com/uploads/20240428/23e07551be831036116c2fedbbf7aea5.png', |
|
|
], |
|
|
], |
|
|
viewHeight: "0px", |
|
|
viewHeight: "0px", |
|
|
|
|
|
isMuted: true, |
|
|
|
|
|
videoPlay: false, |
|
|
}, |
|
|
}, |
|
|
onLoad: function(options) { |
|
|
onLoad: function(options) { |
|
|
this.getHeight() |
|
|
this.getHeight() |
|
|
@ -68,6 +74,22 @@ Page({ |
|
|
type_id: 3 |
|
|
type_id: 3 |
|
|
}).then(res => { |
|
|
}).then(res => { |
|
|
if (res.data.length > 0) { |
|
|
if (res.data.length > 0) { |
|
|
|
|
|
let length = res.data.length |
|
|
|
|
|
if (res.data.length > 1) { |
|
|
|
|
|
let num = Math.floor(Math.random() * length); |
|
|
|
|
|
console.log('num', num); |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
startList: res.data[num] |
|
|
|
|
|
}) |
|
|
|
|
|
console.log(this.data.startList.head_img); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
startList: res.data[0] |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 图片
|
|
|
|
|
|
if (this.data.startList.media_type) { |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
showTime: true |
|
|
showTime: true |
|
|
}) |
|
|
}) |
|
|
@ -91,18 +113,8 @@ Page({ |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}, 1000) |
|
|
}, 1000) |
|
|
let length = res.data.length |
|
|
|
|
|
if (res.data.length > 1) { |
|
|
|
|
|
let num = Math.floor(Math.random()*length); |
|
|
|
|
|
console.log('num',num); |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
startList:res.data[num] |
|
|
|
|
|
}) |
|
|
|
|
|
console.log(this.data.startList.head_img); |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
this.setData({ |
|
|
// 视频
|
|
|
startList:res.data[0] |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
@ -198,7 +210,11 @@ Page({ |
|
|
m = m < 10 ? "0" + m : m; |
|
|
m = m < 10 ? "0" + m : m; |
|
|
s = s < 10 ? "0" + s : s; |
|
|
s = s < 10 ? "0" + s : s; |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
djs:{h:h,m:m,s:s} |
|
|
djs: { |
|
|
|
|
|
h: h, |
|
|
|
|
|
m: m, |
|
|
|
|
|
s: s |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
return |
|
|
return |
|
|
}, |
|
|
}, |
|
|
@ -323,6 +339,28 @@ Page({ |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 是否静音
|
|
|
|
|
|
closeMuted: function() { |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
isMuted: this.data.isMuted = !this.data.isMuted |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
// 播放视频
|
|
|
|
|
|
videoPlay: function() { |
|
|
|
|
|
let videoplay = wx.createVideoContext('myVideo', this) |
|
|
|
|
|
videoplay.play(); |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
videoPlay: false |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
// 暂停视频
|
|
|
|
|
|
videoPause: function() { |
|
|
|
|
|
let videoplay = wx.createVideoContext('myVideo', this) |
|
|
|
|
|
videoplay.pause(); |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
videoPlay: true |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
getWeather: function() { |
|
|
getWeather: function() { |
|
|
commonApi._post('pbservice/Ztfw/getWeather').then(res => { |
|
|
commonApi._post('pbservice/Ztfw/getWeather').then(res => { |
|
|
console.log(res) |
|
|
console.log(res) |
|
|
@ -411,7 +449,8 @@ Page({ |
|
|
let item = e.currentTarget.dataset.item; |
|
|
let item = e.currentTarget.dataset.item; |
|
|
if (this.data.indexHot[this.data.hotIndex].type == 'movie') { |
|
|
if (this.data.indexHot[this.data.hotIndex].type == 'movie') { |
|
|
wx.navigateTo({ |
|
|
wx.navigateTo({ |
|
|
url: '/pages/list/movieticket/list/info/index?id=' + item.third_id + '&title=' + item.title, |
|
|
url: '/pages/list/movieticket/list/info/index?id=' + item.third_id + '&title=' + |
|
|
|
|
|
item.title, |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
util.gotoDetail(item) |
|
|
util.gotoDetail(item) |
|
|
@ -633,12 +672,14 @@ Page({ |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
|
case 3: |
|
|
case 3: |
|
|
if ((item.tdata.url.indexOf('http://') != -1 || item.tdata.url.indexOf('https://') != -1) && item.tdata.url.indexOf('m.cloud.sz-trip.com') == -1) { |
|
|
if ((item.tdata.url.indexOf('http://') != -1 || item.tdata.url.indexOf('https://') != -1) && |
|
|
|
|
|
item.tdata.url.indexOf('m.cloud.sz-trip.com') == -1) { |
|
|
// 外部h5
|
|
|
// 外部h5
|
|
|
console.log(111, item.tdata) |
|
|
console.log(111, item.tdata) |
|
|
app.globalData.weburl = item.tdata.url; |
|
|
app.globalData.weburl = item.tdata.url; |
|
|
wx.navigateTo({ |
|
|
wx.navigateTo({ |
|
|
url: "/pages/pbService/web/index?weburl=" + encodeURIComponent(item.tdata.url) |
|
|
url: "/pages/pbService/web/index?weburl=" + encodeURIComponent(item.tdata |
|
|
|
|
|
.url) |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
let page = item.tdata.url.split("/"); |
|
|
let page = item.tdata.url.split("/"); |
|
|
@ -646,10 +687,13 @@ Page({ |
|
|
console.log(page[0]) |
|
|
console.log(page[0]) |
|
|
let url = this.data.urltopage[page[0]]; |
|
|
let url = this.data.urltopage[page[0]]; |
|
|
if (url && url.indexOf('map') != -1) { |
|
|
if (url && url.indexOf('map') != -1) { |
|
|
let types = ['', 'scenic', 'venue', 'post', 'restaurant', 'relic', 'tenscenic', 'cinema', 'academes'], |
|
|
let types = ['', 'scenic', 'venue', 'post', 'restaurant', 'relic', 'tenscenic', |
|
|
|
|
|
'cinema', 'academes' |
|
|
|
|
|
], |
|
|
type = page[1] ? page[1].split("=") : []; |
|
|
type = page[1] ? page[1].split("=") : []; |
|
|
wx.reLaunch({ |
|
|
wx.reLaunch({ |
|
|
url: url + "?type=" + (type[1] ? types.findIndex(t => t == type[1]) : null) |
|
|
url: url + "?type=" + (type[1] ? types.findIndex(t => t == type[1]) : |
|
|
|
|
|
null) |
|
|
}) |
|
|
}) |
|
|
} else if (url) { |
|
|
} else if (url) { |
|
|
wx.navigateTo({ |
|
|
wx.navigateTo({ |
|
|
@ -659,7 +703,8 @@ Page({ |
|
|
app.globalData.weburl = item.tdata.url; |
|
|
app.globalData.weburl = item.tdata.url; |
|
|
console.log(2222, item.tdata.url, app.globalData.weburl) |
|
|
console.log(2222, item.tdata.url, app.globalData.weburl) |
|
|
wx.navigateTo({ |
|
|
wx.navigateTo({ |
|
|
url: "/pages/pbService/web/index?weburl=" + encodeURIComponent(item.tdata.url) |
|
|
url: "/pages/pbService/web/index?weburl=" + encodeURIComponent(item |
|
|
|
|
|
.tdata.url) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -800,7 +845,8 @@ Page({ |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
|
case 3: |
|
|
case 3: |
|
|
if ((item.tdata.url.indexOf('http://') != -1 || item.tdata.url.indexOf('https://') != -1) && item.tdata.url.indexOf('m.cloud.sz-trip.com') == -1) { |
|
|
if ((item.tdata.url.indexOf('http://') != -1 || item.tdata.url.indexOf('https://') != -1) && |
|
|
|
|
|
item.tdata.url.indexOf('m.cloud.sz-trip.com') == -1) { |
|
|
// 外部h5
|
|
|
// 外部h5
|
|
|
console.log(item.tdata) |
|
|
console.log(item.tdata) |
|
|
app.globalData.weburl = item.tdata.url; |
|
|
app.globalData.weburl = item.tdata.url; |
|
|
@ -813,7 +859,9 @@ Page({ |
|
|
console.log(page[0]) |
|
|
console.log(page[0]) |
|
|
let url = this.data.urltopage[page[0]]; |
|
|
let url = this.data.urltopage[page[0]]; |
|
|
if (url && url.indexOf('map') != -1) { |
|
|
if (url && url.indexOf('map') != -1) { |
|
|
let types = ['', 'scenic', 'venue', 'post', 'restaurant', 'relic', 'tenscenic', 'cinema', 'academes'], |
|
|
let types = ['', 'scenic', 'venue', 'post', 'restaurant', 'relic', 'tenscenic', |
|
|
|
|
|
'cinema', 'academes' |
|
|
|
|
|
], |
|
|
type = page[1] ? page[1].split("=") : []; |
|
|
type = page[1] ? page[1].split("=") : []; |
|
|
wx.reLaunch({ |
|
|
wx.reLaunch({ |
|
|
url: url + "?type=" + (type[1] ? types.findIndex(t => t == type[1]) : null) |
|
|
url: url + "?type=" + (type[1] ? types.findIndex(t => t == type[1]) : null) |
|
|
|