function initEquipment(url) {
accessorys = [];
$.ajax({
type: "GET",
url: url,
dataType: "json",
success: function(result) {
accessorys = result.content;
/* accessoryVues.accessoryList = accessorys;
*
*/
var Profile = Vue.extend({
template: '
' +
'
' +
'
{{a.itemEquipmentModel.name}}' +
'
¥{{a.commonProperty.minPrice/100}}/{{a.itemEquipmentModel.unit}}' +
'
产品规格:{{s}}' +
'
产品用途:{{s}} ' +
'
' +
'
' +
'
',
data: function() {
return {
accessoryList: accessorys
}
}
})
// 创建 Profile 实例,并挂载到一个元素上。
new Profile().$mount('#center');
},
error: function(result) {
console.log(result);
}
});
/*if(accessoryVues == null) {
accessoryVues = new Vue({
el: "#center",
data: {
accessoryList: accessorys
}
});
}*/
// 创建构造器
}