鸿宇研学生前端代码
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.

113 lines
2.2 KiB

  1. <template>
  2. <view>
  3. <uv-popup ref="popup" mode="bottom" bgColor="none" >
  4. <view class="popup__view">
  5. <view class="flex header">
  6. <view class="title">导师电话</view>
  7. <button class="btn" @click="close">关闭</button>
  8. </view>
  9. <view class="flex content">
  10. <view>{{ phone }}</view>
  11. <button plain class="flex btn" @click="onCall">
  12. <image class="btn-icon" src="@/pages_order/static/order/icon-phone.png" mode="widthFix"></image>
  13. </button>
  14. </view>
  15. </view>
  16. </uv-popup>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. data() {
  22. return {
  23. phone: null,
  24. }
  25. },
  26. methods: {
  27. open(phone) {
  28. this.phone = phone
  29. this.$refs.popup.open()
  30. },
  31. close() {
  32. this.$refs.popup.close()
  33. },
  34. onCall() {
  35. uni.makePhoneCall({
  36. phoneNumber: this.phone,
  37. success() {
  38. console.log('安卓拨打成功');
  39. },
  40. fail() {
  41. console.log('安卓拨打失败');
  42. }
  43. })
  44. },
  45. },
  46. }
  47. </script>
  48. <style lang="scss" scoped>
  49. .popup__view {
  50. width: 100vw;
  51. display: flex;
  52. flex-direction: column;
  53. box-sizing: border-box;
  54. font-family: PingFang SC;
  55. font-weight: 400;
  56. line-height: 1.4;
  57. background: #FFFFFF;
  58. border-top-left-radius: 32rpx;
  59. border-top-right-radius: 32rpx;
  60. }
  61. .header {
  62. position: relative;
  63. width: 100%;
  64. padding: 24rpx 0;
  65. box-sizing: border-box;
  66. border-bottom: 2rpx solid #EEEEEE;
  67. .title {
  68. font-family: PingFang SC;
  69. font-weight: 500;
  70. font-size: 34rpx;
  71. line-height: 1.4;
  72. color: #181818;
  73. }
  74. .btn {
  75. font-family: PingFang SC;
  76. font-weight: 500;
  77. font-size: 32rpx;
  78. line-height: 1.4;
  79. color: #8B8B8B;
  80. position: absolute;
  81. top: 26rpx;
  82. left: 40rpx;
  83. }
  84. }
  85. .content {
  86. padding: 84rpx;
  87. column-gap: 12rpx;
  88. font-size: 36rpx;
  89. color: #181818;
  90. .btn {
  91. border: none;
  92. width: 72rpx;
  93. height: 72rpx;
  94. background: #F6F6F6;
  95. border-radius: 50%;
  96. overflow: hidden;
  97. &-icon {
  98. width: 40rpx;
  99. height: auto;
  100. }
  101. }
  102. }
  103. </style>