wangfukang 4 days ago
parent
commit
ed464e83d6
  1. 24
      package1/planet/adventure.vue

24
package1/planet/adventure.vue

@ -43,6 +43,14 @@
<text>今日关卡</text> <text>今日关卡</text>
<text>{{cleared ? '已通关' : '约2分钟'}}</text> <text>{{cleared ? '已通关' : '约2分钟'}}</text>
</view> </view>
<view class="start-strip" v-if="!playing && !cleared" @tap="startLevel">
<text>开始助推</text>
<text>先点这里再开始消除卡牌</text>
</view>
<view class="start-strip done" v-if="cleared">
<text>今日已助推</text>
<text>明天再来为学院继续推进</text>
</view>
<view class="tips"> <view class="tips">
<text>规则点选未被压住的卡牌底部槽内3张相同自动消除槽满则失败</text> <text>规则点选未被压住的卡牌底部槽内3张相同自动消除槽满则失败</text>
@ -73,7 +81,7 @@
<view class="actions"> <view class="actions">
<view class="sub-btn" @tap="resetLevel">重开本关</view> <view class="sub-btn" @tap="resetLevel">重开本关</view>
<view class="main-btn" :class="{disabled: cleared || playing}" @tap="startLevel"> <view class="main-btn" :class="{disabled: cleared || playing}" @tap="startLevel">
{{cleared ? '今日已助推' : (session ? '继续助推' : '开始助推')}} {{cleared ? '今日已助推' : (playing ? '助推' : '开始助推')}}
</view> </view>
</view> </view>
</view> </view>
@ -277,7 +285,7 @@
id: 'c' + idx, id: 'c' + idx,
icon: '', icon: '',
layer, layer,
x: 34 + col * 96 + (layer * 24) + ((row % 2) * 18) + dx, x: 18 + col * 82 + (layer * 18) + ((row % 2) * 10) + dx,
y: 24 + row * 78 + (layer * 44) + dy, y: 24 + row * 78 + (layer * 44) + dy,
style: '', style: '',
removed: false, removed: false,
@ -345,9 +353,13 @@
}) })
}, },
isOverlap(a, b) { isOverlap(a, b) {
return Math.abs(a.x - b.x) < 78 && Math.abs(a.y - b.y) < 70 return Math.abs(a.x - b.x) < 70 && Math.abs(a.y - b.y) < 70
}, },
pickCard(card) { pickCard(card) {
if (this.cleared) {
this.tui.toast('今日已助推,明天再来')
return
}
if (!this.playing) { if (!this.playing) {
this.tui.toast('先点击开始助推') this.tui.toast('先点击开始助推')
return return
@ -480,7 +492,7 @@
id: 'f' + idx, id: 'f' + idx,
icon: '', icon: '',
layer, layer,
x: 18 + col * 76 + (layer * 8), x: 10 + col * 68 + (layer * 6),
y: 28 + row * 94 + (layer * 34), y: 28 + row * 94 + (layer * 34),
style: '', style: '',
removed: false, removed: false,
@ -520,6 +532,10 @@
.rocket-progress { height: 100%; border-radius: 999rpx; background: linear-gradient(90deg, #35D6A6, #4FB7FF, #FFB84D); } .rocket-progress { height: 100%; border-radius: 999rpx; background: linear-gradient(90deg, #35D6A6, #4FB7FF, #FFB84D); }
.section-head { display: flex; justify-content: space-between; align-items: center; font-size: 24rpx; color: #6B817D; } .section-head { display: flex; justify-content: space-between; align-items: center; font-size: 24rpx; color: #6B817D; }
.section-head text:first-child { color: #12342F; font-size: 31rpx; font-weight: 900; } .section-head text:first-child { color: #12342F; font-size: 31rpx; font-weight: 900; }
.start-strip { margin-top: 20rpx; padding: 20rpx 24rpx; border-radius: 28rpx; background: linear-gradient(135deg, #35D6A6, #4FB7FF); color: #fff; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 14rpx 34rpx rgba(53,214,166,0.2); }
.start-strip text:first-child { font-size: 30rpx; font-weight: 900; }
.start-strip text:last-child { font-size: 22rpx; opacity: .88; }
.start-strip.done { background: rgba(255,255,255,0.8); color: #6B817D; box-shadow: none; }
.college-row { margin-top: 18rpx; display: flex; align-items: center; gap: 16rpx; } .college-row { margin-top: 18rpx; display: flex; align-items: center; gap: 16rpx; }
.medal { width: 48rpx; height: 48rpx; line-height: 48rpx; border-radius: 50%; text-align: center; background: #FFF1C7; color: #B87932; font-weight: 900; } .medal { width: 48rpx; height: 48rpx; line-height: 48rpx; border-radius: 50%; text-align: center; background: #FFF1C7; color: #B87932; font-weight: 900; }
.college-main { flex: 1; min-width: 0; } .college-main { flex: 1; min-width: 0; }

Loading…
Cancel
Save