Loading…

Read purchase limit settings

```javascript WXAPI.goodsLimitationsV2(goodsId, propertyChildIds) ``` + goodsId item number + propertyChildIds passes the sku information of the product (if there is no sku product, this parameter does not need to be passed);Selected specification size information: such as: 4:15, 2:10, 1:4, . Please separate multiple specifications with commas in English. The 4 in 4:15 represents the color, and the 15 may represent local gold.```json { "code": 0, "data": [ { "buyNumbers": 1, "duration": 2, "goodsId": 4232, "id": 2096, "unit": 0, "unitStr": "Natural day", "userId": 951, "userLevelId": 3117, "userLevelName": "Gold Member" }, { "buyNumbers": 1, "duration": 3, "goodsId": 4232, "id": 2095, "unit": 1, "unitStr": "Natural month", "userId": 951, "userLevelId": 0, "userLevelName": "User without group" } ], "msg": "success" } ``` + userLevelId is the effective user level id, 0 represents a user without membership level + unit is a purchase-limited unit. For details, see unitStr. It is divided into natural days, months, and years. + duration buying cycle + buyNumbers limits the maximum number of purchases In the above example, the product settings are interpreted as: + Users without membership level can purchase up to 1 item every 3 months + Gold member users can purchase up to 1 item every 2 days