瑶都万能墙
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
704 B

7 months ago
  1. <template>
  2. <view class="phone" v-if="phone" @click.stop="callPhone">
  3. <image src="/static/image/home/phone.png" mode="widthFix"></image>
  4. 联系{{ title || ta[sexName] }}
  5. </view>
  6. </template>
  7. <script>
  8. import mixinsSex from '@/mixins/sex.js'
  9. export default {
  10. mixins: [mixinsSex],
  11. props: ['phone', 'title', 'sexName'],
  12. data() {
  13. return {
  14. }
  15. },
  16. methods: {
  17. callPhone(){
  18. uni.makePhoneCall({
  19. phoneNumber: this.phone
  20. })
  21. },
  22. }
  23. }
  24. </script>
  25. <style scoped lang="scss">
  26. .phone {
  27. background-color: rgba($uni-color, 0.2);
  28. color: $uni-color;
  29. padding: 8rpx 16rpx;
  30. border-radius: 10rpx;
  31. margin-left: auto;
  32. image {
  33. width: 20rpx;
  34. height: 20rpx;
  35. }
  36. }
  37. </style>