Your Name 4 years ago
parent
commit
7295dbc946
1 changed files with 7 additions and 5 deletions
  1. 7
    5
      src/util/Basketball.js

+ 7
- 5
src/util/Basketball.js View File

18
   let minPrice
18
   let minPrice
19
   let maxPrice
19
   let maxPrice
20
 
20
 
21
+  debugger
22
+
21
   // 遍历模拟比赛的各种可能
23
   // 遍历模拟比赛的各种可能
22
   matches.forEach(match => {
24
   matches.forEach(match => {
23
-    const [min, max] = GetMinAndMax(allParts, match, rq, ys)
25
+    const [min, max] = GetMinAndMax(allParts, match)
24
     if (min < minPrice || minPrice === undefined) {
26
     if (min < minPrice || minPrice === undefined) {
25
       minPrice = min
27
       minPrice = min
26
     }
28
     }
33
   return [minPrice, maxPrice]
35
   return [minPrice, maxPrice]
34
 }
36
 }
35
 
37
 
36
-function GetMinAndMax (allParts, match, rq, ys) {
38
+function GetMinAndMax (allParts, match) {
37
   let minPrice = 0
39
   let minPrice = 0
38
   let maxPrice = 0
40
   let maxPrice = 0
39
 
41
 
54
       minPrice = price
56
       minPrice = price
55
     }
57
     }
56
 
58
 
57
-    maxPrice += maxPrice
59
+    maxPrice += price
58
   })
60
   })
59
 
61
 
60
   return [minPrice, maxPrice]
62
   return [minPrice, maxPrice]
76
 // 让球胜平负
78
 // 让球胜平负
77
 function computeWDLS (part, match, rq) {
79
 function computeWDLS (part, match, rq) {
78
   const [x, y] = match
80
   const [x, y] = match
79
-  const { ruleCode, odds } = part.rules
81
+  const { ruleCode, odds } = part.detail
80
 
82
 
81
   switch (ruleCode) {
83
   switch (ruleCode) {
82
     case 'bst-sp-win':
84
     case 'bst-sp-win':
102
 // 进球数
104
 // 进球数
103
 function computePoints (part, match) {
105
 function computePoints (part, match) {
104
   const [x, y] = match
106
   const [x, y] = match
105
-  const { ruleCode, odds } = part.rules
107
+  const { ruleCode, odds } = part.detail
106
 
108
 
107
   switch (ruleCode) {
109
   switch (ruleCode) {
108
     case 'bst-w15':
110
     case 'bst-w15':