Commit fcaabcd5 authored by ziyu's avatar ziyu

improvement: 优化

parent 113159ef
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
import wepy from '@wepy/core'; import wepy from '@wepy/core';
import { getProbability } from '../../common/raffleProbability'; import { getProbability } from '../../common/raffleProbability';
import { getAwardsDetail } from '../../common/api.js'; import { getAwardsDetail } from '../../common/api.js';
let _videoContexts = []; let _videoContexts = [], videoCurrent = 0;
wepy.component({ wepy.component({
props: { props: {
videoList: { videoList: {
...@@ -131,7 +131,6 @@ ...@@ -131,7 +131,6 @@
data: { data: {
pause: false, pause: false,
curQueue: [], curQueue: [],
current: 0
}, },
watch: { watch: {
videoList () { videoList () {
...@@ -153,7 +152,7 @@ ...@@ -153,7 +152,7 @@
v.probability = getProbability(+newVal, +v.coinQuantity); v.probability = getProbability(+newVal, +v.coinQuantity);
}); });
this.curQueue = [...this.curQueue]; this.curQueue = [...this.curQueue];
this.updateAwardsInfo(this.current); this.updateAwardsInfo(videoCurrent);
}, },
async getProgress(id) { async getProgress(id) {
if (id <= 0) return; if (id <= 0) return;
...@@ -187,7 +186,7 @@ ...@@ -187,7 +186,7 @@
}, },
async bindanimationfinish(e) { async bindanimationfinish(e) {
const current = e.$wx.detail.current; const current = e.$wx.detail.current;
this.current = current; videoCurrent = current;
this.pause = false; this.pause = false;
this.playCurrent(current); this.playCurrent(current);
this.trigger(e, 'change'); this.trigger(e, 'change');
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</div> </div>
<div class="show-gold"> <div class="show-gold">
<div class="sunshine" v-if="addsunshine"></div> <div class="sunshine" v-if="addsunshine"></div>
<image class="show-gold-image" :class="{'gold-scale': addsunshine}" :src="goldUrl"></image> <image class="show-gold-image" :class="{'gold-scale': addsunshine}" :src="goldUrl" mode="widthFix"></image>
<span class="show-gold-num"> <span class="show-gold-num">
{{des}} {{des}}
</span> </span>
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
share: '/static/images/share@2x.png', share: '/static/images/share@2x.png',
lottery: '/static/images/lottery@2x.png' lottery: '/static/images/lottery@2x.png'
}; };
let isFirst = true;
let addGoldTimer = null; let addGoldTimer = null;
wepy.component({ wepy.component({
store, store,
...@@ -73,7 +74,6 @@ ...@@ -73,7 +74,6 @@
lotteryUrl: '/static/images/lottery@2x.png', lotteryUrl: '/static/images/lottery@2x.png',
containerStyle: '', containerStyle: '',
flyAnimation: false, flyAnimation: false,
isFirst: true
}, },
props: { props: {
title: '', title: '',
...@@ -144,8 +144,8 @@ ...@@ -144,8 +144,8 @@
if (v) { if (v) {
this.addCount = 0; this.addCount = 0;
} }
if (this.isFirst) { if (isFirst) {
this.isFirst = false; isFirst = false;
return; return;
} }
setTimeout(() => { setTimeout(() => {
...@@ -153,11 +153,11 @@ ...@@ -153,11 +153,11 @@
}, 1500); }, 1500);
}, },
sign(v) { sign(v) {
if (this.isFirst) { if (isFirst) {
this.signComplete = false; this.signComplete = false;
this.flyAnimation = false; this.flyAnimation = false;
this.addsunshine = false; this.addsunshine = false;
this.isFirst = false; isFirst = false;
return; return;
} }
if (v) { if (v) {
...@@ -414,7 +414,7 @@ ...@@ -414,7 +414,7 @@
flex-direction: column; flex-direction: column;
.show-gold-image { .show-gold-image {
width: 60rpx; width: 60rpx;
height: 60rpx; /*height: 60rpx;*/
z-index: 2; z-index: 2;
} }
.show-gold-num { .show-gold-num {
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
// transform: scale(0.5); // transform: scale(0.5);
// top: calc(100% - 1px); // top: calc(100% - 1px);
// left: 100%; // left: 100%;
background: url('http://activitystatic.xyqb.com/sign@2x.png') 0 0/contain no-repeat; background: url('https://activitystatic.xyqb.com/sign@2x.png') 0 0/contain no-repeat;
// background: -webkit-linear-gradient(45deg,rgba(255,255,255,0),yellow,rgba(255,255,255,0)); // background: -webkit-linear-gradient(45deg,rgba(255,255,255,0),yellow,rgba(255,255,255,0));
/*此处为下一步的添加动画*/ /*此处为下一步的添加动画*/
// -webkit-animation: shining 3s ease-in-out infinite; // -webkit-animation: shining 3s ease-in-out infinite;
......
...@@ -317,7 +317,7 @@ ...@@ -317,7 +317,7 @@
await register(store.state.userInfo); await register(store.state.userInfo);
wx.setStorageSync('isRegister', true); wx.setStorageSync('isRegister', true);
} }
if (!this.batchId) { if (!batchId) {
Notify({message: '数据加载中,请稍后重试!'}); Notify({message: '数据加载中,请稍后重试!'});
return; return;
} }
......
static/images/awards@2x.png

793 Bytes | W: | H:

static/images/awards@2x.png

368 Bytes | W: | H:

static/images/awards@2x.png
static/images/awards@2x.png
static/images/awards@2x.png
static/images/awards@2x.png
  • 2-up
  • Swipe
  • Onion skin
static/images/btn-shadow@2x.png

1.2 KB | W: | H:

static/images/btn-shadow@2x.png

639 Bytes | W: | H:

static/images/btn-shadow@2x.png
static/images/btn-shadow@2x.png
static/images/btn-shadow@2x.png
static/images/btn-shadow@2x.png
  • 2-up
  • Swipe
  • Onion skin
static/images/feedback@2x.png

663 Bytes | W: | H:

static/images/feedback@2x.png

303 Bytes | W: | H:

static/images/feedback@2x.png
static/images/feedback@2x.png
static/images/feedback@2x.png
static/images/feedback@2x.png
  • 2-up
  • Swipe
  • Onion skin
static/images/gold-1@2x.png

1.42 KB | W: | H:

static/images/gold-1@2x.png

547 Bytes | W: | H:

static/images/gold-1@2x.png
static/images/gold-1@2x.png
static/images/gold-1@2x.png
static/images/gold-1@2x.png
  • 2-up
  • Swipe
  • Onion skin
static/images/gold-2@2x.png

1.8 KB | W: | H:

static/images/gold-2@2x.png

688 Bytes | W: | H:

static/images/gold-2@2x.png
static/images/gold-2@2x.png
static/images/gold-2@2x.png
static/images/gold-2@2x.png
  • 2-up
  • Swipe
  • Onion skin
static/images/gold-3@2x.png

2.09 KB | W: | H:

static/images/gold-3@2x.png

739 Bytes | W: | H:

static/images/gold-3@2x.png
static/images/gold-3@2x.png
static/images/gold-3@2x.png
static/images/gold-3@2x.png
  • 2-up
  • Swipe
  • Onion skin
static/images/gold-4@2x.png

2.95 KB | W: | H:

static/images/gold-4@2x.png

930 Bytes | W: | H:

static/images/gold-4@2x.png
static/images/gold-4@2x.png
static/images/gold-4@2x.png
static/images/gold-4@2x.png
  • 2-up
  • Swipe
  • Onion skin
static/images/gold-5@2x.png

3.87 KB | W: | H:

static/images/gold-5@2x.png

1.11 KB | W: | H:

static/images/gold-5@2x.png
static/images/gold-5@2x.png
static/images/gold-5@2x.png
static/images/gold-5@2x.png
  • 2-up
  • Swipe
  • Onion skin
static/images/gold-6@2x.png

4.35 KB | W: | H:

static/images/gold-6@2x.png

1.37 KB | W: | H:

static/images/gold-6@2x.png
static/images/gold-6@2x.png
static/images/gold-6@2x.png
static/images/gold-6@2x.png
  • 2-up
  • Swipe
  • Onion skin
static/images/gold-bg@2x.png

10.4 KB | W: | H:

static/images/gold-bg@2x.png

3.92 KB | W: | H:

static/images/gold-bg@2x.png
static/images/gold-bg@2x.png
static/images/gold-bg@2x.png
static/images/gold-bg@2x.png
  • 2-up
  • Swipe
  • Onion skin
static/images/gold@2x.png

24.7 KB | W: | H:

static/images/gold@2x.png

7.49 KB | W: | H:

static/images/gold@2x.png
static/images/gold@2x.png
static/images/gold@2x.png
static/images/gold@2x.png
  • 2-up
  • Swipe
  • Onion skin
static/images/help@2x.png

2.08 KB | W: | H:

static/images/help@2x.png

804 Bytes | W: | H:

static/images/help@2x.png
static/images/help@2x.png
static/images/help@2x.png
static/images/help@2x.png
  • 2-up
  • Swipe
  • Onion skin
static/images/light-1@2x.png

92.6 KB | W: | H:

static/images/light-1@2x.png

33 KB | W: | H:

static/images/light-1@2x.png
static/images/light-1@2x.png
static/images/light-1@2x.png
static/images/light-1@2x.png
  • 2-up
  • Swipe
  • Onion skin
static/images/lottery@2x.png

5.85 KB | W: | H:

static/images/lottery@2x.png

2.09 KB | W: | H:

static/images/lottery@2x.png
static/images/lottery@2x.png
static/images/lottery@2x.png
static/images/lottery@2x.png
  • 2-up
  • Swipe
  • Onion skin
static/images/share@2x.png

3.42 KB | W: | H:

static/images/share@2x.png

1.36 KB | W: | H:

static/images/share@2x.png
static/images/share@2x.png
static/images/share@2x.png
static/images/share@2x.png
  • 2-up
  • Swipe
  • Onion skin
static/images/sign@2x.png

5.9 KB | W: | H:

static/images/sign@2x.png

2.57 KB | W: | H:

static/images/sign@2x.png
static/images/sign@2x.png
static/images/sign@2x.png
static/images/sign@2x.png
  • 2-up
  • Swipe
  • Onion skin
static/images/star@2x.png

5.87 KB | W: | H:

static/images/star@2x.png

1.54 KB | W: | H:

static/images/star@2x.png
static/images/star@2x.png
static/images/star@2x.png
static/images/star@2x.png
  • 2-up
  • Swipe
  • Onion skin
static/images/user@2x.png

4.95 KB | W: | H:

static/images/user@2x.png

1.59 KB | W: | H:

static/images/user@2x.png
static/images/user@2x.png
static/images/user@2x.png
static/images/user@2x.png
  • 2-up
  • Swipe
  • Onion skin
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment