风险测评小程序前端代码仓库
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.

124 lines
2.4 KiB

  1. <template>
  2. <uv-popup
  3. ref="popup"
  4. :overlayOpacity="0"
  5. mode="center"
  6. bgColor="none"
  7. >
  8. <view class="popup__view">
  9. <image class="bg" src="@/pages_order/static/service/bg-popup-phone.png" mode="widthFix"></image>
  10. <view class="flex flex-column content">
  11. <text class="title">电话咨询</text>
  12. <view class="flex phone">
  13. <!-- todo: check key -->
  14. <view class="flex icon" @click="onCall(13256541235)">
  15. <image class="img" src="@/pages_order/static/service/icon-phone.png" mode="widthFix"></image>
  16. </view>
  17. <!-- todo: check key -->
  18. <view>13256541235</view>
  19. </view>
  20. <button class="btn" @click="onCopy">复制手机号</button>
  21. </view>
  22. </view>
  23. </uv-popup>
  24. </template>
  25. <script>
  26. import { mapState } from 'vuex'
  27. import utils from '@/utils/utils.js'
  28. export default {
  29. props: {
  30. src: {
  31. type: String,
  32. default: null
  33. }
  34. },
  35. data() {
  36. return {
  37. }
  38. },
  39. computed : {
  40. ...mapState(['configList'])
  41. },
  42. methods: {
  43. open() {
  44. this.$refs.popup.open();
  45. },
  46. close() {
  47. this.$refs.popup.close();
  48. },
  49. onCall(phoneNumber) {
  50. uni.makePhoneCall({
  51. phoneNumber,
  52. success() {
  53. console.log('安卓拨打成功');
  54. },
  55. fail() {
  56. console.log('安卓拨打失败');
  57. }
  58. })
  59. },
  60. onCopy(phone) {
  61. utils.copyText(phone)
  62. },
  63. },
  64. }
  65. </script>
  66. <style scoped lang="scss">
  67. .popup__view {
  68. position: relative;
  69. width: 684rpx;
  70. min-height: 701rpx;
  71. background: #FFFFFF;
  72. border-radius: 16rpx;
  73. }
  74. .bg {
  75. width: 100%;
  76. height: auto;
  77. }
  78. .content {
  79. position: absolute;
  80. top: 0;
  81. left: 0;
  82. width: 100%;
  83. height: 100%;
  84. padding: 69rpx 0;
  85. box-sizing: border-box;
  86. justify-content: space-between;
  87. }
  88. .title {
  89. font-size: 32rpx;
  90. font-weight: 600;
  91. color: #000000;
  92. }
  93. .phone {
  94. margin: 238rpx 0 122rpx 0;
  95. column-gap: 21rpx;
  96. font-size: 32rpx;
  97. font-weight: 600;
  98. color: #000000;
  99. .icon {
  100. width: 60rpx;
  101. height: 60rpx;
  102. .img {
  103. width: 100%;
  104. height: 100%;
  105. }
  106. }
  107. }
  108. .btn {
  109. padding: 29rpx 202rpx;
  110. font-size: 30rpx;
  111. color: #FFFFFF;
  112. background: #014FA2;
  113. border-radius: 50rpx;
  114. }
  115. </style>