activityCompanyViewFeedListDetailCtrl.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. angular.module('push')
  2. .controller('activityCompanyViewFeedListDetailCtrl', function ($scope, $stateParams, ActivityService, UtilService) {
  3. /* $scope.setStatusBar(1);*/
  4. var folupid = $stateParams.folupid;
  5. var getFollowupDetail = function () {
  6. $scope.showLoadingToast();
  7. ActivityService.getFollowupDetail(folupid,2).then(function (response) {
  8. // console.log(response);
  9. $scope.followup = response;
  10. $scope.hideLoadingToast();
  11. }, function () {
  12. $scope.hideLoadingToast();
  13. })
  14. };
  15. getFollowupDetail();
  16. $scope.showCommentFloor = function () {
  17. $scope.showComment = false;
  18. };
  19. $scope.hiddenComment = function () {
  20. $scope.showComment = true;
  21. };
  22. //评分
  23. $scope.starnum = 0;
  24. $scope.evaluateNum = function (num) {
  25. $scope.starnum = num;
  26. };
  27. //详情页评论
  28. $scope.showComment = true;
  29. $scope.publishComment = function () {
  30. $scope.showComment = true;
  31. var content = $scope.comment.content;
  32. //提交评论信息
  33. $scope.showLoadingToast();
  34. CommentService.publishComment(0, infoid, infotype, "", "", content, infocomefrom, $scope.starnum).then(function () {
  35. UtilService.showMess("评论成功");
  36. $scope.comment.content = "";
  37. $scope.starnum = 0;
  38. $scope.hideLoadingToast();
  39. }, function () {
  40. $scope.hideLoadingToast();
  41. });
  42. };
  43. });