|
@@ -11,7 +11,7 @@
|
|
|
<view class="game-stats">
|
|
|
<view class="game-players">
|
|
|
<people size="14"></people>
|
|
|
- <text>{{ game.players }}人</text>
|
|
|
+ <text>{{ game.minPlayers }} - {{ game.maxPlayers }}人</text>
|
|
|
</view>
|
|
|
<view class="game-duration">
|
|
|
<clock size="14"></clock>
|
|
@@ -248,6 +248,244 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style>
|
|
|
-/* 样式保持不变 */
|
|
|
+<style lang="scss">
|
|
|
+.game-detail-page {
|
|
|
+ background-color: $background-color-base;
|
|
|
+ min-height: 100vh;
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ .game-detail {
|
|
|
+ height: 100vh;
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ // 固定区域样式
|
|
|
+ .fixed-header {
|
|
|
+ position: fixed;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ z-index: 100;
|
|
|
+ background-color: $background-color-light;
|
|
|
+ }
|
|
|
+
|
|
|
+ .game-header {
|
|
|
+ position: relative;
|
|
|
+ width: 100%;
|
|
|
+ height: 150px; // 限制高度为150px
|
|
|
+
|
|
|
+ .game-image {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ object-fit: cover;
|
|
|
+ object-position: top; // 图片从顶部对齐
|
|
|
+ }
|
|
|
+
|
|
|
+ &__overlay {
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ padding: $spacing-medium;
|
|
|
+ background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.4) 80%, rgba(0,0,0,0));
|
|
|
+
|
|
|
+ .game-title {
|
|
|
+ font-size: $font-size-large;
|
|
|
+ font-weight: $font-weight-bold;
|
|
|
+ color: $text-color-light;
|
|
|
+ margin-bottom: $spacing-mini;
|
|
|
+ }
|
|
|
+
|
|
|
+ .game-stats {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .game-players, .game-duration {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin-right: $spacing-medium;
|
|
|
+ color: $text-color-light;
|
|
|
+ font-size: $font-size-small;
|
|
|
+
|
|
|
+ text {
|
|
|
+ margin-left: $spacing-mini;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 评分区域
|
|
|
+ .game-rating-section {
|
|
|
+ padding: $spacing-base $spacing-large;
|
|
|
+ background-color: $background-color-light;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ border-bottom: 1px solid $border-color-light;
|
|
|
+
|
|
|
+ .rating-score {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .score {
|
|
|
+ font-size: $font-size-xlarge;
|
|
|
+ font-weight: $font-weight-bold;
|
|
|
+ color: $text-color-primary;
|
|
|
+ line-height: 1.2;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .rating-stats {
|
|
|
+ display: flex;
|
|
|
+
|
|
|
+ .rating-item {
|
|
|
+ margin-left: $spacing-large;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .value {
|
|
|
+ font-size: $font-size-large;
|
|
|
+ font-weight: $font-weight-medium;
|
|
|
+ color: $primary-color;
|
|
|
+ }
|
|
|
+
|
|
|
+ .label {
|
|
|
+ font-size: $font-size-mini;
|
|
|
+ color: $text-color-secondary;
|
|
|
+ margin-top: $spacing-mini;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 操作按钮区域
|
|
|
+ .game-actions {
|
|
|
+ display: flex;
|
|
|
+ padding: $spacing-medium;
|
|
|
+ background-color: $background-color-light;
|
|
|
+
|
|
|
+ .action-btn-container {
|
|
|
+ flex: 1;
|
|
|
+ padding: 0 $spacing-mini;
|
|
|
+
|
|
|
+ &:first-child {
|
|
|
+ padding-left: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ &:last-child {
|
|
|
+ padding-right: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .action-btn {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 内容区域
|
|
|
+ .content-scroll-view {
|
|
|
+ height: 100vh;
|
|
|
+ /* 增加padding-top确保第一个divider不被遮挡 */
|
|
|
+ padding-top: 230px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ background-color: $background-color-base;
|
|
|
+
|
|
|
+ .scrollable-content {
|
|
|
+ background-color: $background-color-light;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* 添加顶部间距确保第一个divider可见 */
|
|
|
+ .top-padding {
|
|
|
+ height: 12px; /* 增加一点额外空间 */
|
|
|
+ }
|
|
|
+
|
|
|
+ .section-container {
|
|
|
+ padding: 0 $spacing-large $spacing-small;
|
|
|
+
|
|
|
+ /* 确保内容区有最小高度,防止没有内容时布局错乱 */
|
|
|
+ min-height: 40px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .section-content {
|
|
|
+ font-size: $font-size-base;
|
|
|
+ color: $text-color-regular;
|
|
|
+ line-height: $line-height-base;
|
|
|
+ white-space: pre-line;
|
|
|
+
|
|
|
+ /* 处理超长单词换行 */
|
|
|
+ word-wrap: break-word;
|
|
|
+ word-break: break-all;
|
|
|
+ }
|
|
|
+
|
|
|
+ .tip-list {
|
|
|
+ .tip-item {
|
|
|
+ display: flex;
|
|
|
+ margin-bottom: $spacing-small;
|
|
|
+
|
|
|
+ .tip-number {
|
|
|
+ font-weight: $font-weight-medium;
|
|
|
+ color: $text-color-primary;
|
|
|
+ margin-right: $spacing-small;
|
|
|
+ flex-shrink: 0; /* 防止数字被压缩 */
|
|
|
+ }
|
|
|
+
|
|
|
+ .tip-content {
|
|
|
+ color: $text-color-regular;
|
|
|
+ flex: 1;
|
|
|
+ word-wrap: break-word; /* 确保长文本能正确换行 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .example-item {
|
|
|
+ margin-bottom: $spacing-medium;
|
|
|
+ padding: $spacing-medium;
|
|
|
+ border-radius: $border-radius-small;
|
|
|
+ background-color: $background-color-gray;
|
|
|
+
|
|
|
+ &:last-child {
|
|
|
+ margin-bottom: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .example-question, .example-answer {
|
|
|
+ margin-bottom: $spacing-small;
|
|
|
+
|
|
|
+ &:last-child {
|
|
|
+ margin-bottom: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .example-label {
|
|
|
+ font-weight: $font-weight-medium;
|
|
|
+ color: $text-color-primary;
|
|
|
+ margin-right: $spacing-mini;
|
|
|
+ display: inline-block; /* 确保label和内容能够适当排列 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .loading-container {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ height: 200px;
|
|
|
+
|
|
|
+ text {
|
|
|
+ margin-top: $spacing-small;
|
|
|
+ font-size: $font-size-small;
|
|
|
+ color: $text-color-secondary;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+// 自定义 divider 样式,使其更紧凑
|
|
|
+:deep(.nut-divider) {
|
|
|
+ margin: $spacing-small 0 !important;
|
|
|
+ font-size: $font-size-base !important;
|
|
|
+ font-weight: $font-weight-medium !important;
|
|
|
+}
|
|
|
</style>
|