Interface, for example,

http://... config.jsonCopy the code
{
  "dataId": "ABC13232",
  "showTimes": 10
}
Copy the code

Record, with two keys to record

Record key ABC13232 = 10 Number of times the record has been displayed Key alreadyABC13232 = 0

ABC13232 = showTimes; alreadyABC13232 cannot be updated

Each time it is displayed, alreadyABC13232 will +1 be displayed before judging

if alreadyABC13232.value < ABC13232.value {
    show()
}
Copy the code

Pay attention to

If you log with a variable and then display -1 every time, you don’t know how many times you planned to display it. The interface can no longer update the display count