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方案。

推荐问题