gengxin
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
<template>
|
||||
<view class="tang-entry">
|
||||
<text class="title">唐侦探</text>
|
||||
<text class="subtitle">桂香里的第十五桌 · 十五回连环画</text>
|
||||
<text class="hint">{{ hint }}</text>
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<button class="open" :disabled="opening" @click="openGame">{{ opening ? '正在打开…' : '翻开故事' }}</button>
|
||||
<!-- #endif -->
|
||||
<button class="back" @click="back">返回学堂</button>
|
||||
<text class="note">阅读存档与健康记录分开保存。这里不替代诊断、处方或个体化治疗建议。</text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { onReady } from '@dcloudio/uni-app'
|
||||
|
||||
const opening = ref(false)
|
||||
const hint = ref('此游戏目前在微信小程序中运行,请从微信打开学堂。')
|
||||
// #ifdef MP-WEIXIN
|
||||
hint.value = '保留原版连环画、线索互动和已有配音;登录后可同步阅读存档。'
|
||||
// #endif
|
||||
|
||||
function openGame() {
|
||||
// Raw native pages are registered in the compiled app.json, not uni's Vue router.
|
||||
// #ifdef MP-WEIXIN
|
||||
if (opening.value) return
|
||||
opening.value = true
|
||||
wx.redirectTo({
|
||||
url: '/tang-detective/pages/home/home',
|
||||
fail() {
|
||||
hint.value = '暂时无法打开。请确认使用本项目的微信构建产物。'
|
||||
},
|
||||
complete() { opening.value = false },
|
||||
})
|
||||
// #endif
|
||||
}
|
||||
function back() {
|
||||
uni.navigateBack({ fail: () => uni.reLaunch({ url: '/tongji/pages/weekly' }) })
|
||||
}
|
||||
onReady(openGame)
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.tang-entry { min-height: 100vh; box-sizing: border-box; padding: 96rpx 40rpx; background: #f4fbf4; color: #204e2b; display: flex; flex-direction: column; gap: 32rpx; }
|
||||
.title { font-size: 56rpx; font-weight: 700; }
|
||||
.subtitle { font-size: 32rpx; }
|
||||
.hint { font-size: 30rpx; line-height: 1.7; color: #405447; }
|
||||
.open, .back { width: 100%; min-height: 96rpx; font-size: 34rpx; border-radius: 24rpx; }
|
||||
.open { background: #006c49; color: #fff; }
|
||||
.back { background: #e5f0e6; color: #204e2b; }
|
||||
.note { font-size: 26rpx; line-height: 1.7; color: #576c5c; }
|
||||
</style>
|
||||
Reference in New Issue
Block a user