Sprint 6: report review workflow, CI/K8s, and client tabs.
Add coach review APIs, pose calibration thresholds, Gitea CI, Kubernetes skeleton, H5 practice page, and mini program tab bar. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+22
-2
@@ -1,8 +1,9 @@
|
||||
{
|
||||
"pages": [
|
||||
"pages/login/login",
|
||||
"pages/home/home",
|
||||
"pages/screening/screening"
|
||||
"pages/screening/screening",
|
||||
"pages/training/training",
|
||||
"pages/login/login"
|
||||
],
|
||||
"window": {
|
||||
"navigationBarTitleText": "Happy Up",
|
||||
@@ -10,6 +11,25 @@
|
||||
"navigationBarTextStyle": "white",
|
||||
"backgroundColor": "#eef2f7"
|
||||
},
|
||||
"tabBar": {
|
||||
"color": "#6b7280",
|
||||
"selectedColor": "#1a6fb5",
|
||||
"backgroundColor": "#ffffff",
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/home/home",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/screening/screening",
|
||||
"text": "筛查"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/training/training",
|
||||
"text": "训练"
|
||||
}
|
||||
]
|
||||
},
|
||||
"style": "v2",
|
||||
"sitemapLocation": "sitemap.json"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
const api = require('../../utils/api')
|
||||
|
||||
Page({
|
||||
data: {
|
||||
goal: '',
|
||||
exerciseName: '',
|
||||
planId: null,
|
||||
score: 82,
|
||||
status: '准备就绪',
|
||||
},
|
||||
onShow() {
|
||||
this.loadPlan()
|
||||
},
|
||||
async loadPlan() {
|
||||
try {
|
||||
const children = await api.listChildren()
|
||||
const child = (children.list || [])[0]
|
||||
if (!child) return
|
||||
const plans = await api.request(`/api/training/plans?childId=${child.id}`)
|
||||
const plan = (plans.list || [])[0]
|
||||
if (!plan) return
|
||||
this.setData({
|
||||
planId: plan.id,
|
||||
goal: plan.detail.goal,
|
||||
exerciseName: (plan.detail.exercises[0] || {}).name || '训练动作',
|
||||
})
|
||||
} catch (err) {
|
||||
this.setData({ status: err.message || '加载失败' })
|
||||
}
|
||||
},
|
||||
async submit() {
|
||||
if (!this.data.planId) return
|
||||
this.setData({ status: '提交打卡…' })
|
||||
try {
|
||||
await api.request(`/api/training/plans/${this.data.planId}/records`, {
|
||||
method: 'POST',
|
||||
data: {
|
||||
exerciseId: 1,
|
||||
completed: true,
|
||||
score: this.data.score,
|
||||
durationSeconds: 300,
|
||||
note: '小程序跟练打卡',
|
||||
},
|
||||
})
|
||||
this.setData({ status: '打卡成功 ✓' })
|
||||
} catch (err) {
|
||||
this.setData({ status: err.message || '打卡失败' })
|
||||
}
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"navigationBarTitleText": "训练跟练"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<view class="card">
|
||||
<view>训练计划</view>
|
||||
<view class="muted">{{goal}}</view>
|
||||
<view>{{exerciseName}}</view>
|
||||
<view class="muted">{{status}}</view>
|
||||
<button class="btn-primary" bindtap="submit">提交跟练打卡</button>
|
||||
</view>
|
||||
Reference in New Issue
Block a user