training-hub.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. <template>
  2. <view class="container">
  3. <view class="header-bar">
  4. <text class="back-btn" @click="goBack">← 返回</text>
  5. <text class="header-title">认知训练中心</text>
  6. <text class="header-placeholder"></text>
  7. </view>
  8. <view class="desc-section">
  9. <text class="desc-text">选择训练游戏,提升你的认知能力</text>
  10. </view>
  11. <view class="game-card" @click="goGame('logic-test')">
  12. <view class="game-card-left">
  13. <text class="game-icon">🧩</text>
  14. </view>
  15. <view class="game-card-center">
  16. <text class="game-name">逻辑推理测试</text>
  17. <text class="game-desc">数列推理 · 锻炼逻辑思维</text>
  18. </view>
  19. <text class="game-arrow">›</text>
  20. </view>
  21. <view class="game-card" @click="goGame('perception-test')">
  22. <view class="game-card-left">
  23. <text class="game-icon">👁️</text>
  24. </view>
  25. <view class="game-card-center">
  26. <text class="game-name">感知觉测试</text>
  27. <text class="game-desc">找不同 · 提高感官信息处理能力</text>
  28. </view>
  29. <text class="game-arrow">›</text>
  30. </view>
  31. <view class="game-card" @click="goGame('memory-test')">
  32. <view class="game-card-left">
  33. <text class="game-icon">🧠</text>
  34. </view>
  35. <view class="game-card-center">
  36. <text class="game-name">记忆力测试</text>
  37. <text class="game-desc">数字广度 · 增强信息记忆与回忆能力</text>
  38. </view>
  39. <text class="game-arrow">›</text>
  40. </view>
  41. <view class="game-card" @click="goGame('spatial-test')">
  42. <view class="game-card-left">
  43. <text class="game-icon">🧭</text>
  44. </view>
  45. <view class="game-card-center">
  46. <text class="game-name">空间思维测试</text>
  47. <text class="game-desc">方向旋转 · 培养空间想象与构建能力</text>
  48. </view>
  49. <text class="game-arrow">›</text>
  50. </view>
  51. <view class="game-card" @click="goGame('speed-test')">
  52. <view class="game-card-left">
  53. <text class="game-icon">⚡</text>
  54. </view>
  55. <view class="game-card-center">
  56. <text class="game-name">加工速度测试</text>
  57. <text class="game-desc">符号匹配 · 加快信息处理与反应速度</text>
  58. </view>
  59. <text class="game-arrow">›</text>
  60. </view>
  61. <view class="game-card" @click="goGame('schulte')">
  62. <view class="game-card-left">
  63. <text class="game-icon">🎯</text>
  64. </view>
  65. <view class="game-card-center">
  66. <text class="game-name">舒尔特方格</text>
  67. <text class="game-desc">提升专注力和反应速度</text>
  68. </view>
  69. <text class="game-arrow">›</text>
  70. </view>
  71. <view class="game-card" @click="goGame('1a2b')">
  72. <view class="game-card-left">
  73. <text class="game-icon">🔢</text>
  74. </view>
  75. <view class="game-card-center">
  76. <text class="game-name">猜数字</text>
  77. <text class="game-desc">锻炼逻辑思维和推理能力</text>
  78. </view>
  79. <text class="game-arrow">›</text>
  80. </view>
  81. <view class="note-section">
  82. <text class="note-text">完成测试后,认知雷达图会更新对应维度得分</text>
  83. </view>
  84. </view>
  85. </template>
  86. <script>
  87. export default {
  88. data: function() {
  89. return {
  90. memberId: null
  91. }
  92. },
  93. onLoad: function(options) {
  94. if (options && options.memberId) {
  95. this.memberId = options.memberId
  96. }
  97. },
  98. methods: {
  99. goBack: function() {
  100. uni.navigateBack()
  101. },
  102. goGame: function(game) {
  103. var url = ''
  104. if (game === 'schulte') {
  105. url = '/pages/games/schulte'
  106. } else if (game === '1a2b') {
  107. url = '/pages/games/1a2b'
  108. } else {
  109. url = '/pages/cognitive-test/' + game
  110. }
  111. if (url) {
  112. var memberId = this.memberId || uni.getStorageSync('currentChildId') || ''
  113. if (memberId) {
  114. url += '?memberId=' + memberId
  115. }
  116. uni.navigateTo({ url: url })
  117. }
  118. }
  119. }
  120. }
  121. </script>
  122. <style scoped>
  123. .container {
  124. min-height: 100vh;
  125. background: linear-gradient(180deg, #FFF8E1 0%, #f5f7fa 100%);
  126. padding-bottom: 60rpx;
  127. }
  128. .header-bar {
  129. display: flex;
  130. flex-direction: row;
  131. align-items: center;
  132. justify-content: space-between;
  133. padding: 80rpx 30rpx 30rpx;
  134. }
  135. .back-btn {
  136. font-size: 30rpx;
  137. color: #B8860B;
  138. padding: 10rpx;
  139. }
  140. .header-title {
  141. font-size: 36rpx;
  142. font-weight: bold;
  143. color: #B8860B;
  144. }
  145. .header-placeholder {
  146. width: 60rpx;
  147. }
  148. .desc-section {
  149. padding: 0 30rpx 30rpx;
  150. }
  151. .desc-text {
  152. font-size: 26rpx;
  153. color: #999;
  154. text-align: center;
  155. display: block;
  156. }
  157. .game-card {
  158. display: flex;
  159. flex-direction: row;
  160. align-items: center;
  161. background: #fff;
  162. margin: 0 30rpx 20rpx;
  163. padding: 30rpx;
  164. border-radius: 20rpx;
  165. box-shadow: 0 4rpx 20rpx rgba(255, 215, 0, 0.12);
  166. border-left: 8rpx solid #FFD700;
  167. }
  168. .game-card:active {
  169. opacity: 0.8;
  170. }
  171. .game-card-left {
  172. width: 80rpx;
  173. height: 80rpx;
  174. border-radius: 20rpx;
  175. background: #FFF8E1;
  176. display: flex;
  177. align-items: center;
  178. justify-content: center;
  179. margin-right: 20rpx;
  180. }
  181. .game-icon {
  182. font-size: 40rpx;
  183. }
  184. .game-card-center {
  185. flex: 1;
  186. }
  187. .game-name {
  188. font-size: 30rpx;
  189. font-weight: bold;
  190. color: #333;
  191. display: block;
  192. margin-bottom: 6rpx;
  193. }
  194. .game-desc {
  195. font-size: 24rpx;
  196. color: #999;
  197. display: block;
  198. }
  199. .game-arrow {
  200. font-size: 40rpx;
  201. color: #ccc;
  202. margin-left: 10rpx;
  203. }
  204. .note-section {
  205. padding: 40rpx 30rpx;
  206. text-align: center;
  207. }
  208. .note-text {
  209. font-size: 24rpx;
  210. color: #ccc;
  211. }
  212. </style>