123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- <template>
- <view class="concat-item" @click="handleToUser">
- <view class="concat-item-body">
- <wk-avatar :name="concatData.realname" :avatar="concatData.img" class="avatar" />
- <view class="box">
- <view class="name">
- {{ concatData.realname }}
- </view>
- <view class="position">
- {{ concatData.post || '--' }}
- </view>
- </view>
- <button class="call" @click.stop="makePhoneCall(concatData.mobile)">
- <image
- :src="$static('images/icon/call_voice.png')"
- alt=""
- class="phone-icon" />
- </button>
- </view>
- </view>
- </template>
- <script>
- export default {
- name: 'ConcatItem',
- props: {
- concatData: {
- type: Object,
- default: () => {}
- }
- },
- methods: {
- makePhoneCall(mobile) {
- if (this.$isEmpty(mobile)) {
- this.$toast('暂无电话!')
- return
- }
- uni.makePhoneCall({
- phoneNumber: mobile
- })
- },
- handleToUser() {
- this.$Router.navigateTo({
- url: '/pages_personal/user',
- query: {
- id: this.concatData.userId
- }
- })
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .concat-item {
- background-color: white;
- padding: 0 50rpx;
- .concat-item-body {
- width: 100%;
- padding: 23rpx 0;
- border-bottom: 1rpx solid $border-color;
- @include left;
- .avatar {
- width: 70rpx;
- height: 70rpx;
- margin-right: 26rpx;
- }
- .box {
- flex: 1;
- .name {
- font-size: 32rpx;
- line-height: 42rpx;
- color: $dark;
- }
- .position {
- font-size: 26rpx;
- line-height: 32rpx;
- color: $light;
- margin-top: 12rpx;
- }
- }
- .call {
- padding: 10rpx 20rpx;
- @include center;
- .phone-icon {
- width: 46rpx;
- height: 46rpx;
- }
- }
- }
- }
- </style>
|