YanaDH 8 年之前
父節點
當前提交
c1b4e9d086

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

xqd xqd xqd xqd
@@ -183,6 +183,7 @@ overflow:auto;
 }
 .mainitem {
     padding:0;
+    margin-bottom: -53px;
 }
     .mainitem img {
         width:100%;
@@ -214,6 +215,18 @@ overflow:auto;
     border-radius:10px;
     padding: 0px 10px
 }
+.homeDream{
+    background: #767778;
+    opacity: 0.8;
+    top: -55px;
+    position: relative;
+    padding: 5px 0 5px 10px;
+}
+.homeDream p{
+    color: #fff;
+    /*font-family: 宋体;*/
+}
+
 /*my-html*/
 .user-box {
     position: relative;
@@ -234,7 +247,7 @@ overflow:auto;
 }
 .user-dz {
 text-align:center;
-border-bottom:5px solid #FBF2F5;
+border-bottom:10px solid #F2F2F2;
 padding:10px;
 }
 .user-dz .num{
@@ -473,6 +486,13 @@ padding-right:3px;
 .phbcontent {
     padding-top:49px;
 }
+/*dreamDetail*/
+.top2{
+    margin-top: 20px; text-align: center; float:left; height: 100px; width: 100px;color: #6B6B6B;font-size: 16px;
+}
+.top1{
+    text-align: center; float:left; height: 120px; width: 120px;color: #6B6B6B;font-size: 16px;
+}
 /*seach.html*/
 .search-hot {
     font-size:1rem;

+ 12 - 0
miaomiao/www/img/icon_gongxian.svg

xqd
@@ -0,0 +1,12 @@
+<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" width="24.94" height="30" viewBox="0 0 24.94 30">
+  <defs>
+    <style>
+      .cls-1 {
+        fill: gray;
+        fill-rule: evenodd;
+      }
+    </style>
+  </defs>
+  <title>icon_gongxian</title>
+  <path class="cls-1" d="M26.13,34l-6-2a3,3,0,0,0-1.8,0l-6,2V30a9.52,9.52,0,0,1-1.39-.9v5.06a1.39,1.39,0,0,0,1.39,1.39.88.88,0,0,0,.42-.07l6-2a1.28,1.28,0,0,1,.83,0l6,2a.88.88,0,0,0,.42.07,1.39,1.39,0,0,0,1.39-1.39V29A9.51,9.51,0,0,1,26,30V34ZM19.2,5.49A12.47,12.47,0,1,0,31.67,18,12.51,12.51,0,0,0,19.2,5.49ZM19.2,29A11.09,11.09,0,1,1,30.29,18,11.12,11.12,0,0,1,19.2,29Zm0-20.79A9.7,9.7,0,1,0,28.9,18a9.73,9.73,0,0,0-9.7-9.7Zm0,18A8.31,8.31,0,1,1,27.51,18a8.34,8.34,0,0,1-8.31,8.31Z" transform="translate(-6.73 -5.49)"/>
+</svg>

文件差異過大導致無法顯示
+ 32 - 0
miaomiao/www/img/img_No1.svg


文件差異過大導致無法顯示
+ 26 - 0
miaomiao/www/img/img_No2.svg


文件差異過大導致無法顯示
+ 26 - 0
miaomiao/www/img/img_No3.svg


+ 10 - 0
miaomiao/www/js/config/router.js

xqd
@@ -41,6 +41,16 @@
                     }
                 }
             })
+            .state('app.userDetail', {
+                url: '/home/userDetail',
+                params:{id:null},
+                views: {
+                    'app-home': {
+                        templateUrl: 'templates/home/userDetail.html',
+                        controller: 'userDetailCtrl'
+                    }
+                }
+            })
             .state('app.home_search', {
                 url: '/home/search',
                 views: {

+ 33 - 9
miaomiao/www/js/controllers/home.js

xqd xqd xqd xqd xqd xqd
@@ -2,7 +2,14 @@
     app.controller('homeCtrl', ["$scope", "$http", 'config', "$state", "msg", "$ionicPopover", "homeService"
         , function ($scope, $http, config, $state, msg, $ionicPopover, homeService) {
         $scope.type = 'hot';//tab切换
- 
+
+            $scope.width = function() {
+                var height = window.screen.width /20;
+                $scope.heightStyle = {
+                    "height": "height" ,
+                    "border": "1px solid red"
+                };
+            };
         $ionicPopover.fromTemplateUrl('my-popover.html', {
             scope: $scope
         }).then(function (popover) {
@@ -17,14 +24,17 @@
         $scope.changetype = function (type) {
             $scope.type = type;
             $scope.load(true);
-        }
+        };
         $scope.toDetail = function (id) {
             $state.go('app.home_dreamdetail',{id:id});
         };
+        $scope.toUserDetail = function (id) {
+            $state.go('app.userDetail',{id:id});
+        };
         $scope.filter = {
             hasMore: false,
             pageIndex: 1,
-            pageSize: 20,
+            pageSize: 20
         }
         $scope.index = {
             banner: [],
@@ -100,16 +110,16 @@
             homeService.dreamDetail(id).then(function (result) {
                 msg.hide();
                 console.log(result);
-                $scope.dream = result.data.data
+                $scope.dream = result.data.data;
                 var end_time = new Date($scope.dream.end_time.replace(/-/g, "/"));
                 var date = new Date();
-                var inter = (end_time.getTime() - date.getTime()) / 1000
+                var inter = (end_time.getTime() - date.getTime()) / 1000;
                 leftTimer(inter);
                 $scope.multi.a =  $scope.dream.a;
                 $scope.multi.b = new Date($scope.dream.created_at.replace(/-/g, "/"));
                 $scope.multi.c  = $scope.dream.c;
                 $scope.multi.promise =  $scope.dream.a;
-                var newtop3user = '' 
+                var newtop3user = '' ;
                 angular.forEach($scope.dream.top3user, function(user) {  
                   newtop3user= newtop3user +user.id+","
                 });   
@@ -135,7 +145,7 @@
             b: '',
             c: '',
             result: 1,
-            promise:null,
+            promise:null
         }
         $scope.type = 1;//tab切换
         $scope.tosupport = false;
@@ -151,11 +161,11 @@
         //实时排行
         $scope.sort = {
             slide: ''
-        }
+        };
         $scope.changeType = function (type) {
             $ionicScrollDelegate.scrollTop(true);
             $scope.type = type;
-        }
+        };
         $scope.index = 0;
         $scope.$on('$ionicView.beforeEnter', function () {
             $scope.load(id);
@@ -338,6 +348,20 @@
             $scope.modal.remove();
           });
         }]);
+    app.controller('userDetailCtrl', ["$scope","homeService", "$stateParams","$state", "msg"
+        , function ($scope,homeService,$stateParams, $state, msg) {
+            var id = $stateParams.id;
+            $scope.load = function (id) {
+                msg.loading();
+                homeService.dreamDetail(id).then(function (result) {
+                    msg.hide();
+                    $scope.user = result.data.data;
+                }, function (error) {
+                    msg.hide();
+                });
+            };
+            $scope.load(id)
+        }]);
     app.controller('searchCtrl', ["$scope","homeService", "$state", "msg", "$ionicTabsDelegate", "$ionicNavBarDelegate"
         , function ($scope,homeService, $state, msg, $ionicTabsDelegate, $ionicNavBarDelegate) {
 

+ 1 - 0
miaomiao/www/js/services/homeservice.js

xqd
@@ -71,6 +71,7 @@
                     data:data
                 })
             },
+
             
         };
     }]);

+ 57 - 12
miaomiao/www/templates/home/dream-detail.html

xqd
@@ -136,18 +136,63 @@
         </div>
         
         <div ng-if="type==3" class="phbcontent">
-            <div class="list">
-                <div class="item" ng-repeat="user in dream.topuser">
-                    <img style="width:30px" src="../../img/king.png" />
-                    <span style="padding-left:20px">
-                        <img style="width:40px;border-radius:100%" src="{{user.avatar}}" />
-                        <span style="position:relative;top:-20px">{{user.nickname}}</span>
-                    </span>
-                    <span style="padding-left:50px;">
-                        <span style="position:relative;top:-20px;font-weight:500">{{user.score}}</span>
-                        <span style="color:#9E9E9E;position:relative;left:-50px">贡献</span>
-                    </span>
-                </div> 
+            <div class="row" style="background: #F2F2F2; width: 100%; height: 200px; text-align: center">
+                <div class="col top2" style="background: url('img/img_No2.svg') no-repeat; background-size: 100% 100%;">
+                    <img style="width: 67px; margin: 22px 0 8px 0; border-radius: 100%;" src="{{ dream.top3user[1].avatar }}" /><br>
+                    {{ dream.top3user[1].nickname }}<br>
+                    <img src="img/icon_gongxian.svg" style="height: 20px; width: 20px; margin-top: 5px" />
+                    <em style="font-size: 18px">{{ dream.top3user[1].score }}</em>
+                </div>
+                <div class="col top1" style="background: url('img/img_No1.svg') no-repeat; background-size: 100% 100%;">
+                    <img style="width: 80px; margin: 28px 0 8px 0; border-radius: 100%;" src="{{ dream.top3user[0].avatar }}" /><br>
+                    {{ dream.top3user[0].nickname }}<br>
+                    <img src="img/icon_gongxian.svg" style="height: 20px; width: 20px; margin-top: 5px" />
+                    <em style="font-size: 18px">{{ dream.top3user[0].score }}</em>
+                </div>
+                <div class="col top2" style="background: url('img/img_No3.svg') no-repeat; background-size: 100% 100%;">
+                    <img style="width: 67px; margin: 22px 0 8px 0; border-radius: 100%;" src="{{ dream.top3user[2].avatar }}" /><br>
+                    {{ dream.top3user[2].nickname }}<br>
+                    <img src="img/icon_gongxian.svg" style="height: 20px; width: 20px; margin-top: 5px" />
+                    <em style="font-size: 18px">{{ dream.top3user[2].score }}</em>
+                </div>
+            </div>
+            <div class="list padding">
+                <!--<div class="item" ng-if="$index > 2 " ng-repeat="user in dream.topuser" style="border-bottom: 1px solid #DFDFDF">
+                    <div style="float:left; color: #808080; font-size: 30px; font-weight: bold; margin-top: 10px">
+                        {{$index+1}}
+                    </div>
+                    <div style="padding-left:20px; float:left;">
+                        <div style="float:left;">
+                            <img style="width:40px;border-radius:100%" src="{{user.avatar}}" />
+                        </div>
+                        <div style="float:left; margin-left: 10px">
+                            <div style="font-size: 16px">{{user.nickname}}</div>
+                            <div style="color:#9E9E9E;">Lv.5</div>
+                        </div>
+                    </div>
+                    <div style="float: right;">
+                        <div style="font-weight:500; font-size: 18px">{{user.score}}</div>
+                        <div style="color:#9E9E9E;">贡献</div>
+                    </div>
+                </div> -->
+                <div class="item" ng-repeat="user in dream.topuser" style="border-bottom: 1px solid #DFDFDF">
+                    <div style="float:left; color: #808080; font-size: 30px; font-weight: bold; margin-top: 10px">
+                        {{$index+4}}
+                    </div>
+                    <div style="padding-left:20px; float:left;">
+                        <div style="float:left;">
+                            <img style="width:40px;border-radius:100%" src="{{user.avatar}}" />
+                        </div>
+                        <div style="float:left; margin-left: 10px">
+                            <div style="font-size: 16px">{{user.nickname}}</div>
+                            <div style="color:#9E9E9E;">Lv.5</div>
+                        </div>
+                    </div>
+                    <div style="float: right;">
+                        <div style="font-weight:500; font-size: 18px">{{user.score}}</div>
+                        <div style="color:#9E9E9E;">贡献</div>
+                    </div>
+                </div>
             </div>
             
         </div>

+ 10 - 6
miaomiao/www/templates/home/index.html

xqd xqd xqd
@@ -26,9 +26,9 @@
             </div>
         </div>
         <div class="icontent">
-            <ion-slides style="height: 170px;" options="data.sliderOptions" slider="data.sliderDelegate">
+            <ion-slides options="data.sliderOptions" slider="data.sliderDelegate">
                 <ion-slide-page ng-repeat="banner in index.banners">
-                    <div class="box banner"><img ng-src="{{banner.value}}" /></div>
+                    <div class="box banner" style="height: 170px"><img ng-src="{{banner.value}}" style="height: 100%; width: 100%" /></div>
                 </ion-slide-page>
             </ion-slides>
             <div class="item item-image" style="margin: 20px 0; border: none;" ng-if="index.users.length>0">
@@ -39,10 +39,10 @@
                 <!-- <i class="icon ion-ios-arrow-right" style="font-size: 1.5rem"></i> -->
             </div>
             <div class="list">
-                <div class="item mainitem" ng-click="toDetail(item.id)" ng-repeat="item in index.dreams">
+                <div class="item mainitem" ng-repeat="item in index.dreams">
                     <div class="row">
                         <div class="col">
-                            <img ng-src="{{item.user.avatar}}" />
+                            <img ng-src="{{item.user.avatar}}"  ng-click="toUserDetail(item.id)" />
                             <div  class="myblock">
                                <div>{{item.user.nickname}}<span>{{item.user.birthday | getage}}岁</span></div>
                                 <div class="mysecond">{{item.user.city}}</div>
@@ -57,8 +57,12 @@
                             <div  class="mysecond">剩余{{item.end_time | lastDate}}天</div>
                         </div>
                     </div>
-                    <div style="height: 100%">
-                        <img style="height: 20%" ng-src="{{item.img.pic}}" />
+                    <div ng-click="toDetail(item.id)">
+                        <img ng-src="{{item.img.pic}}" />
+                        <div class="homeDream">
+                            <p style="font-size: 16px">{{ item.name }}</p>
+                            <p>{{ item.about }}</p>
+                        </div>
                     </div>
                 </div>
             </div>

+ 83 - 0
miaomiao/www/templates/home/userDetail.html

xqd
@@ -0,0 +1,83 @@
+<ion-view>
+    <ion-nav-buttons side="right">
+        <button class="button button-clear icon ion-email-unread" style="padding-left:10px"></button>
+    </ion-nav-buttons>
+    <ion-content>
+        <div class="user-box">
+            <div class="myinfo">
+                <img style="height: 80px; width: 80px; border: 2px solid #fff" ng-src="{{user.user.avatar | avator }}" />
+                <div>
+                    {{user.user.nickname}}
+                </div>
+                <div style="font-size:0.7rem; margin-bottom: 10px"> {{user.user.city}}</div>
+                <div>
+                    <span style="background: #fff; color: #00C3DA; font-size:0.7rem; border-radius: 20px; padding: 2px 20px">关注</span>
+                </div>
+            </div>
+            <div class="row user-row">
+                <div class="col">
+                    <div style="border-right: 1px solid #80E1ED">
+                        {{user.score}}<br>
+                        收到的支持分
+                    </div>
+                </div>
+                <div class="col">
+                    <div style="border-right: 1px solid #80E1ED">
+                    {{user.score}}<br>
+                    关注
+                    </div>
+                </div>
+                <div class="col">
+                    {{user.score}}<br>
+                    粉丝
+                </div>
+            </div>
+        </div>
+        <!--<div class="row user-dz" ng-repeat="item in user.imgs">-->
+        <div class="row user-dz">
+            <div class="col">
+                <img style="width: 80px; height: 80px;" src="https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1784265725,2575462984&fm=117&gp=0.jpg">
+            </div>
+            <div class="col">
+                <img style="width: 80px; height: 80px;" src="https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1784265725,2575462984&fm=117&gp=0.jpg">
+            </div>
+            <div class="col">
+                <img style="width: 80px; height: 80px;" src="https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1784265725,2575462984&fm=117&gp=0.jpg">
+            </div>
+            <div class="col">
+                <img style="width: 80px; height: 80px;" src="https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1784265725,2575462984&fm=117&gp=0.jpg">
+            </div>
+        </div>
+        <div class="list padding" style="font-size: 18px; color: #828282">
+            <div class="row" style="padding: 20px 0; border-bottom: 1px solid #E6E6E6">
+                <div class="col">
+                    年龄:
+                </div>
+                <div class="col">
+                    身高:{{user.user.height}}cm
+                </div>
+            </div>
+            <div class="row" style="padding: 20px 0">
+                <div class="col">
+                    情感:{{user.user.emotion}}
+                </div>
+                <div class="col">
+                    职业:{{user.user.work}}
+                </div>
+            </div>
+        </div>
+        <div class="user-dz"></div>
+        <div class="list list-user-set list-set-arrow" style="color: #818181;">
+            <a class="item" ui-sref="app.my_message">
+                <em class="fl">当前梦想</em>
+            </a>
+            <a class="item" ui-sref="app.my_profile">
+                <em class="fl">曾经的梦想</em>
+            </a>
+            <a class="item" ui-sref="app.my_dream">
+                <em class="fl">支持的梦想</em>
+            </a>
+        </div>
+    </ion-content>
+</ion-view>
+

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

xqd
@@ -3,8 +3,12 @@
        <div ng-if="100*dream.get_coin/dream.coin!==0" class="list" ng-repeat="dream in dreams">
            <div class="item reply-item" ng-click="toDetail(dream.id)">
                <div class="item" style="height:70px; border-bottom: 1px solid #EFEFEF">
-                   <img style="width: 45px; height: 45px;border-radius: 100%;" ng-src="{{user.avatar | avator }}" />
-                   <span style="top: 10px;">{{user.nickname}}</span>
+                   <div style="float:left;">
+                       <img style="width: 45px; height: 45px;border-radius: 100%;" ng-src="{{user.avatar | avator }}" />
+                   </div>
+                   <div style="float:left; margin: 15px 0 0 10px">
+                       {{user.nickname}}
+                   </div>
                </div>
                <div class="item item-thumbnail-left reply-content">
                    <div style="float:left;">

部分文件因文件數量過多而無法顯示