特易招,招聘小程序
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.

115 lines
2.0 KiB

4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 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. },
  36. methods: {
  37. open(phone, title) {
  38. this.bPhone = phone || this.phone || this.configList.config_service_phone
  39. this.bTitle = title || this.title
  40. this.$refs.popup.open()
  41. },
  42. close() {
  43. this.$refs.popup.close()
  44. },
  45. // 拨打电话
  46. confirm() {
  47. this.$refs.popup.close()
  48. uni.makePhoneCall({
  49. phoneNumber: this.bPhone || this.phone,
  50. success() {
  51. console.log('安卓拨打成功');
  52. },
  53. fail() {
  54. console.log('安卓拨打失败');
  55. }
  56. })
  57. },
  58. }
  59. }
  60. </script>
  61. <style scoped lang="scss">
  62. .warp {
  63. display: flex;
  64. align-items: center;
  65. justify-content: center;
  66. height: 100%;
  67. }
  68. .rect {
  69. width: 600rpx;
  70. height: 300rpx;
  71. background-color: #fff;
  72. border-radius: 20rpx;
  73. overflow: hidden;
  74. .title {
  75. padding: 10rpx 0 0 15rpx;
  76. background-color: $uni-color;
  77. color: #FFF;
  78. text-align: left;
  79. width: 100%;
  80. height: 18%;
  81. font-size: 36rpx;
  82. }
  83. .center {
  84. height: 40%;
  85. display: flex;
  86. justify-content: center;
  87. align-items: center;
  88. font-size: 36rpx;
  89. }
  90. .bottom {
  91. display: flex;
  92. justify-content: center;
  93. gap: 50rpx;
  94. view{
  95. height: 60rpx;
  96. line-height: 60rpx;
  97. padding: 0 50rpx;
  98. border-radius: 30rpx;
  99. }
  100. .btn1{
  101. background-color: #fff;
  102. }
  103. .btn2{
  104. background-color: $uni-color;
  105. color: #fff;
  106. }
  107. }
  108. }
  109. </style>