| xqd
@@ -469,7 +469,18 @@
|
|
|
$scope.dream.interactions[index].showmore = true;
|
|
|
}
|
|
|
}
|
|
|
- $scope.replay = function ($event, name, index,currentindex) {
|
|
|
+ $scope.replay = function ($event, name, index) {
|
|
|
+ $event.stopPropagation();
|
|
|
+ $scope.input.focus = true;
|
|
|
+ $scope.input.show = true;
|
|
|
+ angular.forEach($scope.dream.interactions, function (item) {
|
|
|
+ item.show = false;
|
|
|
+ })
|
|
|
+ $scope.dream.interactions[index].show = true;
|
|
|
+ $scope.input.placeholder = "评论" + name+":";
|
|
|
+ $scope.vm.title='';
|
|
|
+ }
|
|
|
+ $scope.replayOther = function ($event, name, index,currentindex) {
|
|
|
$event.stopPropagation();
|
|
|
if($scope.dream.interactions[index].comments[currentindex].user_id!=$scope.user.id){
|
|
|
$scope.input.focus = true;
|
| xqd
@@ -482,12 +493,15 @@
|
|
|
$scope.vm.title='';
|
|
|
}
|
|
|
else {
|
|
|
- msg.confirm("评论","是否删除评论").then(function(res){
|
|
|
- if(res)
|
|
|
+ msg.confirm("评论","是否删除评论").then(function(result){
|
|
|
+ if(result==true)
|
|
|
{
|
|
|
-
|
|
|
- }else {
|
|
|
-
|
|
|
+ homeService.deleteComment($scope.dream.interactions[index].comments[currentindex].id).then(function(result){
|
|
|
+ msg.text("删除成功");
|
|
|
+ $scope.load(id);
|
|
|
+ },function(error){
|
|
|
+ msg.error(error.data.message);
|
|
|
+ })
|
|
|
}
|
|
|
});
|
|
|
}
|