diff --git a/app.js b/app.js index 5e58be0..eab8757 100644 --- a/app.js +++ b/app.js @@ -21,7 +21,7 @@ App({ unique_key: "wechatxcx" }).then(res => { let data = JSON.parse(res.data); - data.isTest = data.isTest107? true : false; + data.isTest = data.isTest108? true : false; this.globalData.configJson = data }).then(() => { // 获取ui配置文件 diff --git a/pages/index/index.js b/pages/index/index.js index c6f3103..c1c7e0d 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -34,11 +34,12 @@ Page({ activeBannerIndex: 0, smBannerIndex: 0, indexSeason: {}, - startList: [], // 启动页广告 + // startList: [], // 启动页广告 + startList: {head_img:''}, // 启动页广告 alertSwipeList: [], //弹窗广告 showAdv: false, //弹窗开关 showFullAdv: true, //全屏广告开关 - time: 5, //全屏广告剩余时间 + time: 3, //全屏广告剩余时间 showTime:false, xpth:{}, // 元旦新增 新品特惠和sqjNew 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/24010b7a7a88b91c0ea75cf3f073702e.png', 'https://static.ticket.sz-trip.com/uploads/20240228/59e199b98bfb9fbe4fd996503d5f5698.png', - ] + ], + // viewHeight:"0px", }, onLoad: function (options) { + // this.getHeight() //全屏广告 wx.hideTabBar() //这里隐藏了底部导航栏 commonApi._post("adv/getAdv", { @@ -72,20 +75,26 @@ Page({ time: this.data.time - 1 }) if (this.data.time == 0) { - timer = null + clearInterval(timer) + wx.showTabBar() //倒计时结束清除定时器显示导航栏 this.setData({ showFullAdv: false }) - if (this.data.alertSwipeList.length==0) { - wx.showTabBar() //倒计时结束清楚定时器显示导航栏 - } - } - }, 1000) - this.setData({ - startList: res.data || [] - }) + let length = res.data.length + 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{ this.setData({ showFullAdv: false @@ -137,6 +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) + // } + // }) + // }, getXpthList:function () { // 元旦新增 新品特惠 commonApi._post("product/get_product_indulgence", { @@ -863,7 +884,7 @@ Page({ this.pagePoint({ event: 'home_view' }, 1) - this.data.time!=5?wx.showTabBar():1 + // this.data.time!=5?wx.showTabBar():1 }, /** diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 817be63..9de722f 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -632,12 +632,25 @@ -跳过 {{time}} - + {{time}}s跳过 + + + + + + diff --git a/pages/index/index.wxss b/pages/index/index.wxss index c058797..e8175c6 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -790,11 +790,11 @@ page { .time{ width: 150rpx; height: 60rpx; - background-color: #999999; - color: #fff; + background-color: #fff; + color: #000; position: absolute; - right: 20rpx; - top: 200rpx; + left: 20rpx; + top: 120rpx; border-radius:6rpx ; text-align: center; line-height: 60rpx; @@ -1034,4 +1034,42 @@ page { right: -22rpx; z-index: 2; /* top: -20rpx; */ +} + +.Qtop{ + width: 100%; +} +.Qtop img{ + width: 100%; +} +.miao{ + position: fixed; + top: 100rpx; + background: antiquewhite; + margin: 18rpx; + width: 129rpx; + height: 63rpx; + background: rgba(17, 17, 17, 0.1); + text-align: center; + border-radius: 13rpx; + line-height: 63rpx; +} +.topBox { + /* display: flex; + padding-top: 120rpx; + padding-left: 20rpx; */ +} +.jumpBox { + color: #000; + background: rgba(255,255,255, 0.911); + display: flex; + align-items: center; + border-radius: 10rpx; + padding: 10rpx 20rpx; + position: fixed; + top: 150rpx; + left: 20rpx; +} +.time{ + padding-right: 10rpx; } \ No newline at end of file