From adfea3759250b5118b713ff232212f7716f3b79f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=B7=E6=B4=8B=E4=B9=8B=E5=A3=B0?= Date: Thu, 25 Oct 2018 14:50:02 +0800 Subject: [PATCH] =?UTF-8?q?y=E6=96=B0=E5=A2=9E=E9=A6=96=E9=A1=B5=E6=B8=B8?= =?UTF-8?q?=E6=88=8F=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/gameentry/gentry.js | 10 ++++- components/gameentry/gentry.wxml | 2 +- pages/index/index.js | 63 ++++++++++++++++++++++++++++++-- pages/index/index.wxml | 12 +++--- pages/index/index.wxss | 25 ++++++++++--- 5 files changed, 96 insertions(+), 16 deletions(-) diff --git a/components/gameentry/gentry.js b/components/gameentry/gentry.js index 118878b..44a10ad 100644 --- a/components/gameentry/gentry.js +++ b/components/gameentry/gentry.js @@ -10,6 +10,7 @@ Component({ }, data: { flag: false, + alphaData: null, gameUrl: '' }, methods:{ @@ -63,7 +64,14 @@ Component({ this.setData({ flag: false }) }, closeGame: function () { - this.setData({ flag: true }) + let that = this; + var animation = wx.createAnimation({}) + // animation.opacity(0).step({ duration: 1000 }) + animation.rotateZ(180).scale(0).opacity(0.5).step({ duration: 1000 }) + that.setData({ alphaData: animation.export() }); + setTimeout(function () { + that.setData({ flag: true }) + }, 1000) }, }, onReady: function () { diff --git a/components/gameentry/gentry.wxml b/components/gameentry/gentry.wxml index 767b98e..597bb10 100644 --- a/components/gameentry/gentry.wxml +++ b/components/gameentry/gentry.wxml @@ -1,7 +1,7 @@