Browse Source

[完善]修改id名称

master
邵佳豪 4 years ago
parent
commit
e7419a1720
  1. 5
      src/app/ui/first-step/first-step.component.html
  2. 7
      src/assets/js/firststep.js

5
src/app/ui/first-step/first-step.component.html

@ -23,7 +23,7 @@
</div> -->
<div class="colum" style="margin-left: 150px;">
<div class="centerLeft" >
<div class="tanCenterbtn" id="chooseZhi">
<div class="tanCenterbtn" id="chooseZhishao">
<span style="background-color: #ff4d29;color:#FFF;" name="zhidui" data-id=`{{chooseid}}`>请选择支队</span>
<span [attr.key]="item.id" name="aaa" *ngFor="let item of choujiang; let key=index" [ngClass]="{'beijicolor': chooseid ==key}" (click)="clickName(item)">{{item.name}}
<img class="img" [ngClass]="{'block': item.result == '' ? false : true}" style="margin-left: 8px;" src="../../../assets/images/dui.png">
@ -33,7 +33,7 @@
</div>
<div class="colum">
<div class="centerLeft">
<div class="tanCenterbtn" id="endjieguo">
<div class="tanCenterbtn" id="endjieguoshao">
<span style="text-align: center;background-color: #ff4d29;color:#FFF;">抽签结果:</span>
<span *ngFor="let item of choujiang; let key=index" >{{item.result}}</span>
</div>
@ -60,7 +60,6 @@
<div style="text-align: center;">
<div id="slotMachineButtonShuffle" class="slotMachineButton" style="font-size: 25px">开始抽签</div>
</div>
</div>

7
src/assets/js/firststep.js

@ -6,7 +6,6 @@ $(document).ready(function(){
active : 0,
delay : 500,
randomize : function(activeElementIndex){
console.log("xxxxx")
if(selected == "南宁支队"){
localStorage.setItem(selected,"5号")
return 5;
@ -65,8 +64,8 @@ $(document).ready(function(){
machine.stop();
// $("#slotMachineButtonShuffle").removeClass("disabled");
setTimeout(() => {
$("#endjieguo span").eq(selectedIndex).html(window.localStorage[selected])
$("#chooseZhi .img").eq(selectedIndex - 1).css("display","inline-block");
$("#endjieguoshao span").eq(selectedIndex).html(window.localStorage[selected])
$("#chooseZhishao .img").eq(selectedIndex - 1).css("display","inline-block");
}, 1300);
}, 1000);
}
@ -77,7 +76,7 @@ $(document).ready(function(){
$("span[name='aaa']").on("click",function(e,index){
selected = $(this)[0].innerText
selectedIndex = localStorage.getItem("indexNum")
if($("#endjieguo span").eq(selectedIndex)[0].innerText){
if($("#endjieguoshao span").eq(selectedIndex)[0].innerText){
$("#slotMachineButtonShuffle").addClass("disabled");
}else{
$("#slotMachineButtonShuffle").removeClass("disabled");

Loading…
Cancel
Save