ソースを参照

修改历史记录的排序.

zhaoyu_ma 4 ヶ月 前
コミット
1cc2037429

+ 13 - 1
luckypot_sp/assets/SubGame/slotMousebundle/script/MouseHistoryDetailItemDev.js

@@ -124,6 +124,11 @@ cc.Class({
                 if(this.game_report.lineItem.length == 5){ //全中展示
                     showData.push({s1:true, labS1:'Win Multiplier x10                     '});
                 }
+                //排序
+                this.game_report.lineItem.sort((a, b)=>{
+                    return a.lineIndex - b.lineIndex;
+                });
+
                 for(let i=0; i < this.game_report.lineItem.length; i++){
                     showData.push({
                         s1:false, labS1:'',
@@ -137,6 +142,12 @@ cc.Class({
                 if(xLineItem.length == 5){ //貌似是大奖倍数展示
                     showData.push({s1:true, labS1:'Win Multiplier x10                     '});
                 }
+
+                //排序
+                xLineItem.sort((a, b)=>{
+                    return a.lineIndex - b.lineIndex;
+                });
+
                 for(let i=0; i < xLineItem.length; i++){
                     showData.push({
                         s1:false, labS1:'',
@@ -169,7 +180,8 @@ cc.Class({
                 continue;
             }
 
-            let numCi =showData[0].s1 ? i : (i+1); //序号从1开始
+            // let numCi =showData[0].s1 ? i : (i+1); //序号从1开始
+            let numCi = showData[i].s2Data.lineIndex;
             let score = this.report_init[0] * this.report_init[1] * showData[i].s2Data.awTimes;
             
             s2.getChildByName('ci').getComponent(cc.Label).string = ('0' + numCi).slice(-2);

+ 14 - 1
luckypot_sp/assets/SubGame/slotNCowbundle/script/CowHistoryDetailItemDev.js

@@ -127,6 +127,12 @@ cc.Class({
                 if(this.game_report.lineItem.length == 10){ //全中展示
                     showData.push({s1:true, labS1:'Win Multiplier x10                     '});
                 }
+
+                //排序
+                this.game_report.lineItem.sort((a, b)=>{
+                    return a.lineIndex - b.lineIndex;
+                });
+
                 for(let i=0; i < this.game_report.lineItem.length; i++){
                     showData.push({
                         s1:false, labS1:'',
@@ -140,6 +146,12 @@ cc.Class({
                 if(xLineItem.length == 10){ //貌似是大奖倍数展示
                     showData.push({s1:true, labS1:'Win Multiplier x10                     '});
                 }
+
+                //排序
+                xLineItem.sort((a, b)=>{
+                    return a.lineIndex - b.lineIndex;
+                });
+
                 for(let i=0; i < xLineItem.length; i++){
                     showData.push({
                         s1:false, labS1:'',
@@ -172,7 +184,8 @@ cc.Class({
                 continue;
             }
 
-            let numCi =showData[0].s1 ? i : (i+1); //序号从1开始
+            // let numCi =showData[0].s1 ? i : (i+1); //序号从1开始
+            let numCi = showData[i].s2Data.lineIndex;
             let score = this.report_init[0] * this.report_init[1] * showData[i].s2Data.awTimes;
             
             s2.getChildByName('ci').getComponent(cc.Label).string = ('0' + numCi).slice(-2);

+ 8 - 1
luckypot_sp/assets/SubGame/slotRabbitbundle/script/RabbitHistoryDetailItemDev.js

@@ -126,6 +126,12 @@ cc.Class({
                 if(nums < 5) //也没5连中奖
                     showData.push({s1:true, labS1:'No Winning Combination'});
             }else{ //中奖
+
+                //排序
+                this.game_report.lineItem.sort((a, b)=>{
+                    return a.lineIndex - b.lineIndex;
+                });
+
                 for(let i=0; i < this.game_report.lineItem.length; i++){
                     showData.push({
                         s1:false, labS1:'',
@@ -169,7 +175,8 @@ cc.Class({
                 continue;
             }
 
-            let numCi =showData[0].s1 ? i : (i+1); //序号从1开始
+            // let numCi =showData[0].s1 ? i : (i+1); //序号从1开始
+            let numCi = showData[i].s2Data.lineIndex;
             let score = this.report_init[0] * this.report_init[1] * showData[i].s2Data.awTimes;
             
             s2.getChildByName('ci').getComponent(cc.Label).string = ('0' + numCi).slice(-2);