kfService.vue 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <template>
  2. <view>
  3. <uni-popup ref="servicePop" type="bottom" border-radius="10px 10px 0 0" background-color="#ffffff" :mask-click="false">
  4. <view class="service-popup">
  5. <view class="login-title">
  6. <view class="login-logo">
  7. <view class="logo"><image src="/static/logo.jpg" mode="widthFix"></image></view>
  8. <view class="name">奥莱优品</view>
  9. </view>
  10. <view class="login-close" @click="showService(2)"><text class="cuIcon-close"></text></view>
  11. </view>
  12. <view class="login-desc">售前、售后问题,随时为您解答</view>
  13. <view class="top">
  14. <view class="item">客服时间:{{storeData.start_at}}-{{storeData.end_at}}</view>
  15. <view class="item">
  16. <button class="btn" @click="$dialog.jumpUri('/pages/service/chat?poi='+storeData.poi_id+'&source=home',1);showService(2)">在线咨询商家</button>
  17. </view>
  18. <view class="item" v-if="storeData.service_mobile" @click="callMobile(storeData.service_mobile)">商家客服电话</view>
  19. </view>
  20. <view class="foot" @click="showService(2)">取消</view>
  21. </view>
  22. </uni-popup>
  23. </view>
  24. </template>
  25. <script>
  26. export default {
  27. name:"kfService",
  28. data() {
  29. return {
  30. storeData:null
  31. };
  32. },
  33. methods: {
  34. showService(type){
  35. if (type == 1) {
  36. this.$refs.servicePop.open()
  37. } else {
  38. uni.showTabBar();
  39. this.$refs.servicePop.close()
  40. }
  41. },
  42. open(data) {
  43. uni.hideTabBar();
  44. this.storeData = data;
  45. this.$nextTick(()=>{
  46. this.$refs.servicePop.open()
  47. })
  48. },
  49. callMobile(mobile){
  50. uni.makePhoneCall({
  51. phoneNumber:mobile,
  52. success() {
  53. },
  54. fail() {
  55. }
  56. })
  57. // uni.setClipboardData({
  58. // data:mobile,
  59. // showToast: false,
  60. // success() {
  61. // uni.hideToast();
  62. // uni.showToast({
  63. // title: '复制号码成功',
  64. // icon: 'none'
  65. // });
  66. // },
  67. // fail() {
  68. // uni.showToast({
  69. // title: '复制失败',
  70. // icon: 'error'
  71. // });
  72. // }
  73. // })
  74. this.$nextTick(()=>{
  75. uni.showTabBar();
  76. this.$refs.servicePop.close()
  77. })
  78. }
  79. }
  80. }
  81. </script>
  82. <style>
  83. .service-popup .item{height: 100upx;line-height: 100upx;text-align: center;font-size: 28upx;color: #333;border-bottom: 2upx solid #f8f8f8;}
  84. .service-popup .item:last-child{border-bottom: 0;}
  85. .service-popup .item .btn{background-color: #fff;border: 0;height: 100upx;line-height: 100upx;text-align: center;font-size: 28upx;color: #333;}
  86. .service-popup .item .btn::after{border: 0;}
  87. .service-popup .foot{height: 100upx;line-height: 100upx;text-align: center;font-size: 28upx;color: #333;border-top: 20upx solid #f8f8f8;}
  88. .login-title{display: flex;align-items: center;justify-content: space-between;padding: 20rpx;}
  89. .service-popup .login-title .login-logo{display: flex;align-items: center;gap: 15rpx;}
  90. .service-popup .login-title .login-logo image{width: 50rpx;height: 50rpx;border-radius: 100%;}
  91. .service-popup .login-title .name{font-weight: bold;font-family: "bluevBold";color: #000;font-size: 28rpx;}
  92. .login-desc{line-height: 2;color: #666;font-size: 24rpx;margin: 20rpx 0;text-align: center;}
  93. </style>