home.js 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const api_home = require("../../api/home.js");
  4. const _sfc_main = {
  5. data() {
  6. return {
  7. list: []
  8. };
  9. },
  10. methods: {
  11. getList() {
  12. api_home.getMsgList().then((res) => {
  13. common_vendor.index.__f__("log", "at pages/home/home.vue:39", res, "res ");
  14. });
  15. },
  16. getMain() {
  17. common_vendor.index.setStorageSync("storage_key1", "hello1");
  18. common_vendor.index.setStorage({
  19. key: "storage_key2",
  20. data: "hello2"
  21. });
  22. },
  23. showMain() {
  24. common_vendor.index.__f__("log", "at pages/home/home.vue:57", common_vendor.index.getStorageSync("storage_key1"), "异步");
  25. common_vendor.index.__f__("log", "at pages/home/home.vue:58", common_vendor.index.getStorage({
  26. key: "storage_key2",
  27. success: function(res) {
  28. common_vendor.index.__f__("log", "at pages/home/home.vue:61", res.data);
  29. }
  30. }), "同步");
  31. },
  32. upImage() {
  33. common_vendor.index.chooseImage({
  34. count: 6,
  35. success: function(res) {
  36. common_vendor.index.__f__("log", "at pages/home/home.vue:70", res);
  37. this.list = res.tempFilePaths;
  38. common_vendor.index.__f__("log", "at pages/home/home.vue:72", this.list, "aaa");
  39. }
  40. });
  41. }
  42. }
  43. };
  44. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  45. return {
  46. a: common_vendor.o((...args) => $options.getList && $options.getList(...args)),
  47. b: common_vendor.o((...args) => $options.getMain && $options.getMain(...args)),
  48. c: common_vendor.o((...args) => $options.showMain && $options.showMain(...args)),
  49. d: common_vendor.o((...args) => $options.upImage && $options.upImage(...args)),
  50. e: common_vendor.f($data.list, (item, k0, i0) => {
  51. return {
  52. a: common_vendor.t(item)
  53. };
  54. })
  55. };
  56. }
  57. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-07e72d3c"]]);
  58. wx.createPage(MiniProgramPage);
  59. //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/home/home.js.map