Json-server, add data, js file

1, how to add data
2, code

"posts": {
        "code": 0,
        "msg": "",
        "result": [
            {
              "id": 1,
              "make": "Hello",
              "model": "Ketty",
              "type": 1,
              "price": 10
            },
            {
              "id": 2,
              "make": "dddd",
              "model": "fffff",
              "type": 0,
              "price": 20
            },
        ]
    } 

3. Add data to result

{
      "id": 3,
      "make": "GGGGGGG",
      "model": "",
      "type": 0,
      "price": 20
}
Mar.02,2021

you can add data to it through post . For more information, please see http://www.cnblogs.com/aaron-.

.
Menu