|
@@ -1,13 +1,13 @@
|
|
<template>
|
|
<template>
|
|
<view class="main">
|
|
<view class="main">
|
|
<view class="padding-lr-sm">
|
|
<view class="padding-lr-sm">
|
|
- <u-search placeholder="请输入搜索用户姓名" v-if="qiehuan == true" action-text="通话记录" @custom="tonghua" :action-style="{width:'110rpx'}"
|
|
|
|
- v-model="keyword"></u-search>
|
|
|
|
- <u-search placeholder="请输入搜索用户姓名" v-if="qiehuan == false" action-text="聊天列表" @custom="tonghua" :action-style="{width:'110rpx'}"
|
|
|
|
- v-model="keyword"></u-search>
|
|
|
|
|
|
+ <u-search placeholder="请输入搜索用户姓名" v-if="qiehuan" action-text="通话记录" @custom="tonghua" :action-style="{width:'110rpx'}"
|
|
|
|
+ v-model="keyword" @search="search"></u-search>
|
|
|
|
+ <u-search placeholder="请输入搜索用户姓名" v-else action-text="聊天列表" @custom="tonghua" :action-style="{width:'110rpx'}"
|
|
|
|
+ v-model="keyword" @search="search"></u-search>
|
|
</view>
|
|
</view>
|
|
<!-- 这是聊天列表 当值为true时显示-->
|
|
<!-- 这是聊天列表 当值为true时显示-->
|
|
- <view class="cu-list menu-avatar margin-top-xs" v-if="qiehuan == true">
|
|
|
|
|
|
+ <view class="cu-list menu-avatar margin-top-xs" v-if="qiehuan">
|
|
<view class="cu-item u-border-bottom" v-for="(item,index) in list" :key="index" @click="goliaotian(index)">
|
|
<view class="cu-item u-border-bottom" v-for="(item,index) in list" :key="index" @click="goliaotian(index)">
|
|
<view class="cu-avatar radius lg" :style="'background-image:url('+item.avatar+');'">
|
|
<view class="cu-avatar radius lg" :style="'background-image:url('+item.avatar+');'">
|
|
<view class="cu-tag badge">10</view>
|
|
<view class="cu-tag badge">10</view>
|
|
@@ -25,9 +25,10 @@
|
|
<view class="text-grey text-xs">22:20</view>
|
|
<view class="text-grey text-xs">22:20</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <u-empty text="暂无数据" :show="list.length==0?true:false" mode="order" margin-top="250"></u-empty>
|
|
</view>
|
|
</view>
|
|
<!-- 这是通话记录 当值为false1时显示 -->
|
|
<!-- 这是通话记录 当值为false1时显示 -->
|
|
- <view class="cu-list menu-avatar margin-top-xs" v-if="qiehuan == false" @click="call">
|
|
|
|
|
|
+ <view class="cu-list menu-avatar margin-top-xs" v-else @click="call">
|
|
<view class="cu-item u-border-bottom" v-for="(item,index) in listPhone" :key="index" @click="call">
|
|
<view class="cu-item u-border-bottom" v-for="(item,index) in listPhone" :key="index" @click="call">
|
|
<view class="cu-avatar radius lg" style="background-image:url(https://ossweb-img.qq.com/images/lol/img/champion/Taric.png);border-radius: 50%;">
|
|
<view class="cu-avatar radius lg" style="background-image:url(https://ossweb-img.qq.com/images/lol/img/champion/Taric.png);border-radius: 50%;">
|
|
<view class="cu-tag badge">10</view>
|
|
<view class="cu-tag badge">10</view>
|
|
@@ -39,7 +40,9 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <u-empty text="暂无数据" :show="listPhone.length==0?true:false" mode="order" margin-top="250"></u-empty>
|
|
</view>
|
|
</view>
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -98,14 +101,14 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ //搜索
|
|
|
|
+ search(e){
|
|
|
|
+ console.log(e)//输入框的值
|
|
|
|
+ },
|
|
|
|
|
|
tonghua() {
|
|
tonghua() {
|
|
console.log("点击了通话记录");
|
|
console.log("点击了通话记录");
|
|
- if (this.qiehuan) {
|
|
|
|
- this.qiehuan = false
|
|
|
|
- } else {
|
|
|
|
- this.qiehuan = true
|
|
|
|
- }
|
|
|
|
|
|
+ this.qiehuan = !this.qiehuan
|
|
},
|
|
},
|
|
goliaotian(e) {
|
|
goliaotian(e) {
|
|
let data = this.list[e];
|
|
let data = this.list[e];
|