<ion-view view-title="">
    <ion-nav-buttons side="left">
        <div class="item search-input" style="border-radius: 15px; width: 200px">
            <i class="icon ion-search placeholder-icon" ng-click="searchContent()"></i>
            <input type="text" placeholder="搜索内容" ng-change="search(vm.keyword)" ng-model="vm.keyword">
        </div>
    </ion-nav-buttons>
    <ion-nav-buttons side="right">
        <button class="button button-calm button-right" style="margin-top: 1px; font-size: 16px" ng-click="$ionicGoBack()">取消</button>
    </ion-nav-buttons>
     <ion-content>
         <div class="list" style="margin-bottom: 50px" ng-if="!isResult">
             <div class="item" style="padding:10px;font-size:1rem; margin-top: 20px; color: #373737">热门搜索</div>
             <div class="item calm search-hot">
                 <div class="box {{keyword==key?'keyword':''}}" ng-click="search(key)" ng-repeat="(key, value) in hot_searches">
                     {{key}}
                 </div>
             </div>
             <div class="item" style="padding:10px;font-size:1rem; margin-top: 20px; color: #373737">历史搜索</div>
             <div class="list padding">
                <div class="item {{keyword==history_search.search?'search-select':''}}" style="border-top: 1px solid #EDEDED; border-bottom: 1px solid #EDEDED; color: #CECECE" ng-click="search(history_search.search)" ng-repeat="history_search in history_searches">
                     {{history_search.search}}
                 </div>
             </div>
         </div>
         <div ng-if="isResult&&index==0">
             <div class="list padding">
                 <div class="item dream_item" style="color: #A7A7A7">
                     用户
                 </div>
                 <div class="item sarch-item dream_item" ng-repeat="user_info in user_infos" ng-if="$index<3" ng-click="toUserDetail(user_info.id)">
                     <img ng-src="{{user_info.avatar}}" />  
                     <span style="padding:5px;">{{user_info.nickname}}</span>
                 </div>
                 <div class="item" style="text-align:center;color:#00C3DA;font-size:1rem;padding:10px;" ng-click="showMore(vm.keyword,1)" ng-if="user_infos.length>=3">查看更多</div>
             </div>
             <p ng-if="user_infos.length!=0" style="background: #FAFAFA; height: 1rem"></p>
             <div class="list padding">
                 <div class="item dream_item" style="color: #A7A7A7">
                     梦想
                 </div>
                 <div class="item item-thumbnail-left dream_item" ng-repeat="dream_info in dream_infos" ng-if="$index<3" ng-click="toDetail(dream_info.id)">
                     <img ng-src="{{dream_info.img.pic}}" />
                     <h2>{{dream_info.name}}</h2>
                     <p style="white-space:normal">{{dream_info.about}}</p>
                 </div>
                 <div class="item" style="text-align:center;color:#00C3DA;font-size:1rem;padding:10px;" ng-click="showMore(vm.keyword,2)" ng-if="dream_infos.length>=3">查看更多</div>
                 
                <!-- <div class="item item-divider">
                     标签
                 </div>
                 <div class="calm search-hot">
                     <div class="box {{index==1?'keyword':''}}" ng-click="selectHot(1)">
                         搞笑达人
                     </div>
                     <div class="box {{index==2?'keyword':''}}" ng-click="selectHot(2)">
                         搞笑达人
                     </div>
                     <div class="box {{index==3?'keyword':''}}" ng-click="selectHot(3)">
                         搞笑达人
                     </div>
                     <div class="box {{index==4?'keyword':''}}" ng-click="selectHot(4)">
                         搞笑达人
                     </div>
                     <div class="box {{index==5?'keyword':''}}" ng-click="selectHot(5)">
                         搞笑达人
                     </div>
                     <div class="box {{index==6?'keyword':''}}" ng-click="selectHot(6)">
                         搞笑达人
                     </div>
                 </div>-->
             </div>
         </div>
         <div ng-if="index>0">
             <div class="tabs-striped tabs-top">
                 <div class="tabs" style="top:0">
                     <a ng-class="index==1?'tab-item active':'tab-item'" ng-click="showMore(vm.keyword,1)">
                         用户
                     </a>
                     <a ng-class="index==2?'tab-item active':'tab-item'" ng-click="showMore(vm.keyword,2)">
                        梦想
                     </a>
                 </div>
             </div>
             <div ng-if="index==1" class="list more-userlist">
                 <div class="item sarch-item" ng-repeat="user_info in user_infos" ng-click="toUserDetail(user_info.id)">
                     <img ng-src="{{user_info.avatar}}" />
                     <span style="padding:5px;">{{user_info.nickname}}</span>
                     <span style="color:#B6B6B6; font-size: 0.9em">
                         {{user_info.signture}}
                     </span>
                 </div>
             </div>
             <div ng-if="index==2" class="list more-userlist">
                 <div class="item" style="padding:0" ng-repeat="dream_info in dream_infos">
                     <div class="row">
                         <div class="col avatarCol">
                             <div class="fl" style="width: 27%; margin-right: 5px">
                                 <img ng-src="{{dream_info.user.avatar | avator}}" ng-click="toUserDetail(dream_info.user.id)" />
                             </div>
                             <div class="myblock">
                                 <div>{{dream_info.user.nickname}}<span>{{dream_info.user.birthday | getage}}岁</span></div>
                                 <div class="mysecond">{{dream_info.user.city}}</div>
                             </div>
                         </div>
                         <div class="col" style="text-align:right">
                             <div style="margin-top:4px">
                                 <img ng-src="img/icon_follow.svg" class="iheart" style=" width: 1rem; top: 2px; position: relative;">
                                 <span style="color: #F16571">{{dream_info.care_num}}</span>
                                 <span>人关注</span>
                             </div>
                             <div class="mysecond">剩余{{dream_info.end_time | lastDate}}天</div>
                         </div>
                     </div>
                     <div ng-click="toDetail(dream_info.id)">
                         <img ng-src="{{dream_info.img.pic}}" />
                         <div class="homeDream">
                             <p style="font-size: 16px">{{ dream_info.name }}</p>
                             <p>{{ dream_info.about }}</p>
                         </div>
                     </div>
                 </div> 
                
             </div>
         </div>
    </ion-content>
</ion-view>
