fix(tongji): 恢复居家训练并统一识糖入口

This commit is contained in:
大哥大哥的大哥哥
2026-07-18 11:30:54 +08:00
parent d57e60539e
commit 8a6890767e
7 changed files with 13 additions and 35 deletions
@@ -186,16 +186,8 @@ const inlineItems = computed(() => {
return metro ? [metro, ...rest] : trainingItems
})
const isDevMode = (): boolean => {
/* HBuilderX 工程:发行(release)模式下 NODE_ENV === 'production' */
try {
return process.env.NODE_ENV !== 'production'
} catch (_) {
return false
}
}
const visible = ref(isDevMode())
// 居家耗糖训练是正式功能,开发版和发行版都需要展示。
const visible = ref(true)
const expanded = ref(false)
const toggle = () => {
+1 -1
View File
@@ -224,7 +224,7 @@
"path": "endless-game/index",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "控糖消消乐",
"navigationBarTitleText": "识糖小课堂",
"backgroundColor": "#eefbf4",
"disableScroll": false,
"enableShareAppMessage": true,
@@ -1,4 +1,4 @@
# 控糖消消乐平台接入说明
# 识糖小课堂平台接入说明
## 已接入能力
@@ -1,6 +1,6 @@
# 控糖消消乐独立功能包
# 识糖小课堂独立功能包
此目录包含“控糖消消乐”无尽三消版的页面与运行代码。食品图片由远端 COS 提供,图标组件复用 `tongji` 分包的公共组件。
此目录包含“识糖小课堂”无尽三消版的页面与运行代码。食品图片由远端 COS 提供,图标组件复用 `tongji` 分包的公共组件。
## 目录内容
@@ -20,7 +20,7 @@
"path": "endless-game/index",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "控糖消消乐",
"navigationBarTitleText": "识糖小课堂",
"backgroundColor": "#eefbf4",
"disableScroll": false,
"enableShareAppMessage": true,
@@ -1,5 +1,5 @@
/**
* 控糖消消乐独立登录适配层。复用主小程序账号,但不依赖 tongji 其他页面代码。
* 识糖小课堂独立登录适配层。复用主小程序账号,但不依赖 tongji 其他页面代码。
*/
export function useGameAuth(proxy) {
let loginPromise = null
@@ -20,7 +20,7 @@
</view>
</view>
<view class="eg-title-wrap">
<text class="eg-title">控糖消消乐</text>
<text class="eg-title">识糖小课堂</text>
<text class="eg-subtitle">{{ themeIndex + 1 }} · {{ currentTheme.title }}</text>
</view>
<view class="eg-nav-actions">
@@ -643,9 +643,9 @@ function formatWeekDate(value) {
function gameShareTitle() {
if (learned.value > 0) {
return `我在控糖消消乐认识了${learned.value}份食物,一起来挑战吧`
return `我在识糖小课堂认识了${learned.value}份食物,一起来挑战吧`
}
return '控糖消消乐:边玩边认识常见食物'
return '识糖小课堂:边玩边认识常见食物'
}
function gameSharePath() {
+2 -16
View File
@@ -99,23 +99,13 @@
<text class="st-chart-mock-hint">示例数据累计记录满 7 天后显示您的真实趋势</text>
</view>
<view class="st-game-entry-list">
<view class="st-game-entry st-game-entry--in-card" @click="goSugarRaidGamePage">
<view class="st-game-entry-icon">
<TongjiIcon name="activity" size="sm" 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>
<view class="st-game-entry st-game-entry--in-card" @click="goEndlessGamePage">
<view class="st-game-entry-icon">
<TongjiIcon name="sparkles" size="sm" color="#006c49" />
</view>
<view class="st-game-entry-body">
<text class="st-game-entry-title">控糖消消乐</text>
<text class="st-game-entry-sub">无尽消除挑战控糖高</text>
<text class="st-game-entry-title">识糖小课堂</text>
<text class="st-game-entry-sub">三消认食物学习哪些食物含糖高</text>
</view>
<TongjiIcon name="chevron-right" size="sm" color="#64748b" />
</view>
@@ -1533,10 +1523,6 @@ function openGamePage(url) {
})
}
function goSugarRaidGamePage() {
openGamePage('/tongji/pages/game')
}
function goEndlessGamePage() {
openGamePage('/tongji/endless-game/index')
}