You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
606 B

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'
});
}
});