std_material.js 634 B

1234567891011121314151617181920212223
  1. app.controller('StdMaterialCtrl', [ '$rootScope', '$scope', function($rootScope, $scope) {
  2. $scope.getMaterialArray = function(){
  3. $rootScope.ajaxRequest({
  4. url : '../enrol/std/material/all.htm'
  5. }, function(response) {
  6. $scope.materialArray = response.array;
  7. });
  8. }
  9. $scope.getMaterialArray();
  10. $scope.showMaterial = function(m){
  11. // 没有上传或者审核失败
  12. if(m.material_id == undefined || m.verify_status == 'InActive') {
  13. $rootScope.uploadStdMaterial(m.material_type,function(){
  14. $scope.getMaterialArray();
  15. });
  16. }else {
  17. $rootScope.goLocation('std/material_info/' + m.material_id );
  18. }
  19. }
  20. } ])