home.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const api_user = require("../../api/user.js");
  4. if (!Math) {
  5. listContent();
  6. }
  7. const listContent = () => "../../components/listContent.js";
  8. const _sfc_main = {
  9. __name: "home",
  10. setup(__props) {
  11. common_vendor.onMounted(() => {
  12. getMain();
  13. });
  14. let domesticList = common_vendor.ref({});
  15. async function getMain() {
  16. common_vendor.index.__f__("log", "at pages/home/home.vue:19", "走进来");
  17. let newList = [getList1(), getList2(), getList3()];
  18. common_vendor.index.__f__("log", "at pages/home/home.vue:21", newList, "列表");
  19. let [data1, data2, data3] = await Promise.allSettled(newList);
  20. domesticList.value = data1.value;
  21. common_vendor.index.__f__("log", "at pages/home/home.vue:24", domesticList.value, "123");
  22. }
  23. async function getList1() {
  24. return api_user.Domestic();
  25. }
  26. async function getList2() {
  27. return api_user.Variety();
  28. }
  29. async function getList3() {
  30. return api_user.American();
  31. }
  32. return (_ctx, _cache) => {
  33. return {
  34. a: common_vendor.p({
  35. main: common_vendor.unref(domesticList)
  36. }),
  37. b: common_vendor.p({
  38. main: common_vendor.unref(domesticList)
  39. }),
  40. c: common_vendor.p({
  41. main: common_vendor.unref(domesticList)
  42. })
  43. };
  44. };
  45. }
  46. };
  47. wx.createPage(_sfc_main);
  48. //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/home/home.js.map