Pārlūkot izejas kodu

Merge branch 'master' of http://192.168.136.45:3000/SERVER/langer

pzb 5 gadi atpakaļ
vecāks
revīzija
1fa90bd898
2 mainītis faili ar 7 papildinājumiem un 3 dzēšanām
  1. 3 3
      controller/Lottery.py
  2. 4 0
      web/ansjer_answer/lottery/index.html

+ 3 - 3
controller/Lottery.py

@@ -164,15 +164,15 @@ class drawView(TemplateView):
                 if count_1 >= 5 > count_2:
                     print('type1')
                     # 权重组
-                    chow_weight = {2: 1, 3: 50}
+                    chow_weight = {2: 1, 3: 25}
                     test.setWeight(chow_weight)
                     has_chow = test.drawing()
                 elif count_1 < 5 <= count_2:
                     print('type2')
-                    chow_weight = {1: 1, 3: 50}
+                    chow_weight = {1: 1, 3: 25}
                     test.setWeight(chow_weight)
                     has_chow = test.drawing()
-                elif count_2 == 5 == count_2:
+                elif count_1 == 5 == count_2:
                     print('type3')
                     has_chow = 3
                 else:

+ 4 - 0
web/ansjer_answer/lottery/index.html

@@ -240,6 +240,10 @@
     }
 
     function DetailsTab() {
+        if (draw_status == 0) {
+            alert('你还未抽奖');
+            return;
+        }
         if (draw_status == 1) {
             alert('恭喜你中奖 获得一台c611');
             $('#drawTab').hide();