index.js 546 B

123456789101112131415161718192021222324
  1. import ErrorView from '../../components/error-view';
  2. Page({
  3. ...ErrorView,
  4. data: {
  5. errorData: {
  6. type: 'empty',
  7. title: '什么都没有了',
  8. button: '返回',
  9. onButtonTap: 'handleBack',
  10. href: '/pages/list/index'
  11. },
  12. },
  13. handleBack() {
  14. my.showToast({
  15. content: 'back to pages/index in 1s',
  16. success: (res) => {
  17. setTimeout(() => {
  18. my.navigateBack();
  19. }, 1000);
  20. },
  21. });
  22. }
  23. })