| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- "use strict";
- const common_vendor = require("../../common/vendor.js");
- const _sfc_main = {
- data() {
- const getRandomImage = (seed) => {
- return `https://picsum.photos/seed/${seed}/200/300`;
- };
- return {
- noteList: [
- {
- id: 1,
- title: "西游记",
- cover: getRandomImage("notes1"),
- noteCount: 3
- },
- {
- id: 2,
- title: "孝经 (中华经典诵读)",
- cover: getRandomImage("notes2"),
- noteCount: 10
- },
- {
- id: 3,
- title: "西游记",
- cover: getRandomImage("notes3"),
- noteCount: 4
- },
- {
- id: 4,
- title: "孝经 (中华经典诵读)",
- cover: getRandomImage("notes4"),
- noteCount: 10
- },
- {
- id: 5,
- title: "红楼梦",
- cover: getRandomImage("notes5"),
- noteCount: 5
- },
- {
- id: 6,
- title: "三国演义",
- cover: getRandomImage("notes6"),
- noteCount: 8
- }
- ]
- };
- },
- onLoad() {
- this.loadNotes();
- },
- methods: {
- goBack() {
- common_vendor.index.navigateBack();
- },
- goToBookNotes(item) {
- common_vendor.index.navigateTo({
- url: `/pages/book-notes/book-notes?bookId=${item.id}&title=${encodeURIComponent(item.title)}&cover=${encodeURIComponent(item.cover)}`
- });
- },
- loadNotes() {
- }
- }
- };
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
- return common_vendor.e({
- a: common_vendor.o((...args) => $options.goBack && $options.goBack(...args)),
- b: common_vendor.f($data.noteList, (item, index, i0) => {
- return {
- a: item.cover,
- b: common_vendor.t(item.title),
- c: common_vendor.t(item.noteCount),
- d: index,
- e: common_vendor.o(($event) => $options.goToBookNotes(item), index)
- };
- }),
- c: $data.noteList.length === 0
- }, $data.noteList.length === 0 ? {} : {});
- }
- const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-cc7fb8d7"]]);
- wx.createPage(MiniProgramPage);
- //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/notes/notes.js.map
|