/**
 * controller
 * @return
 */
module.exports = Controller("Admin/BaseController", function() {
  "use strict";


  var Service = require("../../Service/Service");
  var oss = require("../../Service/Oss");


  return {
    indexAction: function(){
      var self = this;
      if(self.userInfo && self.userInfo.isAdmin == 1){
        self.assign({
          title : "管理后台-教师管理"
        })
        self.display()
      }
    }
  };
});

@@ -321,16 +321,93 @@
  == 1)%7B%0A
+        if(self.isGet())%7B%0A          var courses = Service.getAllCourses();%0A  
         
@@ -430,16 +430,18 @@
         
+  
 title : 
@@ -451,17 +451,50 @@
 %E5%90%8E%E5%8F%B0-%E6%95%99%E5%B8%88%E7%AE%A1%E7%90%86%22
+,
 %0A
+            courses : courses%0A  
         
@@ -496,16 +496,18 @@
      %7D)%0A
+  
         
@@ -521,16 +521,443 @@
 splay()%0A
+        %7Delse if(self.isPost())%7B%0A          var img = self.file('img');%0A          oss.put(img , %7Bbucket:'n-teacher', key : 'cft/'%7D).then(function(res)%7B%0A            if(res)%7B%0A              Service.addTeacher(extend(data,%7Bimg : img.originalFilename %7D)).then(function(content)%7B%0A                self.success(content)%0A              %7D)%0A            %7D%0A          %7D).catch(function(err)%7B%0A            self.error(err)%0A          %7D)%0A        %7D%0A
       %7D%0A

add files by wangpengfei