<ion-view view-title="">
    <ion-nav-buttons side="primary">
        <lable class="item item-input" style="width:315px">
            <i class="icon ion-search placeholder-icon" ng-click="searchContent()"></i>
            <input type="text" style="width: 100%" placeholder="搜索内容" ng-change="search(vm.keyword)" ng-model="vm.keyword">
        </lable>
        <button class="button button-calm" style="width: 30%; padding: 0;" ng-click="$ionicGoBack()">取消</button>
    </ion-nav-buttons>
     <ion-content>
         <div class="list" ng-if="!isResult">
             <div class="item" style="padding:10px;font-size:1.1rem">热门搜索</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:1.1rem;line-height:44px">历史搜索</div>
             <div class="list">

                <div class="item {{keyword==history_search.search?'search-select':''}}" 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">
                 <div class="item item-divider">
                     用户
                 </div>
                 <div class="item sarch-item" ng-repeat="user_info in user_infos" ng-if="$index<3" ng-click="toUser(user_info.id)">
                     <img ng-src="{{user_info.avatar}}" />  
                     <span style="padding:5px;">{{user_info.nickname}}</span>
                     <span class="level">Lv.3</span>
                 </div>
                 <div class="item" style="text-align:center;color:#FF4B82;font-size:1.1rem;padding:10px;" ng-click="showMore(vm.keyword,1)" ng-if="user_infos.length>=3">更多>></div>
                 <div class="item item-divider">
                     梦想
                 </div>
                 <div class="item item-thumbnail-left" 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:#FF4B82;font-size:1.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="toUser(user_info.id)">
                     <img ng-src="{{user_info.avatar}}" />
                     <span style="padding:5px;">{{user_info.nickname}}</span>
                     <span class="level">Lv.3</span>
                     <img ng-src="img/king.png" class="imgitem" />
                     <img ng-src="img/king.png" class="imgitem" />
                     <img ng-src="img/king.png" class="imgitem" />
                     <img ng-src="img/king.png" class="imgitem" />
                     <img ng-src="img/king.png" class="imgitem" />
                 </div>
             </div>
             <div ng-if="index==2" class="list more-userlist">
                 <div class="item" style="padding:0" ng-repeat="dream_info in dream_infos" ng-click="toDetail(dream_info.id)">
                     <img class="reply-head" ng-src="{{dream_info.user.avatar}}" style="margin:5px 15px" />
                     <span style="position:relative;top:-25px;font-size:1.1rem;">{{ dream_info.name }}</span>
                     <img style="display:block;width:100%" ng-src="{{dream_info.img.pic}}" />
                 </div> 
                
             </div>
         </div>
    </ion-content>
</ion-view>
