|
@@ -35,10 +35,13 @@
|
|
<view class="picker-main-item" v-for="(item, index) in listData" :key="item.id" @click="chooseItem(item)">
|
|
<view class="picker-main-item" v-for="(item, index) in listData" :key="item.id" @click="chooseItem(item)">
|
|
<view class="item-name">{{item.customerName}}</view>
|
|
<view class="item-name">{{item.customerName}}</view>
|
|
</view>
|
|
</view>
|
|
- <view v-if="listData&&listData.length>=20" style="color:#999;font-size: 26upx;text-align: center;padding: 10upx;">最多显示前20条匹配客户,请尝试输入更多内容</view>
|
|
|
|
- <view v-if="listData && listData.length == 0">
|
|
|
|
|
|
+ <view v-if="listData&&listData.length>=20 && !loading" style="color:#999;font-size: 26upx;text-align: center;padding: 10upx;">最多显示前20条匹配客户,请尝试输入更多内容</view>
|
|
|
|
+ <view v-if="listData && listData.length == 0 && !loading">
|
|
<u-empty text="暂无匹配客户" mode="list" :img-width="200" :margin-top="60"></u-empty>
|
|
<u-empty text="暂无匹配客户" mode="list" :img-width="200" :margin-top="60"></u-empty>
|
|
</view>
|
|
</view>
|
|
|
|
+ <view v-if="loading">
|
|
|
|
+ <u-loadmore :load-text="$config('loadText')" status="loading" />
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</scroll-view>
|
|
</view>
|
|
</view>
|
|
@@ -49,6 +52,7 @@
|
|
export default{
|
|
export default{
|
|
data(){
|
|
data(){
|
|
return{
|
|
return{
|
|
|
|
+ loading: false,
|
|
listData:[],
|
|
listData:[],
|
|
queryWord:'',
|
|
queryWord:'',
|
|
pageSize:20,
|
|
pageSize:20,
|
|
@@ -96,14 +100,16 @@
|
|
},
|
|
},
|
|
getData(){
|
|
getData(){
|
|
console.log('调用')
|
|
console.log('调用')
|
|
- uni.showLoading({title:'加载中...',mask:true})
|
|
|
|
|
|
+ // uni.showLoading({title:'加载中...',mask:true})
|
|
|
|
+ this.loading = true
|
|
customerList({queryWord:this.queryWord,pageNo:this.pageNo,pageSize:this.pageSize}).then(res => {
|
|
customerList({queryWord:this.queryWord,pageNo:this.pageNo,pageSize:this.pageSize}).then(res => {
|
|
if(res.status == 200 && res.data){
|
|
if(res.status == 200 && res.data){
|
|
- uni.hideLoading({})
|
|
|
|
this.listData = res.data.list
|
|
this.listData = res.data.list
|
|
}else{
|
|
}else{
|
|
this.listData = []
|
|
this.listData = []
|
|
}
|
|
}
|
|
|
|
+ // uni.hideLoading()
|
|
|
|
+ this.loading = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 搜索品牌
|
|
// 搜索品牌
|