technicalBrokerSelfSignUpTrainCtrl.js 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. angular.module('push')
  2. .controller('technicalBrokerSelfSignUpTrainCtrl', function ($scope, TechnicalBrokerPublishTrainService, UtilService, UserService, $stateParams, $timeout) {
  3. // 已参加的培训类别
  4. $scope.mold = 2;
  5. //虚拟搜索框
  6. $scope.isShowSearchButton = true;
  7. $scope.keyfilter = {key: ""};//搜索关键词
  8. $scope.showSearchButtonLeft = function () {
  9. $scope.isShowSearchButton = false;
  10. $(".showSearchInput").focus();
  11. };
  12. //清空搜索内容
  13. $scope.clearSearch = function () {
  14. $scope.isShowSearchButton = true;
  15. $scope.keyfilter.key = "";
  16. };
  17. //获取已报名的培训列表
  18. $scope.traininfolist=[
  19. {
  20. id: 0,
  21. title: "",
  22. content: "",
  23. trainbegintime: "",
  24. signupenddate: "",
  25. areaid: 0,
  26. areaname: "",
  27. detailaddress: "",// 详细地址
  28. isactive: 1,// 培训状态:是否有效,0无效,1有效
  29. sponsors: "",// 传到后台的主办方/协办方json stype:类别:1.主办方 2.协办方
  30. sponsorlist: [],// 取得详情里的主办方
  31. imagelist: [],// app端图片插件进行传递的变量
  32. logo:"//img4.mukewang.com/szimg/5abe148300014c3305400300.jpg",
  33. firstpic:"//img4.mukewang.com/szimg/5abe148300014c3305400300.jpg",
  34. trainstatus:1,
  35. trainstatusname:"",// 培训状态名称
  36. trainLeaveDays:5,// 报名剩余天数
  37. traincount:5,// 培训总数
  38. signupcount:255,// 已报名总数
  39. isedit:0,// 是否有编辑权限:0无 1有
  40. traintype: 0,// 培训种类
  41. traintypename: "",// 培训种类名称
  42. creator: 0,
  43. creatorname: "",
  44. creatorphoto: ""// 用户logo
  45. }
  46. ];
  47. // 获取已报名的培训列表
  48. var getTrainInfoList = function () {
  49. $scope.showLoadingToast();
  50. TechnicalBrokerPublishTrainService.getTrainInfoList($scope.mold).then(function (response) {
  51. console.log(response);
  52. $scope.traincount = response.traincount;
  53. $scope.traininfolist = response.traininfolist;
  54. $scope.hideLoadingToast();
  55. }, function () {
  56. $scope.hideLoadingToast();
  57. })
  58. };
  59. getTrainInfoList();
  60. //跳转到培训详情页
  61. $scope.goTrainContent=function (trainid) {
  62. $scope.go('technicalBrokerTaskListContent', {trainid: trainid});
  63. };
  64. //去签到
  65. $scope.goSignIn=function () {
  66. };
  67. });