bug fix: 生成箱子随机数据出错
This commit is contained in:
parent
db5babe823
commit
ec390e8321
14
docs/uaw.md
14
docs/uaw.md
@ -49,7 +49,8 @@
|
|||||||
#### 20240413
|
#### 20240413
|
||||||
|
|
||||||
1. 用户状态(10) 增加返回是否获得白名单字段
|
1. 用户状态(10) 增加返回是否获得白名单字段
|
||||||
2. 增加
|
2. 增加接口: 合作伙伴NFT列表
|
||||||
|
3. 增加接口: 领取NFT holder奖励
|
||||||
|
|
||||||
### 1. 钱包预登录
|
### 1. 钱包预登录
|
||||||
|
|
||||||
@ -828,6 +829,7 @@ body:
|
|||||||
"contract": "0x20577896ea6113ed8c94b2f08f3893bdc08eba22", //合约地址
|
"contract": "0x20577896ea6113ed8c94b2f08f3893bdc08eba22", //合约地址
|
||||||
"collection": "l3e7 worlds", // NFT的collection名称
|
"collection": "l3e7 worlds", // NFT的collection名称
|
||||||
"remarks": "600 collection", // 描述
|
"remarks": "600 collection", // 描述
|
||||||
|
"img": "111", // nft相关图片
|
||||||
"chain": 1, // 链id
|
"chain": 1, // 链id
|
||||||
"status": 1, // 已登录状态下, 1表示已领取
|
"status": 1, // 已登录状态下, 1表示已领取
|
||||||
}]
|
}]
|
||||||
@ -841,6 +843,16 @@ body:
|
|||||||
- 方法:POST
|
- 方法:POST
|
||||||
- 头部:
|
- 头部:
|
||||||
- Authorization: Bearer JWT_token
|
- Authorization: Bearer JWT_token
|
||||||
|
|
||||||
|
|
||||||
|
body:
|
||||||
|
|
||||||
|
```js
|
||||||
|
{
|
||||||
|
"contract": "NFT合约地址"
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
#### Response
|
#### Response
|
||||||
|
@ -15,7 +15,7 @@ chestCfg.chests.forEach((cfg: any) => {
|
|||||||
|
|
||||||
const generateBounsCfg = (cfg: any) => {
|
const generateBounsCfg = (cfg: any) => {
|
||||||
let randoms = []
|
let randoms = []
|
||||||
for (let i = 0; i < cfg.bounsCount; i++) {
|
for (let i = 0; i < cfg.maxBounsCount; i++) {
|
||||||
randoms.push(Math.random())
|
randoms.push(Math.random())
|
||||||
}
|
}
|
||||||
let total = randoms.reduce((a: number, b: number) => a + b)
|
let total = randoms.reduce((a: number, b: number) => a + b)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user