index.js 558 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. Component({
  2. externalClasses: ['wr-class'],
  3. properties: {
  4. phoneNumber: String,
  5. desc: String,
  6. },
  7. data: {
  8. show: false,
  9. },
  10. methods: {
  11. onBtnTap() {
  12. this.setData({
  13. show: true,
  14. });
  15. },
  16. onDialogClose() {
  17. this.setData({
  18. show: false,
  19. });
  20. },
  21. onCall() {
  22. const { phoneNumber } = this.properties;
  23. wx.makePhoneCall({
  24. phoneNumber,
  25. });
  26. },
  27. onCallOnlineService() {
  28. wx.showToast({
  29. title: '你点击了在线客服',
  30. });
  31. },
  32. },
  33. });