|
|
@ -56,10 +56,10 @@ Page({ |
|
|
'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",
|
|
|
viewHeight:"0px", |
|
|
}, |
|
|
}, |
|
|
onLoad: function (options) { |
|
|
onLoad: function (options) { |
|
|
// this.getHeight()
|
|
|
this.getHeight() |
|
|
//全屏广告
|
|
|
//全屏广告
|
|
|
wx.hideTabBar() //这里隐藏了底部导航栏
|
|
|
wx.hideTabBar() //这里隐藏了底部导航栏
|
|
|
commonApi._post("adv/getAdv", { |
|
|
commonApi._post("adv/getAdv", { |
|
|
@ -84,7 +84,7 @@ Page({ |
|
|
}, 1000) |
|
|
}, 1000) |
|
|
let length = res.data.length |
|
|
let length = res.data.length |
|
|
if (res.data.length > 1) { |
|
|
if (res.data.length > 1) { |
|
|
let num = Math.round(Math.random()*length)-1; |
|
|
let num = Math.floor(Math.random()*length); |
|
|
console.log('num',num); |
|
|
console.log('num',num); |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
startList:res.data[num] |
|
|
startList:res.data[num] |
|
|
@ -146,18 +146,18 @@ Page({ |
|
|
this.getVideoPrize() |
|
|
this.getVideoPrize() |
|
|
this.getXpthList() |
|
|
this.getXpthList() |
|
|
}, |
|
|
}, |
|
|
// getHeight() {
|
|
|
getHeight() { |
|
|
// let that = this
|
|
|
let that = this |
|
|
// wx.getSystemInfo({
|
|
|
wx.getSystemInfo({ |
|
|
// success(res) {
|
|
|
success(res) { |
|
|
// console.log(res)
|
|
|
console.log(res) |
|
|
// that.setData({
|
|
|
that.setData({ |
|
|
// viewHeight:res.windowHeight+'px'
|
|
|
viewHeight:res.windowHeight+'px' |
|
|
// })
|
|
|
}) |
|
|
// console.log(that.data.viewHeight)
|
|
|
console.log(that.data.viewHeight) |
|
|
// }
|
|
|
} |
|
|
// })
|
|
|
}) |
|
|
// },
|
|
|
}, |
|
|
getXpthList:function () { |
|
|
getXpthList:function () { |
|
|
// 元旦新增 新品特惠
|
|
|
// 元旦新增 新品特惠
|
|
|
commonApi._post("product/get_product_indulgence", { |
|
|
commonApi._post("product/get_product_indulgence", { |
|
|
|