customerService.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <view style="touch-action: none;" v-if="is_open_service != '0' || merId != '0'">
  3. <view class="customerService" @touchmove.stop.prevent="setTouchMove" :style="{top:topConfig}">
  4. <navigator class="pictrue" :url="'/pages/chat/customer_list/chat?mer_id='+merId" hover-class="none">
  5. <image :src="logoConfig"></image>
  6. </navigator>
  7. </view>
  8. </view>
  9. </template>
  10. <script>
  11. // +----------------------------------------------------------------------
  12. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  13. // +----------------------------------------------------------------------
  14. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  15. // +----------------------------------------------------------------------
  16. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  17. // +----------------------------------------------------------------------
  18. // | Author: CRMEB Team <admin@crmeb.com>
  19. // +----------------------------------------------------------------------
  20. import { configMap } from '@/utils/index';
  21. export default {
  22. name: 'customerService',
  23. props: {
  24. dataConfig: {
  25. type: Object,
  26. default: () => {}
  27. },
  28. merId: {
  29. type: [String, Number],
  30. default: '0'
  31. }
  32. },
  33. computed: configMap({ is_open_service:0 }),
  34. data() {
  35. return {
  36. logoConfig: this.dataConfig.logoConfig.url,
  37. topConfig: (this.dataConfig.topConfig.val || 75)+'%'
  38. };
  39. },
  40. created() {},
  41. methods: {
  42. setTouchMove(e) {
  43. var that = this;
  44. if (e.touches[0].clientY < 545 && e.touches[0].clientY > 66) {
  45. that.topConfig = e.touches[0].clientY+'px'
  46. }
  47. },
  48. }
  49. }
  50. </script>
  51. <style lang="scss" scoped>
  52. .customerService {
  53. position: fixed;
  54. right: 20rpx;
  55. z-index: 999;
  56. /* #ifdef MP || APP-PLUS */
  57. top: 160rpx;
  58. right: 0;
  59. /* #endif */
  60. .pictrue {
  61. width: 86rpx;
  62. height: 86rpx;
  63. border-radius: 50%;
  64. image {
  65. width: 100%;
  66. height: 100%;
  67. }
  68. }
  69. }
  70. </style>