```javascript
WXAPI.scoreRules({
code: 'CONSUME'
})
```
This method can pass no parameters `WXAPI.scoreRules()` , if the code parameter is not passed, all points gift rule data will be returned; if a specific code is passed, only the specified type of point gift rules will be returned.
Return data:
```json
{
"code": 0,
"data": [
{
"code": "CONSUME",
"codeStr": "Free with consumption",
"confine": 2,
"loop": true,
"maxPerDay": 0,
"score": 1
},
{
"code": "shareWxGroup",
"codeStr": "Forward to WeChat group",
"confine": 0,
"loop": false,
"maxPerDay": 24,
"score": 8
},
{
"code": "goodReputation",
"codeStr": "Good review",
"confine": 0,
"loop": false,
"maxPerDay": 0,
"score": 3
}
],
"msg": "success"
}
```
In this example, 3 rules are set in the background, namely:
+ Get 1 point when you spend 2 yuan or more;
+ Forward the mini program to the WeChat group and get 8 points, with a maximum of 24 points in a single day (that is, up to 3 valid groups);
+ After consumption, you can get 3 points by giving a positive review;
For more other points gift rules, please go to the backend to set up