error.js 608 B

12345678910111213141516171819202122232425262728293031
  1. import ad from '../index/ad'
  2. ad({
  3. data: {
  4. icon: {
  5. type: 'warn',
  6. color: '#ef473a',
  7. },
  8. buttons: [{
  9. type: 'balanced',
  10. block: true,
  11. text: '确定',
  12. },
  13. {
  14. type: 'light',
  15. block: true,
  16. text: '返回',
  17. }],
  18. },
  19. onClick(e) {
  20. console.log(e)
  21. const { index } = e.detail
  22. index === 0 && wx.showModal({
  23. title: 'Thank you for your support!',
  24. showCancel: !1,
  25. })
  26. index === 1 && wx.navigateBack()
  27. },
  28. })