利用vue v-for拼接<a>的参数
1 <table v-for="order in orders"> 2 <a :href="'productDetail.html?pid='+order.orderItem[0].servId"> 3 </table>
1 axios.get("http://192.168.1.106:8080/v/order/showBuy") 2 .then(function(response) { 3 var orders = response.data.data.orders; 4 var order = new Vue({ 5 el: '#orderItems', 6 data: { 7 orders: orders, 8 } 9 }); 10 }) 11 .catch(function(error) { 12 console.log(error); 13 })