//var grades = ['1', '2', '3', '4', '7', '8', '9']; var grades = ['1']; grades.forEach(function (item) { App.Template.getTemplates(item, term, session).then(function (rs) { var mm = 'm' + item; var m = Ember.Object.create({}); m.set( mm,rs); controller.set('model', m); console.log(controller.get('model')); }, function (error) { alert('获取错误!'); }); });