wxcontact.vue 1.5 KB

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