Commit 862263d533bdfe02643a948d5053e25a3ec03db6

Authored by zouyang0921
1 parent 479b9711

[年会抽奖]UI细节调整

Showing 2 changed files with 8 additions and 9 deletions
lottery.html
@@ -20,8 +20,8 @@ @@ -20,8 +20,8 @@
20 .radio-item {display: flex;align-items: center;justify-content: space-between;cursor: pointer;} 20 .radio-item {display: flex;align-items: center;justify-content: space-between;cursor: pointer;}
21 .radio-item:not(:last-of-type) {margin-bottom: 70px;} 21 .radio-item:not(:last-of-type) {margin-bottom: 70px;}
22 .radio-item.active .radio-icon-active {display: block;} 22 .radio-item.active .radio-icon-active {display: block;}
23 - .radio-item .radio-icon {width: 48px;height: 48px;box-sizing: border-box;border: 2px solid #F9D28D;border-radius: 50%;display: flex;align-items: center;justify-content: center;}  
24 - .radio-item .radio-icon-active {display: none;width: 34px;height: 34px;border-radius: 50%;background: #F9D28D;} 23 + .radio-item .radio-icon {position: relative;width: 48px;height: 48px;box-sizing: border-box;border: 2px solid #F9D28D;border-radius: 50%;}
  24 + .radio-item .radio-icon-active {display: none;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);width: 34px;height: 34px;border-radius: 50%;background: #F9D28D;}
25 .radio-item .radio-label {font-size: 68px;color: #F9D28D;} 25 .radio-item .radio-label {font-size: 68px;color: #F9D28D;}
26 .enter-btn {width: 506px;height: 152px;margin-top: 156px;margin-left: 517px;background: url('./img/pc/btn_bg.png') no-repeat;background-size: 100% 100%;line-height: 152px;text-align: center;font-size: 55px;color: #FFDCC2;cursor: pointer;} 26 .enter-btn {width: 506px;height: 152px;margin-top: 156px;margin-left: 517px;background: url('./img/pc/btn_bg.png') no-repeat;background-size: 100% 100%;line-height: 152px;text-align: center;font-size: 55px;color: #FFDCC2;cursor: pointer;}
27 27
@@ -83,11 +83,11 @@ @@ -83,11 +83,11 @@
83 <div class="avatar"> 83 <div class="avatar">
84 <div class="avatar-img"> 84 <div class="avatar-img">
85 <div class="avatar-list clearfix"> 85 <div class="avatar-list clearfix">
86 - <img class="avatar-item" src="./img/mobile/default_avatar.png"> 86 + <img class="avatar-item" src="./img/pc/default_avatar.png">
87 </div> 87 </div>
88 </div> 88 </div>
89 <div class="winner hide"> 89 <div class="winner hide">
90 - <img class="avatar-item" src="./img/mobile/default_avatar.png"> 90 + <img class="avatar-item" src="./img/pc/default_avatar.png">
91 </div> 91 </div>
92 <div class="avatar-bg"></div> 92 <div class="avatar-bg"></div>
93 </div> 93 </div>
lottery.js
@@ -166,6 +166,10 @@ let action = { @@ -166,6 +166,10 @@ let action = {
166 }, 166 },
167 continueLottery: function() { 167 continueLottery: function() {
168 action.userList.splice(action.curUserIndex, 1); 168 action.userList.splice(action.curUserIndex, 1);
  169 + if (action.userList.length === 0) {
  170 + alert('暂无数据');
  171 + return;
  172 + }
169 173
170 // 初始化头像部分 174 // 初始化头像部分
171 $('.avatar-img, .user-info .scroll-wrap').show(); 175 $('.avatar-img, .user-info .scroll-wrap').show();
@@ -174,11 +178,6 @@ let action = { @@ -174,11 +178,6 @@ let action = {
174 $('.stop-btn').show(); 178 $('.stop-btn').show();
175 $('.continue-btn, .start-btn').hide(); 179 $('.continue-btn, .start-btn').hide();
176 180
177 - if (action.userList.length === 0) {  
178 - alert('暂无数据');  
179 - return;  
180 - }  
181 -  
182 // 开始抽奖动画 181 // 开始抽奖动画
183 imgTimer = this.lotteryAnimation($('.avatar-list'), '.avatar-item', 244); 182 imgTimer = this.lotteryAnimation($('.avatar-list'), '.avatar-item', 244);
184 nameTimer = this.lotteryAnimation($('.user-name .scroll-list'), '.scroll-item', 146); 183 nameTimer = this.lotteryAnimation($('.user-name .scroll-list'), '.scroll-item', 146);