在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/HTML/ json-server, 添加數(shù)據(jù), js文件

json-server, 添加數(shù)據(jù), js文件

1、如何添加數(shù)據(jù)
2、上代碼

'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、添加數(shù)據(jù)到result里面

{
      'id': 3,
      'make': 'GGGGGGG',
      'model': '吞吞吐吐拖',
      'type': 0,
      'price': 20
}
回答
編輯回答
短嘆

通過post方式是可以往里面添加數(shù)據(jù)的,具體操作請看:http://www.cnblogs.com/aaron-...

2018年6月13日 09:59