feat: rebuild pet app and backend around core care flows

This commit is contained in:
2026-10-01 13:11:30 +08:00
parent 51ead8f411
commit bfcf8788a4
321 changed files with 4918 additions and 25199 deletions
+22
View File
@@ -0,0 +1,22 @@
const { secure, toast } = require("../../utils/api");
Page({
data: { pets: [] },
onShow() {
this.load();
},
async load() {
try {
this.setData({ pets: await secure("/pets") });
} catch (e) {
toast(e);
}
},
add() {
wx.navigateTo({ url: "/pages/pet-edit/pet-edit" });
},
edit(e) {
wx.navigateTo({
url: "/pages/pet-edit/pet-edit?id=" + e.currentTarget.dataset.id,
});
},
});