npm.io
0.0.2 • Published 5 years ago

lottery-react-npm

Licence
ISC
Version
0.0.2
Deps
1
Size
234 kB
Vulns
0
Weekly
0

Introducing the lottery-react-npm package

import { Lottery } from 'lottery-react-npm'

Start a backend service locally on port 9527 with the interface URL /lotterys.

Interface request parameter.

{
 id, // 唯一id
 timestamp // 当前的时间戳(秒)
}

Probabilistic logical interface custom implementation

Interface return value.

Note that the value of each probability in the data array is given by itself. The names of each item in the data array must be the same as in the example, in a different order.

for example:

{
 code: 0,
 data: [
  { name: 'noPrice', probability: 0.4 },
  { name: 'firstPrice', probability: 0.1},
  { name: 'secondPrices', probability: 0.1},
  { name: 'thirdPrices', probability: 0.2 }
 ]
}

React mounts the node's page and needs to be configured

<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0"> -->
<meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">

Keywords