html

效果图 v-model的属性不是item中的

js:

var vm = new Vue({
el:'#mygifiTCdiv',
data:{
items:[
// {pay:"1"},
],
pay:[],//pay:''因为是多个inout 所以是数组的形式
},
created: function(){
this.getRoute();
},
//在 methods中定义方法函数
methods: {
getRoute: function () {
var that = this;
var url= path+"/packageProduct/selectPackageProductByAddressIdAndType";
this.$http.post('http://localhost:8080/ArtAppInst2/packageProduct/selectPackageProductByAddressIdAndType',{
"addressId":storageAddressId,
"token":token,
"packageType":8,
},
{
emulateJSON:true
}).then(function(response){
console.log(response.data.msg);
that.data = response.data.msg;
that.items = response.data.body.packageProducts;
console.log(that.items);
},function(response){
alert(response.msg)
});
},
buyPackageBtn:function(id){
alert(id)
}
}
})
感谢大神们指点^^^^^
慕瓜4450240
夜舞暗澜
随时随地看视频慕课网APP
相关分类