diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js index 47e21db..6c49cce 100644 --- a/pages/coupon/detail/index.js +++ b/pages/coupon/detail/index.js @@ -10,7 +10,6 @@ Page({ }, questions1: null, questions2: null, - display: "none", carList: [], couponChannelId: null, couponId: null, @@ -34,7 +33,12 @@ Page({ scaleData: null, skewData: null, matrixData: null, - flag: false + // flag: false, + scale01:0, + opacity01:0, + queueData:null, + zIndex:11, + display:null }, phone: function () { let that = this; @@ -92,30 +96,21 @@ Page({ closeQuestion: function () { let that = this; - var animation = wx.createAnimation({}) - setTimeout(function () { - that.setData({ - flag: false - }) - }, 1000) - animation.translate((this.data.widthScreen - 0), 0).scale(0).opacity(0.5).step({ - duration: 1000 - }) that.setData({ - alphaData: animation.export() - }); + display:"none", + zIndex: 11, + }) setTimeout(function () { that.orderFunc(); - }, 1100) + }, 300) }, - /** * gotopay */ gotopay: function () { let that = this; that.setData({ - alphaData: null + queueData: null }) Http.get({ url: config.api.getQuestion, @@ -127,9 +122,18 @@ Page({ console.log(res); if (res.data == undefined) { that.orderFunc(); + that.setData({ + flag: false + }) } else if (res.data) { + var animation = wx.createAnimation({}); + animation.translate((that.data.widthScreen - that.data.widthScreen), 0).scale(1).opacity(1).step({ + duration: 1000 + }) + that.setData({ - flag: true, + queueData: animation.export(), + zIndex:9, questionnaire: JSON.parse(res.data.content), questionId: res.data.id }); @@ -144,6 +148,8 @@ Page({ }); }) }, + + countdown(end_time) { let that = this; var EndTime = end_time; diff --git a/pages/coupon/detail/index.wxml b/pages/coupon/detail/index.wxml index 257c821..da13fd6 100644 --- a/pages/coupon/detail/index.wxml +++ b/pages/coupon/detail/index.wxml @@ -40,8 +40,6 @@ 剩余{{data.remainInventory}}件 - - 有效期:自领取之日起 {{validDays}}天内有效 有效期: @@ -81,7 +79,7 @@ - + @@ -91,32 +89,30 @@ - - - - - - - - - {{questionnaire.title}} - - - - {{item.name}} - - - - - - - 确定 - + + + + + + + + {{questionnaire.title}} + + + + {{item.name}} + + + + + + + 确定 \ No newline at end of file diff --git a/pages/coupon/detail/index.wxss b/pages/coupon/detail/index.wxss index 75bbbf4..de51609 100644 --- a/pages/coupon/detail/index.wxss +++ b/pages/coupon/detail/index.wxss @@ -30,7 +30,7 @@ page { border-top-left-radius: 20rpx; border-top-right-radius: 20rpx; margin-top: -25rpx; - z-index: 10; + z-index: 3; } .fenxiang { @@ -265,14 +265,12 @@ page { .buy-view { background: #fff; - position: fixed; height: 96rpx; bottom: 0; left: 0; right: 0; padding-bottom: 22rpx; padding-top: 22rpx; - z-index: 100; } .buy { @@ -295,7 +293,7 @@ page { margin: auto; width: 50rpx; height: 50rpx; - z-index: 10; + z-index: 3; } .txt { @@ -348,9 +346,6 @@ page { font-weight:bold; background: #ff4949; } -.ques{ - display: none; -} .b1 { position: fixed; @@ -360,7 +355,7 @@ page { right: 0px; background: rgba(0, 0, 0, 0.8); overflow: hidden; - z-index: 100; + z-index: 10; } .con { @@ -401,7 +396,6 @@ page { border-bottom: 1rpx solid #eee; } - .titles { width: 511rpx; display: block;