uview新版本,search高度修复
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
<view class="pending">
|
<view class="pending">
|
||||||
<u-sticky>
|
<u-sticky>
|
||||||
<view class="header-search" @click="$Router.push({ name: 'SearchFriend' })">
|
<view class="header-search" @click="$Router.push({ name: 'SearchFriend' })">
|
||||||
<u-search placeholder="输入手机号码搜索" height="74" searchIcon="search" inputAlign="center" bgColor="white"
|
<u-search placeholder="输入手机号码搜索" searchIcon="search" inputAlign="center" bgColor="white"
|
||||||
:disabled="true" :show-action="false" />
|
:disabled="true" :show-action="false" />
|
||||||
</view>
|
</view>
|
||||||
</u-sticky>
|
</u-sticky>
|
||||||
|
|||||||
@@ -11,14 +11,16 @@
|
|||||||
<!-- 搜索 、 -->
|
<!-- 搜索 、 -->
|
||||||
<u-sticky>
|
<u-sticky>
|
||||||
<view class="header-search">
|
<view class="header-search">
|
||||||
<u-search placeholder="输入用户账号、手机号" height="74" searchIcon="search" @custom="search" v-model="searchValue" @search="search" bgColor="#f9f9f9" :focus="focused" />
|
<u-search placeholder="输入用户账号、手机号" searchIcon="search" @custom="search" v-model="searchValue"
|
||||||
|
@search="search" bgColor="#f9f9f9" :focus="focused" />
|
||||||
</view>
|
</view>
|
||||||
</u-sticky>
|
</u-sticky>
|
||||||
<block v-if="searchResult.length > 0">
|
<block v-if="searchResult.length > 0">
|
||||||
<applyFriend :lists="searchResult" :isApply="true" @action="action" />
|
<applyFriend :lists="searchResult" :isApply="true" @action="action" />
|
||||||
</block>
|
</block>
|
||||||
<view class="no-lists" v-else>
|
<view class="no-lists" v-else>
|
||||||
<u-image class="cover" radius="4" width="400rpx" height="400rpx" :src="require('@/static/imgs/no-search.png')" :lazy-load="true" />
|
<u-image class="cover" radius="4" width="400rpx" height="400rpx"
|
||||||
|
:src="require('@/static/imgs/no-search.png')" :lazy-load="true" />
|
||||||
<span>暂无匹配内容~</span>
|
<span>暂无匹配内容~</span>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -43,11 +45,11 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
search() {
|
search() {
|
||||||
// friendship: '' 没有好友关系
|
// friendship: '' 没有好友关系
|
||||||
// accepted 好友
|
// accepted 好友
|
||||||
// pending 申请中
|
// pending 申请中
|
||||||
// denied 拒绝
|
// denied 拒绝
|
||||||
// blocked 黑名单
|
// blocked 黑名单
|
||||||
searchFriend(this.searchValue)
|
searchFriend(this.searchValue)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
this.searchResult = res;
|
this.searchResult = res;
|
||||||
@@ -60,9 +62,9 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
action(e) {
|
action(e) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/im/friends/info?targetId=' + e.item.targetId
|
url: '/pages/im/friends/info?targetId=' + e.item.targetId
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,10 +5,10 @@
|
|||||||
<view v-for="(item, index) in groups" :key="index" class="friend-flex" @click="toGroup(item.targetId)">
|
<view v-for="(item, index) in groups" :key="index" class="friend-flex" @click="toGroup(item.targetId)">
|
||||||
<u-avatar size="36" shape="square" :src="item.portraitUrl !== ''?contact(item.targetId).portraitUrl :require('@/static/user/cover-s.png')" />
|
<u-avatar size="36" shape="square" :src="item.portraitUrl !== ''?contact(item.targetId).portraitUrl :require('@/static/user/cover-s.png')" />
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="name">{{item.name}} <span class="total">共{{item.people_count}} 成员</span></view>
|
<view class="name">{{ item.name }} <span class="total">共{{ item.members }} 成员</span></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="group-count"> {{groups.length}}个群聊 </view>
|
<view class="group-count"> {{ groups.length }}个群聊 </view>
|
||||||
</block>
|
</block>
|
||||||
<view class="no-lists" v-else>
|
<view class="no-lists" v-else>
|
||||||
<u-image class="cover" radius="4" width="400rpx" height="400rpx" :src="require('@/static/imgs/no-friend.png')" :lazy-load="true" />
|
<u-image class="cover" radius="4" width="400rpx" height="400rpx" :src="require('@/static/imgs/no-friend.png')" :lazy-load="true" />
|
||||||
|
|||||||
Reference in New Issue
Block a user