微信小程序提交 webapi FormDataCollection

时间:2019-05-11 16:20:50   收藏:0   阅读:461
/// <returns></returns>
        [HttpPost]
        public ShoppingCartModel UpdateCart(FormDataCollection form)
        {}

 

微信小程序提交此参数应如下填写

var data =new Array();  

    var items = this.data.items;
    items.forEach(v => { 
      if (v.selected) { 
        var key = "itemquantity" + v.id;
        var value = v.inputQuantity 
        data.push({key,value});
      }
    });

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!