album.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. if (!Array) {
  4. const _easycom_uni_segmented_control2 = common_vendor.resolveComponent("uni-segmented-control");
  5. _easycom_uni_segmented_control2();
  6. }
  7. const _easycom_uni_segmented_control = () => "../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.js";
  8. if (!Math) {
  9. _easycom_uni_segmented_control();
  10. }
  11. const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  12. __name: "album",
  13. setup(__props) {
  14. var _a;
  15. (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
  16. const config = common_vendor.ref({ logoUrl: "" });
  17. const id = common_vendor.ref("");
  18. const list = common_vendor.ref(["照片", "视频"]);
  19. const current = common_vendor.ref(0);
  20. common_vendor.onLoad(async (options) => {
  21. id.value = options && options.id;
  22. await searchConfig();
  23. await search();
  24. });
  25. const searchConfig = async () => {
  26. config.value = common_vendor.index.getStorageSync("config");
  27. };
  28. const search = async () => {
  29. if (id.value)
  30. ;
  31. };
  32. const onClickItem = (e) => {
  33. if (current.value !== e.currentIndex)
  34. current.value = e.currentIndex;
  35. };
  36. return (_ctx, _cache) => {
  37. return {
  38. a: common_vendor.o(onClickItem),
  39. b: common_vendor.p({
  40. current: current.value,
  41. values: list.value,
  42. styleType: "text",
  43. activeColor: "#dd524d"
  44. }),
  45. c: current.value === 0,
  46. d: current.value === 1
  47. };
  48. };
  49. }
  50. });
  51. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-17fd90ce"], ["__file", "D:/project/足球比赛/match_applet/pagesHome/team/album.vue"]]);
  52. wx.createPage(MiniProgramPage);