Ver código fonte

完善机械库交互

DW-PC\DW 6 anos atrás
pai
commit
d28142da00

+ 4 - 4
2017专区/绝地求生/src/_index_new.html

@@ -1590,8 +1590,8 @@
                                             </a>
                                         </div>
                                     </div>
-                                    <div class="weapon-list-prev" title="上一页"></div>
-                                    <div class="weapon-list-next" title="下一页"></div>
+                                    <div class="weapon-list-prev" title="上一页" ms-on-click="toPrevArmour"></div>
+                                    <div class="weapon-list-next" title="下一页" ms-on-click="toNextArmour"></div>
                                 </div>
                                 <div class="weapon-detail-box">
                                     <div class="armor-box">
@@ -1627,8 +1627,8 @@
                                             </a>
                                         </div>
                                     </div>
-                                    <div class="weapon-list-prev" title="上一页"></div>
-                                    <div class="weapon-list-next" title="下一页"></div>
+                                    <div class="weapon-list-prev" title="上一页" ms-on-click="toPrevConsumable"></div>
+                                    <div class="weapon-list-next" title="下一页" ms-on-click="toNextConsumable"></div>
                                 </div>
                                 <div class="weapon-detail-box">
                                     <div class="armor-box">

+ 15 - 6
2017专区/绝地求生/src/modules/index-new.js

@@ -304,7 +304,7 @@ var V = {
                     result = index;
                 }
             })
-            vm.armourIndex = result;
+            vm.armourCateIndex = result;
         })
     },
     initConsumablesNiceScroll: function () {
@@ -334,7 +334,7 @@ var V = {
                     result = index;
                 }
             })
-            vm.consumablesIndex = result;
+            vm.consumablesCateIndex = result;
         })
     }
 }
@@ -494,9 +494,7 @@ var vm = avalon.define({
             var start = 0, end = index
 
             var arr = armourNumArr.slice(start, end),
-                len = end - start,
-                titleHeight = 30,
-                rowHeight = 70
+                len = end - start
 
             var offset = _.reduce(arr, function (last, cur) {
                 return last + cur
@@ -630,7 +628,18 @@ var vm = avalon.define({
     toNextWeapon: function () {
         $("#weaponList").getNiceScroll(0).doScrollTop(weaponNicescroll.newscrolly + 690, 500)
     },
-
+    toPrevArmour: function () {
+        $("#armourList").getNiceScroll(0).doScrollTop(armourNicescroll.newscrolly - 690, 500)
+    },
+    toNextArmour: function () {
+        $("#armourList").getNiceScroll(0).doScrollTop(armourNicescroll.newscrolly + 690, 500)
+    },
+    toPrevConsumable: function () {
+        $("#consumablesList").getNiceScroll(0).doScrollTop(consumablesNiceScroll.newscrolly - 690, 500)
+    },
+    toNextConsumable: function () {
+        $("#consumablesList").getNiceScroll(0).doScrollTop(consumablesNiceScroll.newscrolly + 690, 500)
+    },
     resizeScrollByIndex: function (index) {
         switch (index) {
             case 0: