修改管理课程界面刷新显示问题
This commit is contained in:
parent
8d8de084ac
commit
c2166811eb
|
@ -28,7 +28,7 @@ module Mobile
|
|||
ss = SyllabusesService.new
|
||||
|
||||
sy = ::Syllabus.find(params[:id])
|
||||
|
||||
sy.courses = sy.courses.not_deleted
|
||||
sy = ss.judge_can_setting(sy,current_user)
|
||||
|
||||
present :data, sy, with: Mobile::Entities::Syllabus
|
||||
|
|
|
@ -10,18 +10,25 @@ app.controller('EditClassController', ['$scope', '$http', 'auth', 'config', 'ale
|
|||
$http.get(config.apiUrl+"syllabuses/"+syllabus_id+"?token="+auth.token()).then(function(response){
|
||||
console.log(response.data);
|
||||
vm.syllabus = response.data.data;
|
||||
});
|
||||
}
|
||||
console.log(vm.syllabus);
|
||||
|
||||
//名字用两份
|
||||
if (vm.syllabus) {
|
||||
for (var i in vm.syllabus.courses) {
|
||||
var course = vm.syllabus.courses[i];
|
||||
course.tmpname = course.name;
|
||||
}
|
||||
vm.syllabus.tmptitle = vm.syllabus.title;
|
||||
}
|
||||
});
|
||||
}
|
||||
console.log(vm.syllabus);
|
||||
|
||||
|
||||
//名字用两份
|
||||
if (vm.syllabus) {
|
||||
for (var i in vm.syllabus.courses) {
|
||||
var course = vm.syllabus.courses[i];
|
||||
course.tmpname = course.name;
|
||||
}
|
||||
vm.syllabus.tmptitle = vm.syllabus.title;
|
||||
}
|
||||
//单弹框
|
||||
vm.alertService_1 = alertService.create();
|
||||
|
||||
|
|
Loading…
Reference in New Issue