更新
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -52,12 +52,27 @@
|
||||
<text>录入今日血糖</text>
|
||||
</view>
|
||||
|
||||
<view class="st-game-entry" @click="goGamePage">
|
||||
<view class="st-game-entry-icon">
|
||||
<TongjiIcon name="activity" size="md" color="#006c49" />
|
||||
</view>
|
||||
<view class="st-game-entry-body">
|
||||
<text class="st-game-entry-title">糖分突袭</text>
|
||||
<text class="st-game-entry-sub">消除棋盘食物,边玩边学控糖</text>
|
||||
</view>
|
||||
<TongjiIcon name="chevron-right" size="sm" color="#64748b" />
|
||||
</view>
|
||||
|
||||
<!-- 2. 血糖趋势 -->
|
||||
<view v-if="diagnosisId" class="st-chart-card">
|
||||
<view class="st-chart-head">
|
||||
<view>
|
||||
<text class="st-chart-title">血糖趋势</text>
|
||||
<text class="st-chart-sub">{{ rangeText }} · mmol/L</text>
|
||||
<view class="st-chart-more" @click="goRecordsPage">
|
||||
<text class="st-chart-more-text">查看更多记录</text>
|
||||
<TongjiIcon name="chevron-right" size="sm" color="#006c49" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="st-chart-legend">
|
||||
<view
|
||||
@@ -1290,6 +1305,18 @@ function onRefresh() {
|
||||
fetchAll()
|
||||
}
|
||||
|
||||
async function goRecordsPage() {
|
||||
if (!diagnosisId.value) {
|
||||
const ok = await ensureCanRecordGlucose()
|
||||
if (!ok || !diagnosisId.value) return
|
||||
}
|
||||
const q = [
|
||||
`diagnosis_id=${diagnosisId.value}`,
|
||||
patientId.value ? `patient_id=${patientId.value}` : ''
|
||||
].filter(Boolean).join('&')
|
||||
uni.navigateTo({ url: `/tongji/pages/more?${q}` })
|
||||
}
|
||||
|
||||
async function goMorePage() {
|
||||
if (!diagnosisId.value) {
|
||||
const ok = await ensureCanRecordGlucose()
|
||||
@@ -1298,6 +1325,15 @@ async function goMorePage() {
|
||||
uni.navigateTo({ url: '/tongji/pages/more' })
|
||||
}
|
||||
|
||||
function goGamePage() {
|
||||
uni.navigateTo({
|
||||
url: '/tongji/pages/game',
|
||||
fail() {
|
||||
uni.showToast({ title: '暂时无法打开游戏', icon: 'none' })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function navToUser() {
|
||||
uni.switchTab({ url: '/pages/user/user' })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user