|
|
@ -34,11 +34,12 @@ Page({ |
|
|
activeBannerIndex: 0, |
|
|
activeBannerIndex: 0, |
|
|
smBannerIndex: 0, |
|
|
smBannerIndex: 0, |
|
|
indexSeason: {}, |
|
|
indexSeason: {}, |
|
|
startList: [], // 启动页广告
|
|
|
// startList: [], // 启动页广告
|
|
|
|
|
|
startList: {head_img:''}, // 启动页广告
|
|
|
alertSwipeList: [], //弹窗广告
|
|
|
alertSwipeList: [], //弹窗广告
|
|
|
showAdv: false, //弹窗开关
|
|
|
showAdv: false, //弹窗开关
|
|
|
showFullAdv: true, //全屏广告开关
|
|
|
showFullAdv: true, //全屏广告开关
|
|
|
time: 5, //全屏广告剩余时间
|
|
|
time: 3, //全屏广告剩余时间
|
|
|
showTime:false, |
|
|
showTime:false, |
|
|
xpth:{}, // 元旦新增 新品特惠和sqjNew
|
|
|
xpth:{}, // 元旦新增 新品特惠和sqjNew
|
|
|
djs:null, // 元旦新增 新品特惠倒计时
|
|
|
djs:null, // 元旦新增 新品特惠倒计时
|
|
|
@ -54,9 +55,11 @@ Page({ |
|
|
'https://static.ticket.sz-trip.com/uploads/20240228/c7de980e14c66a39215e7bf5f66ba218.png', |
|
|
'https://static.ticket.sz-trip.com/uploads/20240228/c7de980e14c66a39215e7bf5f66ba218.png', |
|
|
'https://static.ticket.sz-trip.com/uploads/20240228/24010b7a7a88b91c0ea75cf3f073702e.png', |
|
|
'https://static.ticket.sz-trip.com/uploads/20240228/24010b7a7a88b91c0ea75cf3f073702e.png', |
|
|
'https://static.ticket.sz-trip.com/uploads/20240228/59e199b98bfb9fbe4fd996503d5f5698.png', |
|
|
'https://static.ticket.sz-trip.com/uploads/20240228/59e199b98bfb9fbe4fd996503d5f5698.png', |
|
|
] |
|
|
], |
|
|
|
|
|
// viewHeight:"0px",
|
|
|
}, |
|
|
}, |
|
|
onLoad: function (options) { |
|
|
onLoad: function (options) { |
|
|
|
|
|
// this.getHeight()
|
|
|
//全屏广告
|
|
|
//全屏广告
|
|
|
wx.hideTabBar() //这里隐藏了底部导航栏
|
|
|
wx.hideTabBar() //这里隐藏了底部导航栏
|
|
|
commonApi._post("adv/getAdv", { |
|
|
commonApi._post("adv/getAdv", { |
|
|
@ -72,20 +75,26 @@ Page({ |
|
|
time: this.data.time - 1 |
|
|
time: this.data.time - 1 |
|
|
}) |
|
|
}) |
|
|
if (this.data.time == 0) { |
|
|
if (this.data.time == 0) { |
|
|
timer = null |
|
|
clearInterval(timer) |
|
|
|
|
|
wx.showTabBar() //倒计时结束清除定时器显示导航栏
|
|
|
this.setData({ |
|
|
this.setData({ |
|
|
showFullAdv: false |
|
|
showFullAdv: false |
|
|
}) |
|
|
}) |
|
|
if (this.data.alertSwipeList.length==0) { |
|
|
|
|
|
wx.showTabBar() //倒计时结束清楚定时器显示导航栏
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}, 1000) |
|
|
}, 1000) |
|
|
this.setData({ |
|
|
let length = res.data.length |
|
|
startList: res.data || [] |
|
|
if (res.data.length > 1) { |
|
|
}) |
|
|
let num = Math.round(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] |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
}else{ |
|
|
}else{ |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
showFullAdv: false |
|
|
showFullAdv: false |
|
|
@ -137,6 +146,18 @@ Page({ |
|
|
this.getVideoPrize() |
|
|
this.getVideoPrize() |
|
|
this.getXpthList() |
|
|
this.getXpthList() |
|
|
}, |
|
|
}, |
|
|
|
|
|
// getHeight() {
|
|
|
|
|
|
// let that = this
|
|
|
|
|
|
// wx.getSystemInfo({
|
|
|
|
|
|
// success(res) {
|
|
|
|
|
|
// console.log(res)
|
|
|
|
|
|
// that.setData({
|
|
|
|
|
|
// viewHeight:res.windowHeight+'px'
|
|
|
|
|
|
// })
|
|
|
|
|
|
// console.log(that.data.viewHeight)
|
|
|
|
|
|
// }
|
|
|
|
|
|
// })
|
|
|
|
|
|
// },
|
|
|
getXpthList:function () { |
|
|
getXpthList:function () { |
|
|
// 元旦新增 新品特惠
|
|
|
// 元旦新增 新品特惠
|
|
|
commonApi._post("product/get_product_indulgence", { |
|
|
commonApi._post("product/get_product_indulgence", { |
|
|
@ -863,7 +884,7 @@ Page({ |
|
|
this.pagePoint({ |
|
|
this.pagePoint({ |
|
|
event: 'home_view' |
|
|
event: 'home_view' |
|
|
}, 1) |
|
|
}, 1) |
|
|
this.data.time!=5?wx.showTabBar():1 |
|
|
// this.data.time!=5?wx.showTabBar():1
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
|