123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- <template>
- <view class="gf-tel">
- <u-popup v-model="showchatlist" mode="center" border-radius="20" :closeable="true">
- <view class="chat-list">
- <view class="worker-hrader">
- <text>隐私电话</text>
- </view>
- <scroll-view scroll-y="true" style="height: 60vh;" v-if="worker_list.length > 0">
- <view class="worker-item u-flex" v-for="(item,index) in worker_list" :key="index" @click="totel(item)">
- <image :src="item.headimg" class="img1" mode=""></image>
- <text class="text1 u-flex-1">{{item.name}}</text>
- <u-icon name="phone-fill" color="#1677FF" size="40"></u-icon>
- </view>
- </scroll-view>
- <view v-else style="height: 60vh;">
- <u-empty text="暂无数据" mode="list"></u-empty>
- </view>
- </view>
- </u-popup>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- id: '',
- showchatlist: false,
- worker_list: []
- }
- },
- created() {
- },
- methods: {
- totel(item) {
- uni.showLoading({
- mask: true,
- title: "请稍后"
- })
- this.$u.post('/api/Member/bind_worker', {
- worker_id: item.id
- }).then(res => {
- if (res.code == 1) {
- this.showchatlist = false
- this.$emit('over')
- this.$u.post('/api/Member/member_info').then(res => {
- uni.makePhoneCall({
- phoneNumber: res.data.worker_phone
- })
- })
- } else {
- this.$u.toast(res.msg)
- }
- })
- },
- getdata(type) {
- if (type == 2) {
- // 福利
- this.$u.post('/api/welfare/welfare_detail', {
- id: this.id
- }).then(res => {
- this.worker_list = res.data.worker_info
- this.showchatlist = true
- })
- } else {
- // 楼盘
- this.$u.post('/api/Property/property_detail', {
- id: this.id
- }).then(res => {
- this.worker_list = res.data.worker_info
- this.showchatlist = true
- })
- }
- },
- open(id, type) {
- this.id = id
- uni.showLoading({
- mask: true,
- title: "请稍后"
- })
- this.getdata(type)
- }
- }
- }
- </script>
- <style lang="scss">
- .gf-tel {
- .chat-list {
- width: 650rpx;
- background: #FFFFFF;
- padding: 1rpx 0;
- .worker-hrader {
- line-height: 88rpx;
- border-bottom: 2rpx solid #E5E5E5;
- padding: 0 24rpx;
- font-size: 28rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #333333;
- }
- .worker-item {
- margin: 24rpx auto;
- width: 602rpx;
- height: 140rpx;
- background: #F2F2F2;
- border-radius: 20rpx;
- padding: 0 20rpx;
- .img1 {
- width: 100rpx;
- height: 100rpx;
- border-radius: 100rpx;
- }
- .text1 {
- font-size: 28rpx;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #333333;
- margin: 0 20rpx;
- }
- }
- }
- }
- </style>
|