wxcontact.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template name="wxContact">
  2. <view>
  3. <!-- #ifdef MP-WEIXIN -->
  4. <!-- <button class="cu-btn cuIcon bg-red lg shadow echo-wxcontact" @tap="showConcatModel">
  5. <text class="cuIcon-servicefill"></text>
  6. </button> -->
  7. <image class="echo-wxcontact" @tap="showConcatModel" style="width: 108rpx;height: 108rpx;"
  8. :src="$getImageUrl('static/images/applet/index/service.png')"></image>
  9. <view class="cu-modal" :class="{show:concatModel}" @tap="hideConcatModel">
  10. <view class="cu-dialog" @tap.stop>
  11. <view class="cu-card">
  12. <view class="cu-item">
  13. <view class="text-xl padding">人工协助</view>
  14. <image :show-menu-by-longpress="true" style="width: 80%;display: block;margin: 0 auto;"
  15. :src="$getImageUrl('static/images/applet/qrcode_contact.png')"></image>
  16. <view class="text-xl padding">长按图片添加好友</view>
  17. </view>
  18. </view>
  19. <view class="padding flex flex-direction">
  20. <button class="cu-btn bg-red lg" @tap="phone()">
  21. 拔打客服电话
  22. </button>
  23. </view>
  24. <view class="padding flex flex-direction">
  25. <button class="cu-btn bg-red lg" open-type="contact">
  26. 在线客服
  27. </button>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. <!-- #endif -->
  33. </template>
  34. <script>
  35. export default {
  36. name: 'wxContact',
  37. data() {
  38. return {
  39. concatModel: false
  40. };
  41. },
  42. methods: {
  43. showConcatModel() {
  44. this.concatModel = true;
  45. },
  46. hideConcatModel() {
  47. this.concatModel = false;
  48. },
  49. phone() {
  50. uni.makePhoneCall({
  51. phoneNumber: '19959780161'
  52. });
  53. }
  54. }
  55. }
  56. </script>
  57. <style>
  58. /* .echo-wxcontact{ position: fixed; left: 0rpx; top: 550rpx; border-radius: 0rpx 50% 50% 0rpx !important; } */
  59. .echo-wxcontact {
  60. position: fixed;
  61. left: 0rpx;
  62. top: 550rpx;
  63. }
  64. </style>