activityCompanyViewFeedListCtrl.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. angular.module('push')
  2. .controller('activityCompanyViewFeedListCtrl', function ($scope, UtilService, $stateParams, ActivityService) {
  3. /* $scope.setStatusBar(1);*/
  4. var activityid = $stateParams.activityid;
  5. // 获取我的反馈列表
  6. var getFollowupList = function () {
  7. $scope.showLoadingToast();
  8. // 1专家 2企业
  9. ActivityService.getFollowupList(activityid, 2).then(function (response) {
  10. // console.log(response);
  11. $scope.followuplist = response;
  12. $scope.hideLoadingToast();
  13. }, function () {
  14. $scope.hideLoadingToast();
  15. })
  16. };
  17. getFollowupList();
  18. var followupid = 0;// 对应反馈id
  19. var commentid = 0;// 评价id
  20. var listindex = -1;
  21. // 显示评论弹窗
  22. $scope.showCommentFloor = function (folupid, comid, index) {
  23. $scope.showComment = false;
  24. followupid = folupid;
  25. commentid = comid;
  26. listindex = index;
  27. };
  28. $scope.hiddenComment = function () {
  29. $scope.showComment = true;
  30. };
  31. // 评分
  32. $scope.starnum = 0;
  33. $scope.evaluateNum = function (num) {
  34. $scope.starnum = num;
  35. };
  36. $scope.comment = {content: ""};
  37. // 反馈评论
  38. $scope.showComment = true;
  39. $scope.publishComment = function () {
  40. if (!UtilService.isDefined($scope.comment.content)) {
  41. UtilService.showMess("请填写评论内容");
  42. return;
  43. }
  44. $scope.showComment = true;
  45. var content = $scope.comment.content;
  46. // 提交评论信息
  47. $scope.showLoadingToast();
  48. ActivityService.commentFollowupInfo(commentid, followupid, content, $scope.starnum).then(function () {
  49. UtilService.showMess("评论成功");
  50. getFollowupList();
  51. $scope.comment.content = "";
  52. $scope.starnum = 0;
  53. listindex = -1;
  54. $scope.hideLoadingToast();
  55. }, function () {
  56. $scope.hideLoadingToast();
  57. });
  58. };
  59. // 进入反馈详情
  60. $scope.goDetail = function (folupid) {
  61. $scope.go("activityCompanyViewFeedListDetail", {folupid: folupid})
  62. }
  63. });