Ben 8 years ago
parent
commit
ebf836e51d
1 changed files with 10 additions and 10 deletions
  1. 10 10
      miaomiao/www/js/controllers/home.js

+ 10 - 10
miaomiao/www/js/controllers/home.js

xqd xqd xqd xqd
@@ -78,7 +78,7 @@
                 leftTimer($scope.dream.time-inter);
                 $scope.multi = {
                     a: $scope.dream.a,
-                    b: new Date($scope.dream.created_at),
+                    b: new Date($scope.dream.created_at.replace(/-/g, "/")),
                     c: $scope.dream.c,
                     result: 1,
                     promise:null,
@@ -121,7 +121,6 @@
         }
         $scope.timer = '';
         var leftTimer = function (countDown) {
-             
             if (isNaN(countDown)) {
                 $scope.timer = '结束';
                 return;
@@ -157,7 +156,8 @@
         }
         //实时计算支持乘数
         $scope.calcmultiplier = function () {
-            $scope.multi.promise=$interval(function () {
+            $scope.multi.promise = $interval(function () {
+                
                 var date = new Date();
                 var inter = date.getTime() - $scope.multi.b.getTime();
                 var minutes = Math.floor(inter / (60 * 1000));
@@ -227,23 +227,23 @@
         }
      
         $scope.replay = function ($event, name) {
+            
+            //$event.stopPropagation();
             $scope.input.focus = true;
-        //$event.stopPropagation();
-        $scope.input.placeholder = "回复" + name;
-        
-        $scope.vm.title='';
+            $scope.input.placeholder = "回复" + name;
+            $scope.vm.title='';
         }
         $scope.comment = function(){
           //  $event.stopPropagation();
-            $scope.input.placeholder = "评论";
+            //$scope.input.placeholder = "评论";
             $scope.input.focus = true;
             $scope.vm.title='';
         }
         $scope.submitComment = function(id){
-            $scope.input.placeholder = "评论";
+           // $scope.input.placeholder = "评论";
             var data = {
                 id:id,
-                content:vm.comment,
+                content:$scope.vm.comment,
             };
             homeService.add_comment(data).then(function(){
                  $scope.vm.comment = '' ;