123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- angular.module('push')
- .controller('activityCompanyViewFeedListCtrl', function ($scope, UtilService, $stateParams, ActivityService) {
- /* $scope.setStatusBar(1);*/
- var activityid = $stateParams.activityid;
- // 获取我的反馈列表
- var getFollowupList = function () {
- $scope.showLoadingToast();
- // 1专家 2企业
- ActivityService.getFollowupList(activityid, 2).then(function (response) {
- // console.log(response);
- $scope.followuplist = response;
- $scope.hideLoadingToast();
- }, function () {
- $scope.hideLoadingToast();
- })
- };
- getFollowupList();
- var followupid = 0;// 对应反馈id
- var commentid = 0;// 评价id
- var listindex = -1;
- // 显示评论弹窗
- $scope.showCommentFloor = function (folupid, comid, index) {
- $scope.showComment = false;
- followupid = folupid;
- commentid = comid;
- listindex = index;
- };
- $scope.hiddenComment = function () {
- $scope.showComment = true;
- };
- // 评分
- $scope.starnum = 0;
- $scope.evaluateNum = function (num) {
- $scope.starnum = num;
- };
- $scope.comment = {content: ""};
- // 反馈评论
- $scope.showComment = true;
- $scope.publishComment = function () {
- if (!UtilService.isDefined($scope.comment.content)) {
- UtilService.showMess("请填写评论内容");
- return;
- }
- $scope.showComment = true;
- var content = $scope.comment.content;
- // 提交评论信息
- $scope.showLoadingToast();
- ActivityService.commentFollowupInfo(commentid, followupid, content, $scope.starnum).then(function () {
- UtilService.showMess("评论成功");
- getFollowupList();
- $scope.comment.content = "";
- $scope.starnum = 0;
- listindex = -1;
- $scope.hideLoadingToast();
- }, function () {
- $scope.hideLoadingToast();
- });
- };
- // 进入反馈详情
- $scope.goDetail = function (folupid) {
- $scope.go("activityCompanyViewFeedListDetail", {folupid: folupid})
- }
- });
|