index.js 477 B

12345678910111213141516171819202122
  1. Page({
  2. data: {
  3. loading: false,
  4. tabActive: "Standard"
  5. },
  6. onLoad(options) {
  7. if (options.type) this.setData({
  8. tabActive: options.type
  9. })
  10. this.getList()
  11. },
  12. tabChange(e) {
  13. this.setData({
  14. tabActive: e.detail.name
  15. });
  16. this.getList();
  17. },
  18. getList() {
  19. let page = this.selectComponent("#" + this.data.tabActive);
  20. page.data.isGet || page.getList();
  21. }
  22. })