index.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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.code != '1') return wx.showToast({
  19. title: res.msg,
  20. icon: "none"
  21. })
  22. this.setData({
  23. freefreightamount: res.data.freefreightamount
  24. })
  25. })
  26. getApp().globalData.Language.getLanguagePackage(this, 'E-订单');
  27. },
  28. tabChange(e) {
  29. this.setData({
  30. tabActive: e.detail.name
  31. });
  32. this.getList();
  33. },
  34. getList() {
  35. let page = this.selectComponent("#" + this.data.tabActive);
  36. page.data.isGet || page.getList();
  37. }
  38. })