index.js 511 B

123456789101112131415161718192021222324252627282930
  1. Component({
  2. props: {
  3. contactMobile: ''
  4. },
  5. data: {
  6. phoneIcon: 'https://gw.alipayobjects.com/mdn/rms_0e8a29/afts/img/A*wbGKRoAg_EAAAAAAAAAAAAAAARQnAQ'
  7. },
  8. didMount() {},
  9. methods: {
  10. handlePhoneClick() {
  11. const {
  12. contactMobile = ''
  13. } = this.props;
  14. if (!contactMobile) {
  15. return my.showToast({
  16. type: 'none',
  17. content: '暂无联系方式'
  18. });
  19. }
  20. my.makePhoneCall({
  21. number: contactMobile
  22. });
  23. }
  24. }
  25. });