index.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <template>
  2. <view class="service">
  3. <image class="icon" src="../../static/service.png" mode=""></image>
  4. <view class="notice">
  5. 接入移动客户坐席
  6. </view>
  7. <button class="btn" type="default" @click="handleCall">呼叫客服</button>
  8. </view>
  9. </template>
  10. <script>
  11. export default {
  12. methods: {
  13. handleCall() {
  14. wx.openCustomerServiceChat({
  15. extInfo: {url: 'https://work.weixin.qq.com/kfid/kfc74a883d1951d0083'},
  16. corpId: 'wwdb2609656282875f',
  17. success(res) {
  18. console.log(res);
  19. },
  20. complete(r){
  21. console.log(r);
  22. }
  23. })
  24. // uni.makePhoneCall({
  25. // phoneNumber: '10086' //仅为示例
  26. // });
  27. }
  28. },
  29. onShow() {
  30. },
  31. onLoad() {
  32. }
  33. }
  34. </script>
  35. <style lang="scss" scoped>
  36. .service {
  37. display: flex;
  38. flex-direction: column;
  39. align-items: center;
  40. .icon {
  41. width: 460rpx;
  42. height: 410rpx;
  43. margin-top: 290rpx;
  44. }
  45. .notice {
  46. font-size: 32rpx;
  47. color: #0F0F0F;
  48. font-weight: 400;
  49. margin-top: 50rpx;
  50. }
  51. .btn{
  52. margin-top: 110rpx;
  53. width: 560rpx;
  54. height: 96rpx;
  55. line-height: 96rpx;
  56. border-radius: 48rpx;
  57. color: #fff;
  58. font-size: 32rpx;
  59. font-weight: bold;
  60. background: $uni-color-primary;
  61. }
  62. }
  63. </style>