vue-resource 传输过去的数据是json怎么处理

this.$http.post('http://localhost/wang/index.php/Admin/Goods/createProcess'
                        ,{cid: this.cid,name:this.goodsname,sort:this.sort,price:this.price,desc:this.desc}).then(function (response) {
                            console.log(response);
                }, function (response) {

                });

vue-resource 传输过去的数据是json怎么处理

阅读 4.2k
1 个回答

不同的服务器因为使用的技术栈不同,写法肯定也不同。

数据都是从requestBody里取出来的,需要经过一个parse的过程。

如果你需要具体的实现细节,那你至少要提供你的服务端实现方案了,譬如你是基于nodeexpress方案?还是基于javasprint MVC方案。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题