diff --git a/components/advertisement/advertisement.js b/components/advertisement/advertisement.js index b7669e2..81cff5b 100644 --- a/components/advertisement/advertisement.js +++ b/components/advertisement/advertisement.js @@ -10,46 +10,14 @@ Component({ }, data: { flag: false, - alphaData: null, - gameUrl: '' + alphaData1: null, }, methods: { gotoGg: function (e) { let that = this; - Http.get({ - url: config.api.checkPhoneStatus, - data: {} + wx.navigateTo({ + url: '/pages/coupon/detail/index?couponChannelId=' + e.currentTarget.dataset.data.produceId, }) - .then(res => { - console.log(e.currentTarget.dataset) - wx.navigateTo({ - url: '/pages/coupon/detail/index?couponChannelId=' + e.currentTarget.dataset.data.produceId , - }) - }) - .catch(err => { - if (err.code == 11005) { - // 用户手机未授权 - /** - * 将值传到用户手机号授权的页面 - * - */ - wx.redirectTo({ - url: "/pages/getphoneInfo/index?path=index&pagePath=" + e.currentTarget.dataset.data.pagePath + "&id=" + e.currentTarget.dataset.data.id + "&couponChannelId=" + e.currentTarget.dataset.data.produceId - }); - } else if (err.code == 11006) { - // 用户手机已加密 - wx.redirectTo({ - url: "/pages/phoneinput/phoneinput?path=index&pagePath=" + e.target.dataset.data.pagePath + "&id=" + e.currentTarget.dataset.data.id + "&couponChannelId=" + e.currentTarget.dataset.data.produceId - }); - } else { - wx.showToast({ - title: err.errMsg, - icon: 'none', - duration: 2000, - mask: false - }); - } - }) }, a: function () { this.setData({ flag: false }) @@ -62,7 +30,7 @@ Component({ that.setData({ flag: true }) }, 500) animation.rotateZ(180).scale(0).opacity(0.5).step({ duration: 1000 }) - that.setData({ alphaData: animation.export() }); + that.setData({ alphaData1: animation.export() }); }, }, }); diff --git a/index/index.js b/index/index.js index 2a559fd..7b110af 100644 --- a/index/index.js +++ b/index/index.js @@ -55,6 +55,7 @@ Page({ loading: true, fistLogin: null, alphaData: null, + alphaData1: null, swiperCurrent: 0, title: null, weappShareTitle: '', //分享标题 @@ -68,6 +69,7 @@ Page({ couponId: '', //游戏返回时传回的字段 played: false, //从游戏页面跳回首页返回true havePlayEd: app.globalData.havePlayEd, + havePlayEd1:app.globalData.havePlayEd1, staticGamedata: {}, showIf: false, showPages: false, @@ -79,6 +81,15 @@ Page({ showGg: false, ggdata:{} }, + alphaClick1: function (even) { + var animation = wx.createAnimation({}) + animation.opacity(0).step({ + duration: 2000 + }) + this.setData({ + alphaData: animation.export() + }) + }, alphaClick: function(even) { var animation = wx.createAnimation({}) animation.opacity(0).step({ @@ -252,8 +263,10 @@ Page({ } let that = this; that.setData({ - havePlayEd: app.globalData.havePlayEd ? app.globalData.havePlayEd : false + havePlayEd: app.globalData.havePlayEd ? app.globalData.havePlayEd : false, + havePlayEd1:app.globalData.havePlayEd1?app.globalData.havePlayEd1 : false }) + /** * couponNum 是否有普通的优惠券购买 * couponNum2 是否有新买的消费卡 @@ -280,6 +293,10 @@ Page({ setTimeout(function() { that.alphaClick(); }, 8000) + // 如果有广告 + setTimeout(function () { + that.alphaClick1(); + }, 8000) }, getmemberId: function(token) { let that = this; @@ -663,7 +680,7 @@ Page({ showGg: false }) that.getGameOne(app.globalData.token) - that.alphaClick(); + that.alphaClick1(); }) }, /** diff --git a/index/index.wxml b/index/index.wxml index ee80a87..36918e7 100644 --- a/index/index.wxml +++ b/index/index.wxml @@ -108,7 +108,7 @@ -