酒店桌布为微信小程序
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.

121 lines
2.1 KiB

11 months ago
10 months ago
11 months ago
10 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
10 months ago
11 months ago
11 months ago
10 months ago
11 months ago
11 months ago
11 months ago
11 months ago
10 months ago
11 months ago
11 months ago
10 months ago
11 months ago
11 months ago
11 months ago
11 months ago
10 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
  1. <template>
  2. <!-- 联系客服弹框 -->
  3. <uv-popup ref="popup"
  4. :safeAreaInsetBottom="false"
  5. :round="30">
  6. <view class="warp">
  7. <view class="rect" @tap.stop>
  8. <view class="title">联系{{ bTitle || title }}</view>
  9. <view class="center">确定拨打{{ bTitle || title }}电话?</view>
  10. <view class="bottom">
  11. <view class="btn1"
  12. @click="close">
  13. 取消
  14. </view>
  15. <view class="btn2"
  16. @click="confirm">
  17. 确定
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </uv-popup>
  23. </template>
  24. <script>
  25. export default {
  26. data() {
  27. return {
  28. phone:'',
  29. title : '客服',
  30. bPhone : '',
  31. bTitle : '',
  32. }
  33. },
  34. mounted() {
  35. this.getCustomPhone()
  36. },
  37. methods: {
  38. getCustomPhone(){
  39. this.$api('customUser', {}, res => {
  40. this.phone = res.result.phone
  41. })
  42. },
  43. open(phone, title) {
  44. this.bPhone = phone || this.phone
  45. this.bTitle = title || this.title
  46. this.$refs.popup.open()
  47. },
  48. close() {
  49. this.$refs.popup.close()
  50. },
  51. // 拨打电话
  52. confirm() {
  53. this.show = false
  54. uni.makePhoneCall({
  55. phoneNumber: this.bPhone || this.phone,
  56. success() {
  57. console.log('安卓拨打成功');
  58. },
  59. fail() {
  60. console.log('安卓拨打失败');
  61. }
  62. })
  63. },
  64. }
  65. }
  66. </script>
  67. <style scoped lang="scss">
  68. .warp {
  69. display: flex;
  70. align-items: center;
  71. justify-content: center;
  72. height: 100%;
  73. }
  74. .rect {
  75. width: 600rpx;
  76. height: 300rpx;
  77. background-color: #fff;
  78. border-radius: 20rpx;
  79. overflow: hidden;
  80. .title {
  81. padding: 10rpx 0 0 15rpx;
  82. background-color: $uni-color;
  83. color: #FFF;
  84. text-align: left;
  85. width: 100%;
  86. height: 18%;
  87. font-size: 36rpx;
  88. }
  89. .center {
  90. height: 40%;
  91. display: flex;
  92. justify-content: center;
  93. align-items: center;
  94. font-size: 36rpx;
  95. }
  96. .bottom {
  97. display: flex;
  98. justify-content: center;
  99. gap: 50rpx;
  100. view{
  101. height: 60rpx;
  102. line-height: 60rpx;
  103. padding: 0 50rpx;
  104. border-radius: 30rpx;
  105. }
  106. .btn1{
  107. background-color: #fff;
  108. }
  109. .btn2{
  110. background-color: $uni-color;
  111. color: #fff;
  112. }
  113. }
  114. }
  115. </style>