{{ $t('Temporarily_no_data') }}
@@ -48,15 +58,29 @@ export default {
finished: false,
refreshing: false,
emptyData: true,
- noMoreData: false
+ noMoreData: false,
+ keyword: '' //搜索关键词
}
},
watch: {},
methods: {
+ //触发搜索
+ onSearch() {
+ this.page = 1
+ this.finished = false
+ this.loading = true
+ this.getList()
+ },
+ //取消搜索清空
+ onCancelSearch() {
+ this.keyword = ''
+ this.onSearch()
+ },
getList() {
const vm = this
$toastLoading(vm.$i18n.t('loading_text'))
- service.get(`s/h5/friend/user/list?page=${vm.page}`).then(data => {
+ //拼接keyword参数,空字符串后端自动忽略
+ service.get(`s/h5/friend/user/list?page=${vm.page}&keyword=${encodeURIComponent(vm.keyword)}`).then(data => {
const dataV = vm.page === 1 ? [] : vm.list
dataV.push(...data.data)
vm.list = dataV
@@ -85,6 +109,7 @@ export default {
})
.catch(error => {
console.log(error)
+ $toastClear()
})
},
onRefresh() {
@@ -113,6 +138,17 @@ export default {
width: 100vw;
min-height: 100vh;
background: #ffffff;
+
+ .search-wrap {
+ //height: 120px;
+ padding: 12px 12px 0 12px;
+ }
+ .search-wrap .van-search{
+ padding: 0;
+ border-radius: 8px;
+ overflow: hidden;
+ }
+
.emptyDataIcon {
width: 135px;
height: 100px;
diff --git a/src/views/makingFriendsModule/userDetail.vue b/src/views/makingFriendsModule/userDetail.vue
index fcfe81e..ec63136 100644
--- a/src/views/makingFriendsModule/userDetail.vue
+++ b/src/views/makingFriendsModule/userDetail.vue
@@ -202,7 +202,8 @@ export default {
const vm = this
const url = 's/h5/BusinessUser'
service.get(url).then(data => {
- vm.isCompletedProfile = data.isCompletedProfile
+ // vm.isCompletedProfile = data.isCompletedProfile。暂时不判断用户的资料完善度
+ vm.isCompletedProfile = true
vm.authorization_status = data.authorization_status
vm.qr_code = data.share_qrcode
}).catch(error => {