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
+26
View File
@@ -0,0 +1,26 @@
Component({
properties: {
pets: { type: Array, value: [] },
selected: { type: Array, value: [] },
},
data: { viewPets: [] },
observers: {
"pets,selected": function (pets, selected) {
this.setData({
viewPets: (pets || []).map((p) => ({
...p,
chosen: (selected || []).includes(p.id),
})),
});
},
},
methods: {
toggle(e) {
const id = e.currentTarget.dataset.id;
const selected = this.data.selected.includes(id)
? this.data.selected.filter((x) => x !== id)
: [...this.data.selected, id];
this.triggerEvent("change", { selected });
},
},
});