diff --git a/created.js b/created.js new file mode 100644 index 0000000..f15540e --- /dev/null +++ b/created.js @@ -0,0 +1,27 @@ +Page({ + data: { + activities: [ + { id: 1, name: "活动1", participants: 10 }, + { id: 2, name: "活动2", participants: 20 }, + { id: 3, name: "活动3", participants: 15 } + ] + }, + + onSearchInput(e) { + // 实现搜索功能 + console.log("搜索:", e.detail.value); + }, + + onActivityTap(e) { + const activityId = e.currentTarget.dataset.id; + wx.navigateTo({ + url: `/pages/activityDetail/activityDetail?id=${activityId}` + }); + }, + + onCreateActivity() { + wx.navigateTo({ + url: '/pages/createActivity/createActivity' + }); + } +}); \ No newline at end of file