调整我的客户列表页面,增加拨打电话功能
This commit is contained in:
@@ -1,22 +1,30 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="header">
|
||||
客户列表
|
||||
<text>共{{count.one}}人</text>
|
||||
<view class="total">
|
||||
<uni-icons type="staff" size="50" color="white"></uni-icons>
|
||||
<view class="total-user">
|
||||
<view class="total-number">{{count.one}}人</view>
|
||||
<view class="total-title">客户总人数</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<block v-if="users.length > 0">
|
||||
<view class="team-item" v-for="(item, index) in users" :key="index">
|
||||
<u-avatar :src="item.avatar" size="40"></u-avatar>
|
||||
<view class="name">
|
||||
<view class="nowrap">{{item.nickname}}</view>
|
||||
<view>
|
||||
<view class="team-item" v-for="(item, index) in users" :key="index" @click="onCallPhone(item.real_username)">
|
||||
<u-avatar :src="item.avatar" size="48"></u-avatar>
|
||||
<view class="team-content">
|
||||
<view class="nowrap name">{{item.nickname}}</view>
|
||||
<view class="nowrap identitys">
|
||||
<text class="identity certification-y" v-if="item.certification"><image src="@/static/icons/user_nav_03.png"></image>已实名</text>
|
||||
<text class="identity identity-2" v-if="item.identity.order == 2">业务员</text>
|
||||
<text class="identity identity-1" v-if="item.identity.order == 1">普通用户</text>
|
||||
<text class="identity identity-3" v-if="item.identity.order == 3">顾问</text>
|
||||
</view>
|
||||
<view class="nowrap submit">联系电话:{{item.real_username}}</view>
|
||||
<view class="nowrap submit">注册时间:{{item.created_at}}</view>
|
||||
</view>
|
||||
<view class="mobile">
|
||||
<uni-icons class="mobile-icon" type="phone-filled" size="18" color="white"></uni-icons>
|
||||
</view>
|
||||
<view class="mobile">{{item.username}}</view>
|
||||
</view>
|
||||
<!-- 分页 -->
|
||||
<u-loadmore v-if="pagesShow" :status="status" />
|
||||
@@ -78,6 +86,11 @@
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
onCallPhone(phone){
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: phone
|
||||
})
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
@@ -96,85 +109,108 @@
|
||||
<style lang="scss">
|
||||
.content{
|
||||
box-sizing: border-box;
|
||||
background: white;
|
||||
}
|
||||
// 统计数据
|
||||
.header{
|
||||
.total{
|
||||
margin: 30rpx;
|
||||
background: linear-gradient(to top left, #446EFE, #0f36bb);
|
||||
box-shadow: 10rpx 0 15rpx 15rpx rgba(0, 0, 0, .03);
|
||||
border-radius: 20rpx;
|
||||
padding: 50rpx;
|
||||
color: white;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 0 30rpx;
|
||||
line-height: 100rpx;
|
||||
font-weight: bold;
|
||||
text{
|
||||
align-items: center;
|
||||
.total-title{
|
||||
font-size: 28rpx;
|
||||
color: gray;
|
||||
font-weight: normal;
|
||||
opacity: .8;
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
.total-number{
|
||||
text-align: right;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
// 团队列表
|
||||
.team-item{
|
||||
background: white;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 30rpx;
|
||||
border-radius: 20rpx;
|
||||
margin: 0 30rpx 30rpx 30rpx;
|
||||
.name{
|
||||
width: calc(100% - 200rpx - 40px);
|
||||
padding: 0 20rpx;
|
||||
box-shadow: 10rpx 0 15rpx 15rpx rgba(0, 0, 0, .03);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
&::after{
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
border-radius: 15rpx;
|
||||
background: linear-gradient(to top left, #446EFE, #0f36bb);
|
||||
position: absolute;
|
||||
left: -15rpx;
|
||||
top: 30rpx;
|
||||
content: " ";
|
||||
}
|
||||
.team-content{
|
||||
width: calc( 100% - 48px - 100rpx );
|
||||
padding-left: 30rpx;
|
||||
box-sizing: border-box;
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
.identity{
|
||||
display: inline-block;
|
||||
background: #F6F6F6;
|
||||
color: #999999;
|
||||
font-weight: normal;
|
||||
margin-left: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
height: 40rpx;
|
||||
line-height: 36rpx;
|
||||
padding: 0 15rpx;
|
||||
font-size: 24rpx;
|
||||
border:solid 1rpx #000;
|
||||
box-sizing: border-box;
|
||||
&:first-child{
|
||||
margin-left: 0;
|
||||
}
|
||||
&.identity-2{
|
||||
background: #ECF0FF;
|
||||
border-color: #443DE2;
|
||||
color: #443DE2;
|
||||
}
|
||||
&.identity-1{
|
||||
background: #F6F6F6;
|
||||
border-color: #999999;
|
||||
color: #999999;
|
||||
}
|
||||
&.identity-3{
|
||||
background: #FFF7EC;
|
||||
border-color: #FEAD45;
|
||||
color: #FEAD45;
|
||||
}
|
||||
&.certification-y{
|
||||
background: #FFF7EC;
|
||||
border-color: #FEAD45;
|
||||
color: #FEAD45;
|
||||
image{
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
vertical-align: middle;
|
||||
margin-bottom: 5rpx;
|
||||
.name{
|
||||
font-weight: bold;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
.submit{
|
||||
line-height: 40rpx;
|
||||
font-size: 26rpx;
|
||||
color: gray;
|
||||
}
|
||||
.identitys{
|
||||
margin-bottom: 10rpx;
|
||||
.identity{
|
||||
font-size: 24rpx;
|
||||
border-radius: 15rpx;
|
||||
line-height: 30rpx;
|
||||
padding: 0 10rpx;
|
||||
color: white;
|
||||
margin-right: 20rpx;
|
||||
&.identity-2{
|
||||
background: #443DE2;
|
||||
}
|
||||
&.identity-1{
|
||||
background: #e1e1e1;
|
||||
}
|
||||
&.identity-3{
|
||||
background: #FEAD45;
|
||||
}
|
||||
&.certification-y{
|
||||
background: #FFF7EC;
|
||||
border-color: #FEAD45;
|
||||
color: #FEAD45;
|
||||
image{
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
vertical-align: middle;
|
||||
margin-bottom: 5rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.mobile{
|
||||
width: 200rpx;
|
||||
color: #666666;
|
||||
text-align: right;
|
||||
font-size: 30rpx;
|
||||
width: 100rpx;
|
||||
border-radius: 35rpx;
|
||||
margin-top: 9px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
color: white;
|
||||
background: #446EFE;
|
||||
text-align: center;
|
||||
.mobile-icon{
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user