Showing
7 changed files
with
43 additions
and
4 deletions
@@ -7,6 +7,29 @@ Component({ | @@ -7,6 +7,29 @@ Component({ | ||
7 | }, | 7 | }, |
8 | tabIdx: String | 8 | tabIdx: String |
9 | }, | 9 | }, |
10 | + data: { | ||
11 | + animation: null, | ||
12 | + }, | ||
13 | + ready: function() { | ||
14 | + let animation = wx.createAnimation({ | ||
15 | + duration: 400, | ||
16 | + timingFunction: 'ease', | ||
17 | + }); | ||
18 | + //放大缩小循环动画 | ||
19 | + var next = true; | ||
20 | + setInterval(function () { | ||
21 | + if (next) { | ||
22 | + animation.scale(1.05).step() | ||
23 | + next = !next; | ||
24 | + } else { | ||
25 | + animation.scale(1).step() | ||
26 | + next = !next; | ||
27 | + } | ||
28 | + this.setData({ | ||
29 | + animation: animation.export() | ||
30 | + }) | ||
31 | + }.bind(this), 400) | ||
32 | + }, | ||
10 | methods: { | 33 | methods: { |
11 | onClick() { | 34 | onClick() { |
12 | router.go('detail', { | 35 | router.go('detail', { |
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | </block> | 8 | </block> |
9 | 9 | ||
10 | <block wx:elif="{{product.status === 2}}"> | 10 | <block wx:elif="{{product.status === 2}}"> |
11 | - <view class="btn ok" catchtap="onClick">参加抽奖</view> | 11 | + <view class="btn ok" catchtap="onClick" animation="{{animation}}">参加抽奖</view> |
12 | </block> | 12 | </block> |
13 | 13 | ||
14 | <block wx:elif="{{product.status === 3}}"> | 14 | <block wx:elif="{{product.status === 3}}"> |
@@ -2,6 +2,9 @@ | @@ -2,6 +2,9 @@ | ||
2 | 2 | ||
3 | <product-header product="{{product}}" shareFlag="{{shareFlag}}" avatars="{{avatars}}"></product-header> | 3 | <product-header product="{{product}}" shareFlag="{{shareFlag}}" avatars="{{avatars}}"></product-header> |
4 | </view> | 4 | </view> |
5 | + | ||
6 | +<image class="jion-tips-image" src="./images/Group@2x.png"></image> | ||
7 | + | ||
5 | <view class="machine {{shareFlag ? 'machine-t-m' : 'machine-t-l'}}"> | 8 | <view class="machine {{shareFlag ? 'machine-t-m' : 'machine-t-l'}}"> |
6 | <view class="open-shadow"></view> | 9 | <view class="open-shadow"></view> |
7 | <view class="code-list" animation="{{animation}}"> | 10 | <view class="code-list" animation="{{animation}}"> |
@@ -108,6 +108,12 @@ | @@ -108,6 +108,12 @@ | ||
108 | border-top: 1rpx solid #E0E0E0; | 108 | border-top: 1rpx solid #E0E0E0; |
109 | } | 109 | } |
110 | 110 | ||
111 | +.jion-tips-image { | ||
112 | + width: 100%; | ||
113 | + height: 80rpx; | ||
114 | + margin-top: 20rpx; | ||
115 | +} | ||
116 | + | ||
111 | .machine { | 117 | .machine { |
112 | background-image: url('https://img10.static.yhbimg.com/yhb-img01/2018/12/27/19/011f45717237b3cbf7301833e8dc28f994.png'); | 118 | background-image: url('https://img10.static.yhbimg.com/yhb-img01/2018/12/27/19/011f45717237b3cbf7301833e8dc28f994.png'); |
113 | background-size: contain; | 119 | background-size: contain; |
-
Please register or login to post a comment