| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- <template>
- <view class="container">
- <view class="header-bar">
- <text class="back-btn" @click="goBack">← 返回</text>
- <text class="header-title">认知训练中心</text>
- <text class="header-placeholder"></text>
- </view>
- <view class="desc-section">
- <text class="desc-text">选择训练游戏,提升你的认知能力</text>
- </view>
- <view class="game-card" @click="goGame('schulte')">
- <view class="game-card-left">
- <text class="game-icon">🎯</text>
- </view>
- <view class="game-card-center">
- <text class="game-name">舒尔特方格</text>
- <text class="game-desc">提升专注力和反应速度</text>
- </view>
- <text class="game-arrow">›</text>
- </view>
- <view class="game-card" @click="goGame('1a2b')">
- <view class="game-card-left">
- <text class="game-icon">🔢</text>
- </view>
- <view class="game-card-center">
- <text class="game-name">猜数字</text>
- <text class="game-desc">锻炼逻辑思维和推理能力</text>
- </view>
- <text class="game-arrow">›</text>
- </view>
- <view class="note-section">
- <text class="note-text">更多训练游戏正在开发中,敬请期待</text>
- </view>
- </view>
- </template>
- <script>
- export default {
- data: function() {
- return {
- memberId: null
- }
- },
- onLoad: function(options) {
- if (options && options.memberId) {
- this.memberId = options.memberId
- }
- },
- methods: {
- goBack: function() {
- uni.navigateBack()
- },
- goGame: function(game) {
- var url = ''
- if (game === 'schulte') {
- url = '/pages/games/schulte'
- } else if (game === '1a2b') {
- url = '/pages/games/1a2b'
- }
- if (url) {
- uni.navigateTo({ url: url })
- }
- }
- }
- }
- </script>
- <style scoped>
- .container {
- min-height: 100vh;
- background: linear-gradient(180deg, #FFF8E1 0%, #f5f7fa 100%);
- padding-bottom: 60rpx;
- }
- .header-bar {
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: space-between;
- padding: 80rpx 30rpx 30rpx;
- }
- .back-btn {
- font-size: 30rpx;
- color: #B8860B;
- padding: 10rpx;
- }
- .header-title {
- font-size: 36rpx;
- font-weight: bold;
- color: #B8860B;
- }
- .header-placeholder {
- width: 60rpx;
- }
- .desc-section {
- padding: 0 30rpx 30rpx;
- }
- .desc-text {
- font-size: 26rpx;
- color: #999;
- text-align: center;
- display: block;
- }
- .game-card {
- display: flex;
- flex-direction: row;
- align-items: center;
- background: #fff;
- margin: 0 30rpx 20rpx;
- padding: 30rpx;
- border-radius: 20rpx;
- box-shadow: 0 4rpx 20rpx rgba(255, 215, 0, 0.12);
- border-left: 8rpx solid #FFD700;
- }
- .game-card:active {
- opacity: 0.8;
- }
- .game-card-left {
- width: 80rpx;
- height: 80rpx;
- border-radius: 20rpx;
- background: #FFF8E1;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-right: 20rpx;
- }
- .game-icon {
- font-size: 40rpx;
- }
- .game-card-center {
- flex: 1;
- }
- .game-name {
- font-size: 30rpx;
- font-weight: bold;
- color: #333;
- display: block;
- margin-bottom: 6rpx;
- }
- .game-desc {
- font-size: 24rpx;
- color: #999;
- display: block;
- }
- .game-arrow {
- font-size: 40rpx;
- color: #ccc;
- margin-left: 10rpx;
- }
- .note-section {
- padding: 40rpx 30rpx;
- text-align: center;
- }
- .note-text {
- font-size: 24rpx;
- color: #ccc;
- }
- </style>
|