Mike 8 년 전
부모
커밋
9f764a33be

+ 1 - 1
miaomiao/www/chcp.json

xqd
@@ -1,5 +1,5 @@
 {
   "update": "now",
   "content_url": "http://i.9026.com/miaomiao/",
-  "release": "2017.06.29-15.35.19"
+  "release": "2017.06.29-17.32.02"
 }

+ 10 - 10
miaomiao/www/chcp.manifest

xqd xqd xqd xqd xqd xqd
@@ -29,7 +29,7 @@
   },
   {
     "file": "css/style.css",
-    "hash": "7832cbb107305c5195a0d3ec1085304c"
+    "hash": "03ab56135058b32cb788f1cd9763bb2b"
   },
   {
     "file": "img/alipay.png",
@@ -133,11 +133,11 @@
   },
   {
     "file": "js/config/router.js",
-    "hash": "b4c988a2b6829e80d48438f94f71b7ab"
+    "hash": "f7ad13bb968df8e14565a03089cd82ea"
   },
   {
     "file": "js/controllers/account.js",
-    "hash": "083e26f2a92b3bb793f12cff73a7ad24"
+    "hash": "5ce31f1998dd62efdd1df16c411e1aab"
   },
   {
     "file": "js/controllers/add.js",
@@ -145,7 +145,7 @@
   },
   {
     "file": "js/controllers/home.js",
-    "hash": "e6eab7933164bf536e89e48c31719a44"
+    "hash": "5e0b2789590c65ccd9fe4a2b5a5dfb01"
   },
   {
     "file": "js/controllers/my.js",
@@ -161,7 +161,7 @@
   },
   {
     "file": "js/filters/filter.js",
-    "hash": "4837cea3f7539adc487e1b075321bc98"
+    "hash": "89bc93d8cab12fef9133637e1bb48e2f"
   },
   {
     "file": "js/platformOverrides.js",
@@ -453,19 +453,19 @@
   },
   {
     "file": "templates/account/login.html",
-    "hash": "a69ae39d69eac0856e08a221ae2e6dc4"
+    "hash": "bd4e91b4e93f8498bf1caba3e25c4ab1"
   },
   {
     "file": "templates/add/index.html",
-    "hash": "60d4ea439f0d730da51f1e540a9ee8d0"
+    "hash": "45bb6e9ea44f8a9aea6d62d8ad7b752d"
   },
   {
     "file": "templates/home/dream-detail.html",
-    "hash": "f18862ee66df64f91e79df6a8b97a75f"
+    "hash": "50a401172d8e701b877016061f345952"
   },
   {
     "file": "templates/home/index.html",
-    "hash": "597694367bf5af356bb005e239b21362"
+    "hash": "bfbced6842d6c0b1b5f14211a969e36a"
   },
   {
     "file": "templates/home/search.html",
@@ -481,7 +481,7 @@
   },
   {
     "file": "templates/my/my-dream.html",
-    "hash": "6810e83ed11d3a2a9d71c914121802a9"
+    "hash": "4730f050d2fcff1330fbdb4b8a4a49a7"
   },
   {
     "file": "templates/my/my-message-reply.html",

+ 1 - 0
miaomiao/www/css/style.css

xqd
@@ -142,6 +142,7 @@ overflow:auto;
 }
     .mainitem img {
         width:100%;
+        max-height: 220px;
     }
     .mainitem .row .col img {
         max-width: 45px;

+ 4 - 4
miaomiao/www/js/config/router.js

xqd
@@ -50,12 +50,12 @@
                     }
                 }
             })
-        .state('app.home_dream', {
-            url: '/home/dream',
+        .state('app.home_collect', {
+            url: '/home/collect',
             views: {
                 'app-home': {
-                    templateUrl: 'templates/my/my-dream.html',
-                    controller: 'homeDreamsCtrl'
+                    templateUrl: 'templates/my/my-collect.html',
+                    controller: 'collectCtrl'
                 }
             }
         })

+ 21 - 17
miaomiao/www/js/controllers/home.js

xqd xqd xqd xqd
@@ -63,7 +63,8 @@
     app.controller('dreamDetailCtrl', ["$scope", "$state", "storage","msg", "common", "config", "homeService", "$ionicTabsDelegate", "$stateParams", "$ionicModal", "$timeout", "$ionicScrollDelegate", "$interval"
         , function ($scope, $state, storage , msg, common, config, homeService, $ionicTabsDelegate, $stateParams, $ionicModal, $timeout, $ionicScrollDelegate, $interval) {
         var id = $stateParams.id;
-        id=5;
+        var top3user = '';
+        // id=5;
         $scope.load = function (id) {
             msg.loading();
             homeService.dreamDetail(id).then(function (result) {
@@ -78,19 +79,22 @@
                 $scope.multi.b = new Date($scope.dream.created_at.replace(/-/g, "/"));
                 $scope.multi.c  = $scope.dream.c;
                 $scope.multi.promise =  $scope.dream.a;
-                $top3user = storage.getObject('top3user');
-                if($scope.dream.top3user != $top3user&&$top3user != null){
+                var newtop3user = '' 
+                angular.forEach($scope.dream.top3user, function(user) {  
+                  newtop3user= newtop3user +user.id+","
+                });   
+                if(top3user!=''&&newtop3user!=top3user){
                     //测试动画切换
-                    if($scope.dream.top3user[0])$scope.sort.first = $scope.dream.top3user[0].avatar;
-                    if($scope.dream.top3user[1])$scope.sort.second = $scope.dream.top3user[1].avatar;
-                    if($scope.dream.top3user[2])$scope.sort.third = $scope.dream.top3user[2].avatar;
-                    $scope.sort.slide1 = 'list-grow-animation';
-                    $scope.sort.slide2 = 'slide-in-both-ways';
-                    $scope.sort.slide3 = 'bounce-animation';
-                    storage.setObject('top3user',$scope.dream.top3user)
+                    $timeout(function() {
+                        $scope.sort.slide1 = 'list-grow-animation';
+                        $scope.sort.slide2 = 'slide-in-both-ways';
+                        $scope.sort.slide3 = 'bounce-animation';
+                    }, 50);
                 }
-
-
+                top3user = newtop3user;
+                if($scope.dream.top3user[0])$scope.sort.first = $scope.dream.top3user[0].avatar;
+                if($scope.dream.top3user[1])$scope.sort.second = $scope.dream.top3user[1].avatar;
+                if($scope.dream.top3user[2])$scope.sort.third = $scope.dream.top3user[2].avatar;
                 $scope.calcmultiplier();
             }, function (error) {
                 msg.hide();
@@ -114,6 +118,10 @@
         $scope.cancelSupport = function () {
             $scope.tosupport = false;
         }
+        //实时排行
+        $scope.sort = {
+            slide: ''
+        }
         $scope.changeType = function (type) {
             $ionicScrollDelegate.scrollTop(true);
             $scope.type = type;
@@ -159,11 +167,7 @@
         $scope.changeIndex = function (index) {
             $scope.index = index;
             $scope.vm.coin = index*5;
-        }
-        //实时排行
-        $scope.sort = {
-            slide: ''
-        }
+        } 
         $scope.vidEnded = function () {
             alert('播放完毕');
         }

+ 15 - 0
miaomiao/www/js/filters/filter.js

xqd
@@ -60,6 +60,21 @@
             return input;
         };
     });
+    module.filter('lastDate', function () {
+        return function (end_time) {
+            var end_time = new Date(end_time);
+            var date = new Date();
+            var inter = (end_time.getTime() - date.getTime()) / (1000*3600*24)
+            number = Math.round(inter * 100) / 100
+            return number;
+        };
+    });
+    module.filter('Rouder', function () {
+        return function (inter) {
+            number = Math.round(inter * 100) / 100
+            return number;
+        };
+    });
     module.filter('storeavator', function () {
         return function (input) {
             

+ 0 - 1
miaomiao/www/templates/add/index.html

xqd
@@ -21,7 +21,6 @@
             <div class="item itemjs">
                 <a ng-repeat="item in imgs" ng-click="showImages(item)" class="img-file-up">
                     <b style="background-image:url({{item}});"><em ng-click="deletefile(item)" class="ion-ios-close-outline"></em></b>
-                }
                 </a>
                 <a class="btn-file-up" ng-click="addpict()"><i class="ion-image"></i>添加图片</a>
                 <video src="{{video.path}}" ng-show="video.isOK"  height="72px" width="72px" controls="controls">

+ 1 - 1
miaomiao/www/templates/home/dream-detail.html

xqd
@@ -26,7 +26,7 @@
                     </div>
                 </ion-slide-page>
                 <ion-slide-page ng-repeat="img in dream.imgs" >
-                    <div class="box banner"><img ng-src="{{img.pic}}" /></div>
+                    <div class="box banner"><img ng-src="{{img.pic}}" style="max-height: 200px;width: 100%" /></div>
                 </ion-slide-page>
             </ion-slides>
             <div class="list detail-list">

+ 2 - 2
miaomiao/www/templates/home/index.html

xqd xqd
@@ -55,7 +55,7 @@
                                 <span class="calm">{{item.care_num}}</span>
                                 <span>人关注</span>
                             </div>
-                            <div  class="mysecond">剩余{{item.time}}天</div>
+                            <div  class="mysecond">剩余{{item.end_time | lastDate}}天</div>
                         </div>
                     </div>
                         <img ng-src="{{item.img.pic}}" />
@@ -81,7 +81,7 @@
                      <i class="icon ion-android-person"></i>
                    个人中心
                  </a>
-                 <a class="item item-icon-left" ui-sref="app.home_dream">
+                 <a class="item item-icon-left" ui-sref="app.home_collect">
                      <i class="icon ion-ios-folder-outline"></i>
                      我的收藏
                  </a>

+ 2 - 2
miaomiao/www/templates/my/my-dream.html

xqd
@@ -8,10 +8,10 @@
                    <p>{{dream.about}}</p>
                </div>
                <div class="reply-bar">
-                   <div style="width: {{dream.progress}}%;">
+                   <div style="width: {{100*dream.get_coin/dream.coin}}%;">
                    </div>
                </div>
-               <div class="reply-sx"><span class="calm">{{dream.progress}}%</span> 目前实现</div>
+               <div class="reply-sx"><span class="calm">{{100*dream.get_coin/dream.coin | Rouder}}%</span> 目前实现</div>
            </div>
            
        </div>