index.js 963 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. const _Http = getApp().globalData.http;
  2. Page({
  3. data: {
  4. loading: false,
  5. tabActive: "Standard"
  6. },
  7. onLoad(options) {
  8. if (options.type) this.setData({
  9. tabActive: options.type
  10. })
  11. this.getList()
  12. //获取企业免邮额度
  13. _Http.basic({
  14. "id": 20220920084001,
  15. "content": {},
  16. }).then(res => {
  17. console.log("查询企业档案", res)
  18. if (res.msg != '成功') return wx.showToast({
  19. title: res.msg,
  20. icon: "none"
  21. })
  22. this.setData({
  23. freefreightamount: res.data.freefreightamount
  24. })
  25. })
  26. },
  27. tabChange(e) {
  28. this.setData({
  29. tabActive: e.detail.name
  30. });
  31. this.getList();
  32. },
  33. getList() {
  34. let page = this.selectComponent("#" + this.data.tabActive);
  35. page.data.isGet || page.getList();
  36. }
  37. })