Initial commit: Happy Up monorepo through Sprint 5.
Document-driven MVP with FastAPI backend, Vue H5, WeChat mini shell, product demo, and Docker dev stack. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
const api = require('../../utils/api')
|
||||
|
||||
Page({
|
||||
data: {
|
||||
children: [],
|
||||
error: '',
|
||||
},
|
||||
onShow() {
|
||||
this.load()
|
||||
},
|
||||
async load() {
|
||||
try {
|
||||
const data = await api.listChildren()
|
||||
this.setData({ children: data.list || [], error: '' })
|
||||
} catch (err) {
|
||||
this.setData({ error: err.message || '加载失败' })
|
||||
}
|
||||
},
|
||||
goScreening() {
|
||||
wx.navigateTo({ url: '/pages/screening/screening' })
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"navigationBarTitleText": "首页"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<view class="card">
|
||||
<view>儿童档案</view>
|
||||
<view class="muted">{{error}}</view>
|
||||
<block wx:for="{{children}}" wx:key="id">
|
||||
<view>{{item.name}} · {{item.birthday}}</view>
|
||||
</block>
|
||||
<button class="btn-primary" bindtap="goScreening">去筛查</button>
|
||||
</view>
|
||||
Reference in New Issue
Block a user