Browse Source

修改

master
shaojing 2 years ago
parent
commit
f159e97a15
  1. 30
      pages/index/index.js

30
pages/index/index.js

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

Loading…
Cancel
Save